/* ============================================================
   IZYSCO — Additions v4.0
   New sections: Destinations, University Popups, Blog, Legal
   3D Logo, Enhanced SEO, Pro Form, All modals
   ============================================================ */

/* ── 3D Logo ─────────────────────────────────── */
.logo-3d {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}
.logo-cube {
  width: 46px; height: 46px;
  transform-style: preserve-3d;
  perspective: 200px;
  cursor: pointer;
  animation: logo-rotate 8s ease-in-out infinite;
  flex-shrink: 0;
}
.logo-cube-inner {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  border-radius: 12px;
  background: var(--g-red);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 900; font-size: 1.1rem;
  color: #fff; letter-spacing: -0.02em;
  box-shadow: 0 6px 24px rgba(232,41,28,0.5),
              0 2px 0 rgba(255,255,255,0.2) inset,
              0 -2px 0 rgba(0,0,0,0.3) inset,
              4px 0 0 rgba(180,20,10,0.8),
              -4px 0 0 rgba(255,120,80,0.4);
  position: relative;
  transition: box-shadow 0.3s;
}
.logo-cube-inner::before {
  content: '';
  position: absolute; inset: 0; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 60%);
}
.logo-cube:hover .logo-cube-inner {
  box-shadow: 0 8px 40px rgba(232,41,28,0.7),
              0 2px 0 rgba(255,255,255,0.3) inset;
}
@keyframes logo-rotate {
  0%,100% { transform: rotateY(0deg) rotateX(0deg); }
  25%     { transform: rotateY(8deg) rotateX(3deg); }
  50%     { transform: rotateY(0deg) rotateX(6deg); }
  75%     { transform: rotateY(-8deg) rotateX(3deg); }
}

/* ── STUDY DESTINATIONS SECTION ──────────────── */
#destinations {
  padding: 7rem 0;
  background: var(--bg2);
}
.dest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.dest-card {
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  transform-style: preserve-3d;
}
.dest-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6);
}
.dest-bg {
  height: 170px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  font-size: 5rem;
  transition: all 0.4s;
}
.dest-card:hover .dest-bg { transform: scale(1.08); }
.dest-flag-emoji {
  font-size: 4.5rem;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
  display: block;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.dest-card:hover .dest-flag-emoji { transform: scale(1.15) translateY(-4px); }

/* Country gradient backgrounds */
.dest-malaysia  { background: linear-gradient(160deg, #1a1040 0%, #8B0000 100%); }
.dest-usa       { background: linear-gradient(160deg, #0a1628 0%, #1a3a6e 100%); }
.dest-canada    { background: linear-gradient(160deg, #1a0a0a 0%, #8B0000 100%); }
.dest-uk        { background: linear-gradient(160deg, #0a0a1a 0%, #1a1a6e 100%); }
.dest-australia { background: linear-gradient(160deg, #1a0a2e 0%, #4a1a6e 100%); }
.dest-europe    { background: linear-gradient(160deg, #0a1a1a 0%, #1a4a3a 100%); }
.dest-dubai     { background: linear-gradient(160deg, #1a1000 0%, #4a3000 100%); }
.dest-more      { background: linear-gradient(160deg, #0a1a0a 0%, #1a3a4a 100%); }

.dest-info {
  padding: 1.3rem 1.4rem 1.5rem;
  background: var(--surface);
}
.dest-info h3 { color: var(--t1); font-weight: 800; font-size: 1.05rem; margin-bottom: 0.25rem; }
.dest-info p  { font-size: 0.8rem; color: var(--t2); margin-bottom: 0.9rem; }
.dest-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.85rem; border-radius: 50px;
  font-size: 0.7rem; font-weight: 700;
  background: rgba(232,41,28,0.15); color: var(--red2);
  border: 1px solid rgba(232,41,28,0.3);
  cursor: pointer; transition: all 0.25s;
}
.dest-tag:hover { background: var(--red2); color: #fff; }

/* ── UNIVERSITY DETAIL POPUP ─────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}
.modal-overlay.open {
  opacity: 1; visibility: visible;
}
.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 28px;
  max-width: 680px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}
.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--red2); border-radius: 2px; }

.modal-header {
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(160deg, var(--bg3), var(--bg4));
  border-bottom: 1px solid var(--border);
  position: relative;
}
.modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border2);
  color: var(--t1); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.modal-close:hover { background: var(--red2); border-color: var(--red2); transform: rotate(90deg); }
.modal-flag { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.modal-uni-name { font-size: 1.5rem; font-weight: 800; color: var(--t1); margin-bottom: 0.3rem; }
.modal-uni-loc  { font-size: 0.85rem; color: var(--t2); display: flex; align-items: center; gap: 0.35rem; }
.modal-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }
.modal-tag {
  padding: 0.22rem 0.75rem; border-radius: 50px;
  font-size: 0.72rem; font-weight: 700;
}
.modal-tag.red  { background: rgba(232,41,28,0.12); color: var(--red2); border: 1px solid rgba(232,41,28,0.28); }
.modal-tag.blue { background: rgba(41,121,255,0.12); color: var(--blue2); border: 1px solid rgba(41,121,255,0.28); }
.modal-tag.gold { background: rgba(255,208,96,0.12); color: var(--gold); border: 1px solid rgba(255,208,96,0.28); }
.modal-tag.green{ background: rgba(34,209,122,0.12); color: var(--green); border: 1px solid rgba(34,209,122,0.28); }

.modal-body { padding: 1.75rem 2rem; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.modal-stat {
  padding: 1rem 1.2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px;
}
.modal-stat .ms-val { font-family: var(--ff-display); font-size: 1.4rem; font-weight: 800; color: var(--t1); display: block; }
.modal-stat .ms-lbl { font-size: 0.75rem; color: var(--t3); margin-top: 2px; }
.modal-desc { color: var(--t2); font-size: 0.88rem; line-height: 1.75; margin-bottom: 1.5rem; }
.modal-courses { margin-bottom: 1.5rem; }
.modal-courses h4 { color: var(--t1); font-size: 0.88rem; font-weight: 700; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.course-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.course-tag {
  padding: 0.28rem 0.8rem; border-radius: 50px;
  font-size: 0.75rem; font-weight: 500; color: var(--t2);
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.2s;
}
.course-tag:hover { background: rgba(41,121,255,0.12); color: var(--blue2); border-color: rgba(41,121,255,0.3); }
.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap;
}

/* ── BLOG SECTION ─────────────────────────────── */
#blog {
  padding: 7rem 0;
  background: var(--bg);
}
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.blog-card {
  border-radius: var(--r2); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.blog-card:hover {
  transform: translateY(-8px);
  border-color: var(--border2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.blog-thumb {
  height: 200px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.blog-thumb .bt-icon { transition: transform 0.4s; }
.blog-card:hover .bt-icon { transform: scale(1.15); }
.blog-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(7,7,15,0.8), transparent 60%);
}
.blog-cat {
  position: absolute; top: 1rem; left: 1rem;
  padding: 0.25rem 0.75rem; border-radius: 50px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #fff;
}
.blog-cat.red  { background: var(--red2); }
.blog-cat.blue { background: var(--blue2); }
.blog-cat.gold { background: #b8860b; }
.blog-body { padding: 1.5rem; background: var(--surface); }
.blog-meta {
  display: flex; gap: 1rem; margin-bottom: 0.75rem;
  font-size: 0.73rem; color: var(--t3);
}
.blog-meta span { display: flex; align-items: center; gap: 0.3rem; }
.blog-title {
  font-weight: 700; color: var(--t1); font-size: 1rem;
  line-height: 1.4; margin-bottom: 0.65rem;
  transition: color 0.25s;
}
.blog-card:hover .blog-title { color: var(--red2); }
.blog-excerpt { font-size: 0.83rem; color: var(--t2); line-height: 1.65; margin-bottom: 1rem; }
.blog-read-more {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; font-weight: 700; color: var(--red2);
  transition: gap 0.25s;
}
.blog-card:hover .blog-read-more { gap: 0.6rem; }

/* Blog detail popup */
.blog-modal-body { padding: 1.5rem 2rem; }
.blog-modal-hero {
  height: 180px; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; margin-bottom: 1.5rem;
}
.blog-modal-title { font-size: 1.5rem; font-weight: 800; color: var(--t1); margin-bottom: 1rem; line-height: 1.3; }
.blog-modal-meta  { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.5rem; font-size: 0.8rem; color: var(--t3); }
.blog-modal-meta span { display: flex; align-items: center; gap: 0.35rem; }
.blog-content { color: var(--t2); font-size: 0.9rem; line-height: 1.85; }
.blog-content h3 { color: var(--t1); font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }
.blog-content p  { margin-bottom: 1rem; }
.blog-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.blog-content li { margin-bottom: 0.4rem; }
.blog-content strong { color: var(--t1); }

/* ── LEGAL POPUP PAGES ────────────────────────── */
.legal-modal .modal-box { max-width: 760px; }
.legal-body { padding: 1.8rem 2rem; }
.legal-body h3 { color: var(--t1); font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }
.legal-body p  { font-size: 0.87rem; color: var(--t2); line-height: 1.8; margin-bottom: 1rem; }
.legal-body ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-body li { font-size: 0.87rem; color: var(--t2); margin-bottom: 0.45rem; }
.legal-body .last-updated { font-size: 0.75rem; color: var(--t3); margin-bottom: 1.5rem; }

/* ── FOOTER LEGAL LINKS ───────────────────────── */
.footer-legal {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  margin-top: 0.5rem;
}
.footer-legal a {
  font-size: 0.78rem; color: var(--t3);
  text-decoration: none; transition: color 0.2s;
  cursor: pointer;
}
.footer-legal a:hover { color: var(--red2); }

/* ── ENHANCED PRO FORM ────────────────────────── */
.f-select-styled {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%239898BB'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem !important;
}

/* Apply now button on uni cards */
.uni-apply-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.42rem 1rem; border-radius: 50px;
  font-size: 0.76rem; font-weight: 700;
  background: var(--g-red); color: #fff;
  border: none; cursor: pointer;
  transition: all 0.25s;
  margin-top: 0.75rem;
}
.uni-apply-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,41,28,0.5); }
.uni-details-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.42rem 1rem; border-radius: 50px;
  font-size: 0.76rem; font-weight: 700;
  background: transparent; color: var(--t2);
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all 0.25s; margin-top: 0.75rem; margin-left: 0.5rem;
}
.uni-details-btn:hover { background: var(--surface2); color: var(--t1); border-color: var(--border2); }
.uni-card-btns { display: flex; flex-wrap: wrap; gap: 0; margin-top: 0.25rem; }

/* ── QUICK APPLY MODAL ────────────────────────── */
#quickApplyModal .modal-box { max-width: 560px; }
.qa-form { padding: 1.5rem 2rem; }
.qa-title { font-size: 1.2rem; font-weight: 800; color: var(--t1); margin-bottom: 0.35rem; }
.qa-sub   { font-size: 0.85rem; color: var(--t2); margin-bottom: 1.5rem; }
.qa-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem; }
.qa-group { display: flex; flex-direction: column; gap: 0.4rem; }
.qa-group.full { grid-column: 1 / -1; }
.qa-label { font-size: 0.78rem; font-weight: 600; color: var(--t2); }
.qa-input, .qa-select {
  padding: 0.75rem 1rem; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border);
  color: var(--t1); font-family: var(--ff-body); font-size: 0.88rem;
  outline: none; transition: border-color 0.25s;
}
.qa-input:focus, .qa-select:focus {
  border-color: var(--red2); box-shadow: 0 0 0 3px rgba(232,41,28,0.12);
}
.qa-input::placeholder { color: var(--t3); }
.qa-select option { background: var(--bg2); }
.qa-note { font-size: 0.74rem; color: var(--t3); margin-bottom: 1.2rem; display: flex; gap: 0.4rem; align-items: flex-start; }

/* ── RESPONSIVE ADDITIONS ─────────────────────── */
@media (max-width: 1100px) {
  .dest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dest-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid  { grid-template-columns: 1fr 1fr; }
  .modal-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dest-grid  { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .blog-grid  { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-header { padding: 1.5rem 1.25rem; }
  .modal-body   { padding: 1.25rem; }
  .modal-footer { padding: 1.25rem; flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
  .qa-grid { grid-template-columns: 1fr; }
  .qa-group.full { grid-column: 1; }
  .qa-form { padding: 1.2rem; }
}
@media (max-width: 420px) {
  .dest-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .dest-bg { height: 130px; }
  .dest-flag-emoji { font-size: 3.2rem; }
}

/* ============================================================
   ADDITIONS v4.1 — Final fixes, mobile WOW polish
   ============================================================ */

/* ── Blog section bg ── */
#blog { background: var(--bg); }

/* ── Modal slide-up default (desktop) ── */
.modal-box {
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

/* ── Footer legal ── */
.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.85rem; }
.footer-legal a {
  font-size: 0.78rem; color: var(--t3); cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: color 0.22s; text-decoration: none;
  min-height: 44px; align-items: center;
}
.footer-legal a i { font-size: 0.85rem; }
.footer-legal a:hover { color: var(--red2); }

/* ── Destination card keyboard focus ── */
.dest-card:focus-visible {
  outline: 2px solid var(--red2);
  outline-offset: 3px;
}

/* ── Blog card focus ── */
.blog-card:focus-visible {
  outline: 2px solid var(--blue2);
  outline-offset: 3px;
}

/* ── University card button min height ── */
.uni-apply-btn, .uni-details-btn { min-height: 36px; }

/* ── Quick apply modal form width ── */
#quickApplyModal .modal-box { max-width: 580px; }
#quickApplyModal .modal-box .modal-header { padding: 1.5rem 1.75rem 1.25rem; }

/* ── Course tags in modal ── */
.course-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.course-tag {
  padding: 0.3rem 0.85rem; border-radius: 50px;
  font-size: 0.76rem; font-weight: 500; color: var(--t2);
  background: var(--surface); border: 1px solid var(--border);
  cursor: default; transition: all 0.2s;
}
.course-tag:hover { background: rgba(41,121,255,0.1); color: var(--blue2); border-color: rgba(41,121,255,0.3); }

/* ── Bx spin for loading states ── */
.bx-spin { animation: bx-spin-anim 1s linear infinite; }
@keyframes bx-spin-anim { to { transform: rotate(360deg); } }

/* ── Toast notification ── */
#izToast { pointer-events: none; }

/* ── Scroll snap dots for testi (mobile) ── */
.testi-scroll-dots {
  display: none; justify-content: center; gap: 0.5rem; margin-top: 1.25rem;
}
@media (max-width: 640px) { .testi-scroll-dots { display: flex; } }
.testi-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border2); transition: all 0.3s;
}
.testi-dot.active { background: var(--red2); width: 18px; border-radius: 3px; }

/* ── Mobile hero stats horizontal indicator ── */
@media (max-width: 640px) {
  .hero-stats-wrap { position: relative; }
  .hero-stats-wrap::after {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(270deg, var(--bg), transparent);
    pointer-events: none;
  }
}

/* ── Destination card mobile active state ── */
@media (max-width: 900px) {
  .dest-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
}

/* ── Section separator gradient lines ── */
#destinations::before {
  content: ''; display: block; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin-bottom: 0;
}

/* ── Improved glass card mobile ── */
@media (max-width: 640px) {
  .glass { border-radius: 16px; }
  .dest-card { border-radius: 18px; overflow: hidden; }
  .blog-card { border-radius: 16px; }
  .uni-card { border-radius: 16px; }
  .service-card { border-radius: 16px; }
}

/* ── Animated gradient border on active filter ── */
.filter-btn.active {
  background: var(--g-red);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(232,41,28,0.4);
}

/* ── Blog grid — 2 rows visible then show more ── */
.blog-card { display: flex; flex-direction: column; }
.blog-body { flex: 1; display: flex; flex-direction: column; }
.blog-excerpt { flex: 1; }

/* ── uni-card show-more button ── */
#show-more-unis {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0 auto;
}

/* ── Legal modal scrollable body ── */
.legal-body {
  max-height: 60vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--red2) transparent;
}
.legal-body::-webkit-scrollbar { width: 4px; }
.legal-body::-webkit-scrollbar-thumb { background: var(--red2); border-radius: 2px; }

/* ── Blog modal body scrollable ── */
.blog-modal-body {
  max-height: 55vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--blue2) transparent;
}
.blog-modal-body::-webkit-scrollbar { width: 4px; }
.blog-modal-body::-webkit-scrollbar-thumb { background: var(--blue2); border-radius: 2px; }

/* ── Uni modal body scrollable ── */
.modal-body {
  scrollbar-width: thin; scrollbar-color: var(--red2) transparent;
}

/* ── Prevent iOS zoom on form inputs ── */
@media (max-width: 768px) {
  .f-input, .f-select, .f-textarea,
  .qa-input, .qa-select,
  input, select, textarea { font-size: 16px !important; }
}

/* ── Mobile sticky apply CTA bar ── */
.mobile-apply-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
  background: rgba(7,7,15,0.95); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  gap: 0.75rem; align-items: center; justify-content: space-between;
}
.mobile-apply-bar p { font-size: 0.8rem; color: var(--t2); line-height: 1.3; }
.mobile-apply-bar p strong { color: var(--t1); display: block; font-size: 0.88rem; }
.mobile-apply-bar .btn { flex-shrink: 0; padding: 0.75rem 1.4rem; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 640px) {
  .mobile-apply-bar { display: flex; }
  /* Push content up so it's not hidden behind sticky bar */
  body { padding-bottom: 80px; }
  #cta-final { padding-bottom: 3rem; }
  footer { padding-bottom: 0; }
  .float-actions { bottom: 5.5rem; }
  .cookie-bar { bottom: 5.5rem; }
  #izToast { bottom: 6.5rem !important; }
}

/* ============================================================
   MOBILE NAV — Animated Apply Now Button (centre of menu)
   ============================================================ */
.nav-apply-center {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

/* Desktop: hide the centre pulse button */
@media (min-width: 901px) {
  .nav-apply-center { display: none; }
}

/* Mobile: show as prominent animated CTA */
.nav-apply-pulse {
  display: inline-flex !important;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.5rem !important;
  background: var(--g-red) !important;
  color: #fff !important;
  border-radius: 50px !important;
  font-family: var(--ff-display);
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.02em;
  position: relative;
  overflow: visible !important;
  box-shadow: 0 8px 32px rgba(232,41,28,0.5) !important;
  animation: nav-btn-pulse 2s ease-in-out infinite !important;
  text-align: center;
  min-height: 54px;
  justify-content: center;
}

/* Pulsing glow ring animation */
.nav-apply-pulse::before,
.nav-apply-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50px;
  border: 2px solid rgba(232,41,28,0.6);
  animation: ring-expand 2s ease-out infinite;
  pointer-events: none;
}
.nav-apply-pulse::after {
  animation-delay: 0.7s;
  border-color: rgba(232,41,28,0.3);
}

@keyframes nav-btn-pulse {
  0%,100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(232,41,28,0.5);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 12px 42px rgba(232,41,28,0.7);
  }
}

@keyframes ring-expand {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.nav-apply-pulse i {
  font-size: 1.2rem;
  animation: rocket-shake 2s ease-in-out infinite;
}
@keyframes rocket-shake {
  0%,100% { transform: rotate(0deg) translateY(0); }
  25%      { transform: rotate(-12deg) translateY(-2px); }
  75%      { transform: rotate(12deg)  translateY(-2px); }
}

/* ============================================================
   LOGO — Enhanced 3D Animation
   ============================================================ */
.logo-cube {
  animation: logo-3d-float 6s ease-in-out infinite !important;
  cursor: pointer;
}

@keyframes logo-3d-float {
  0%   { transform: rotateY(0deg)   rotateX(0deg)   translateY(0); }
  20%  { transform: rotateY(15deg)  rotateX(5deg)   translateY(-2px); }
  40%  { transform: rotateY(0deg)   rotateX(10deg)  translateY(-3px); }
  60%  { transform: rotateY(-15deg) rotateX(5deg)   translateY(-2px); }
  80%  { transform: rotateY(0deg)   rotateX(-5deg)  translateY(-1px); }
  100% { transform: rotateY(0deg)   rotateX(0deg)   translateY(0); }
}

.logo-cube:hover {
  animation: logo-3d-spin 0.6s cubic-bezier(0.16,1,0.3,1) forwards !important;
}
@keyframes logo-3d-spin {
  0%   { transform: rotateY(0deg)   scale(1); }
  50%  { transform: rotateY(180deg) scale(1.15); }
  100% { transform: rotateY(360deg) scale(1); }
}

.logo-cube-inner {
  /* Stronger 3D face effect */
  box-shadow:
    0 8px 32px rgba(232,41,28,0.6),
    4px 4px 0 rgba(180,20,10,0.9),
    -2px -2px 0 rgba(255,140,100,0.5),
    0 2px 0 rgba(255,255,255,0.25) inset,
    0 -2px 0 rgba(0,0,0,0.3) inset !important;
  transition: box-shadow 0.3s ease;
}

.logo-cube:hover .logo-cube-inner {
  box-shadow:
    0 12px 48px rgba(232,41,28,0.8),
    6px 6px 0 rgba(180,20,10,0.9),
    -3px -3px 0 rgba(255,140,100,0.5),
    0 2px 0 rgba(255,255,255,0.35) inset !important;
}

/* Logo text shimmer on hover */
.logo-3d:hover .logo-text-main {
  background: linear-gradient(90deg, #fff 0%, var(--red2) 40%, #fff 60%, var(--red2) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logo-shimmer 1.5s linear infinite;
}
@keyframes logo-shimmer {
  to { background-position: 200% center; }
}

/* ============================================================
   MOBILE NAV — full open state improvements
   ============================================================ */
@media (max-width: 900px) {
  /* Separator above/below the CTA button */
  .nav-apply-center {
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 1.25rem 0;
    margin: 0.25rem 0;
  }

  /* Stagger other links around the button */
  .nav-menu li:nth-child(1) a { animation-delay: 0.05s; }
  .nav-menu li:nth-child(2) a { animation-delay: 0.10s; }
  .nav-menu li:nth-child(3) a { animation-delay: 0.15s; }
  .nav-menu li.nav-apply-center { animation-delay: 0.20s; }
  .nav-menu li:nth-child(5) a { animation-delay: 0.25s; }
  .nav-menu li:nth-child(6) a { animation-delay: 0.30s; }
  .nav-menu li:nth-child(7) a { animation-delay: 0.35s; }
  /* Hide desktop CTA in mobile menu since we have the pulse button */
  .nav-menu li:last-child { display: none; }
}

/* ============================================================
   MOBILE HERO FINAL FIX — v5.1
   ============================================================ */

/* ── Prevent any element from causing horizontal overflow ── */
html, body { overflow-x: hidden !important; }

#hero {
  overflow: hidden;
  position: relative;
}

/* ── Hero grid: content first, globe second on mobile ── */
.hero-content    { order: 1; }
.hero-visual-wrap { order: 2; }

/* ── Desktop: reset order ── */
@media (min-width: 1101px) {
  .hero-content     { order: unset; }
  .hero-visual-wrap { order: unset; }
}

/* ── Mobile 3D scene — ALWAYS visible below hero text ── */
@media (max-width: 1100px) {
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .hero-visual-wrap {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
    padding: 1.5rem 0 2.5rem;
    position: relative;
  }

  /* Scale the entire 3D scene down proportionally */
  .hero-3d-scene {
    width: 300px !important;
    height: 300px !important;
    perspective: 600px;
  }

  .h3d-core {
    width: 165px !important;
    height: 165px !important;
  }
  .globe-icon {
    font-size: 3rem !important;
  }

  .orbit-1 { width: 205px !important; height: 205px !important; }
  .orbit-2 { width: 256px !important; height: 256px !important; }
  .orbit-3 { width: 296px !important; height: 296px !important; }

  /* Badge positioning for smaller scene */
  .fb-1 { top: 8%  !important; right: 4%  !important; }
  .fb-2 { bottom: 18% !important; left: 4%  !important; }
  .fb-3 { top: 46% !important; right: 1%  !important; }

  .float-badge {
    padding: 0.55rem 0.9rem !important;
    border-radius: 12px !important;
    gap: 0.4rem !important;
  }
  .float-badge .fb-icon { font-size: 1.1rem !important; }
  .float-badge .fb-val  { font-size: 0.78rem !important; line-height: 1.2; }
  .float-badge .fb-lbl  { font-size: 0.6rem !important; }
}

@media (max-width: 640px) {
  .hero-3d-scene {
    width: 260px !important;
    height: 260px !important;
  }
  .h3d-core {
    width: 148px !important;
    height: 148px !important;
  }
  .globe-icon { font-size: 2.6rem !important; }

  .orbit-1 { width: 178px !important; height: 178px !important; }
  .orbit-2 { width: 222px !important; height: 222px !important; }
  .orbit-3 { width: 258px !important; height: 258px !important; }

  .float-badge {
    padding: 0.45rem 0.75rem !important;
    border-radius: 10px !important;
  }
  .float-badge .fb-val { font-size: 0.72rem !important; }
  .float-badge .fb-lbl { font-size: 0.56rem !important; }

  .fb-1 { top: 6%  !important; right: 2% !important; }
  .fb-2 { bottom: 16% !important; left: 2% !important; }
  .fb-3 { top: 44% !important; right: 0% !important; }
}

@media (max-width: 400px) {
  .hero-3d-scene {
    width: 230px !important;
    height: 230px !important;
  }
  .h3d-core { width: 130px !important; height: 130px !important; }
  .globe-icon { font-size: 2.2rem !important; }

  .orbit-1 { width: 158px !important; height: 158px !important; }
  .orbit-2 { width: 198px !important; height: 198px !important; }
  .orbit-3 { width: 228px !important; height: 228px !important; }

  .fb-1, .fb-3 { right: 0 !important; }
  .fb-2 { left: 0 !important; }
}

/* ── Hero text overflow fix ── */
@media (max-width: 900px) {
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0 0.25rem;
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .hero-h1 {
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    white-space: normal;
  }

  .hero-desc {
    max-width: 100%;
    word-break: break-word;
  }
}

/* ── Hero stats 2×2 grid (Image 2 style) ── */
@media (max-width: 900px) {
  .hero-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Remove old scrollable styles */
    overflow-x: hidden;
    -webkit-overflow-scrolling: auto;
    scrollbar-width: auto;
  }
  .hero-stats::-webkit-scrollbar { display: none; }

  .hstat {
    padding: 1.1rem 1rem !important;
    border-right: 1px solid rgba(255,255,255,0.1) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    border-top: none !important;
    border-left: none !important;
    text-align: left !important;
    flex: unset !important;
    min-width: unset !important;
  }
  .hstat:nth-child(2) { border-right: none !important; }
  .hstat:nth-child(3) { border-bottom: none !important; }
  .hstat:nth-child(4) { border-right: none !important; border-bottom: none !important; }
  .hstat::before { display: block; }
  .hstat .val { font-size: 1.55rem !important; display: block; line-height: 1.1; }
  .hstat .lbl { font-size: 0.58rem !important; margin-top: 0.25rem; letter-spacing: 0.06em; }
}

@media (max-width: 480px) {
  .hero-stats { max-width: 100% !important; border-radius: 14px; }
  .hstat .val { font-size: 1.3rem !important; }
  .hstat .lbl { font-size: 0.54rem !important; }
  .hstat { padding: 0.95rem 0.85rem !important; }
}

/* ── Hero trust card (Image 2 style) ── */
@media (max-width: 900px) {
  .hero-trust {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 18px;
    padding: 1rem 1.2rem;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .trust-text { font-size: 0.74rem; flex: 1; min-width: 0; }
  .trust-text strong { display: block; font-size: 0.8rem; white-space: nowrap; }
  .trust-text span   { font-size: 0.7rem; color: var(--t2); }
  .trust-stars { font-size: 0.78rem; letter-spacing: 1px; flex-shrink: 0; color: var(--gold); }
  .trust-avatars { flex-shrink: 0; }
  .trust-avatars .av { width: 28px; height: 28px; font-size: 0.68rem; }
}

@media (max-width: 480px) {
  .hero-trust { max-width: 100%; border-radius: 14px; padding: 0.9rem 1rem; }
}

/* ── WhatsApp: float up above sticky bar ── */
@media (max-width: 640px) {
  .float-actions {
    bottom: 5.2rem !important;
    right: 0.9rem !important;
  }
}
