/* =============================================
   AURORA – Mobile Optimisations & Anti-Zoom Fixes
   Applies ONLY at <= 768px and <= 480px.
   Zero changes to desktop (>= 769px) layout.
   ============================================= */

/* ---------------------------------------------
   SHARED / GLOBAL CONTAINERS & ANTI-ZOOM
--------------------------------------------- */
@media (max-width: 768px) {

  :root { 
    --section-padding: 48px 0; 
  }

  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Prevents mobile browsers (iOS/Android) from auto-zooming on input focus */
  input, select, textarea, .filter-input, .filter-select, .form-input {
    font-size: 16px !important;
  }

  .section { 
    padding: 48px 0; 
  }

  /* Consistent 16px side margin on all containers */
  .container { 
    padding: 0 16px !important; 
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }

  .section-header { 
    margin-bottom: 32px; 
    text-align: center;
    padding: 0 8px;
  }

  .section-header p { 
    font-size: 0.9rem; 
    line-height: 1.55;
  }

  /* Compact responsive page hero header */
  .page-hero {
    padding: 92px 0 36px !important;
    min-height: auto !important;
    text-align: center;
    overflow: hidden !important;
  }

  .page-hero h1 { 
    font-size: clamp(1.75rem, 6.5vw, 2.3rem) !important; 
    line-height: 1.25;
    word-break: break-word;
  }

  .page-hero p { 
    font-size: 0.9rem; 
    max-width: 92%;
    margin: 10px auto 0;
    line-height: 1.55;
  }

  .cta-strip-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  .cta-strip-actions .btn { 
    width: 100%; 
    max-width: 300px; 
    justify-content: center; 
  }

  .cta-strip { 
    padding: 48px 0; 
    text-align: center;
  }

  .cta-strip h2 { 
    font-size: clamp(1.4rem, 5vw, 1.8rem); 
  }

  .cta-strip p { 
    font-size: 0.88rem; 
    margin-bottom: 20px; 
  }

  /* Fix iOS background-attachment: fixed (causes scroll glitches) */
  body { 
    background-attachment: scroll !important; 
  }
}

@media (max-width: 480px) {
  .section { padding: 40px 0; }
}


/* ---------------------------------------------
   NAVIGATION PILL ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .navbar { 
    top: 10px !important; 
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    transform: none !important;
    max-width: 100% !important;
  }

  .navbar-pill { 
    padding: 6px 12px; 
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .nav-logo-word { 
    font-size: 0.82rem; 
    letter-spacing: 1px; 
  }

  .nav-tagline { 
    display: none; 
  }

  .nav-logo-img { 
    height: 28px; 
  }

  .nav-join-btn { 
    display: none; 
  }

  .nav-hamburger { 
    display: flex; 
    margin-left: auto; 
  }

  .nav-links.open {
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    border-radius: 18px;
    padding: 12px;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-links.open a {
    font-size: 0.92rem;
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    min-height: 42px;
  }
}


/* ---------------------------------------------
   HOME — HERO ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .hero-content { 
    padding: 92px 16px 56px; 
    text-align: center;
  }

  .hero-logo-wrap { 
    margin-bottom: 20px; 
    display: flex;
    justify-content: center;
  }

  .hero-logo-img { 
    width: clamp(180px, 65vw, 300px); 
    height: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  .hero-btn-dark, .hero-btn-glow {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.88rem;
  }

  .hero-scroll-circle { 
    bottom: 12px; 
    width: 32px; 
    height: 32px; 
  }
}


/* ---------------------------------------------
   HOME — STATS ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .stats-section { padding: 28px 0; }

  .stats-grid { 
    grid-template-columns: repeat(2, 1fr); 
    width: 100%;
  }

  .stat-item {
    padding: 16px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .stat-item:nth-child(2), .stat-item:nth-child(4) { border-right: none; }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }

  .stat-number { font-size: 1.7rem; }
  .stat-label  { font-size: 0.7rem; }
}


/* ---------------------------------------------
   HOME — ABOUT SNAPSHOT
--------------------------------------------- */
@media (max-width: 768px) {
  .about-snap-grid { 
    grid-template-columns: 1fr; 
    gap: 28px; 
    width: 100%;
  }

  .about-snap-text {
    text-align: center;
  }

  .about-snap-text h2 { 
    font-size: clamp(1.4rem, 4.8vw, 1.8rem); 
  }

  .snap-card { 
    padding: 16px; 
    width: 100%;
    box-sizing: border-box;
  }

  .snap-card-icon { 
    font-size: 1.3rem; 
    min-width: 30px; 
  }
}


/* ---------------------------------------------
   HOME — PILLARS ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .pillars-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    width: 100%;
  }

  .pillar-card { 
    padding: 18px 12px; 
    text-align: center;
    box-sizing: border-box;
  }

  .pillar-icon { font-size: 1.7rem; margin-bottom: 8px; }
  .pillar-card h3 { font-size: 0.88rem; }
  .pillar-card p  { font-size: 0.78rem; line-height: 1.45; }
}

@media (max-width: 480px) {
  .pillars-grid { grid-template-columns: 1fr; }
}


/* ---------------------------------------------
   EVENTS PAGE — SEARCH, FILTERS & CARDS ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .events-filter-section {
    padding: 16px 0 0;
  }

  /* Full-width clean filter container */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    padding: 12px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(8, 16, 44, 0.65);
  }

  .filter-search { 
    min-width: 0; 
    width: 100%; 
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    box-sizing: border-box;
  }

  /* Equal 4-column tabs grid - zero wrapping, perfect distribution */
  .filter-tabs { 
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%; 
    gap: 2px;
    background: rgba(0,0,0,0.3);
    border-radius: 999px;
    padding: 3px;
    box-sizing: border-box;
  }

  .filter-tab { 
    font-size: 0.75rem; 
    padding: 6px 0; 
    min-height: 34px;
    width: 100%;
    text-align: center;
    justify-content: center;
    border-radius: 999px;
    white-space: nowrap;
  }

  .filter-sort {
    width: 100%;
  }

  .filter-select { 
    width: 100%; 
    height: 38px;
    border-radius: 10px;
    padding: 0 12px;
    box-sizing: border-box;
  }

  /* Section Title alignment */
  .events-section-header {
    margin-bottom: 20px;
  }

  .events-section-title {
    font-size: 1.2rem;
  }

  /* Event Grid & Card */
  .events-grid { 
    grid-template-columns: 1fr; 
    gap: 16px; 
    width: 100%;
  }

  .event-card {
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
  }

  .event-card-header { 
    padding: 16px 14px 10px; 
  }

  .event-card-body { 
    padding: 0 14px 16px; 
  }

  .event-card-body h3 { 
    font-size: 1rem; 
  }

  .event-meta {
    gap: 10px;
    margin-bottom: 10px;
  }

  .event-meta-item {
    font-size: 0.76rem;
  }

  .event-card-body p {
    font-size: 0.84rem;
    line-height: 1.55;
    margin-bottom: 14px;
  }

  .event-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 42px;
  }

  .events-ongoing-banner {
    flex-direction: column;
    padding: 18px 14px;
    gap: 14px;
    align-items: flex-start;
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
  }

  .ongoing-content h3 { font-size: 1rem; }
}


/* ---------------------------------------------
   TEAM PAGE — HIERARCHY TREE MOBILE FIX
--------------------------------------------- */
@media (max-width: 768px) {
  .tree-line-down { 
    height: 24px; 
    margin-bottom: 14px; 
  }

  .tree-tier-label { 
    font-size: 0.64rem; 
    margin-bottom: 14px; 
  }

  /* Base Team Card on Mobile */
  .tree-card { 
    padding: 14px 8px !important; 
    border-radius: 16px !important; 
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Photo Rings - Strictly enforce circular clipping on mobile */
  .tree-photo-ring {
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 10px !important;
  }

  .tree-photo {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .tree-card-founder .tree-photo-ring { width: 84px !important; height: 84px !important; }
  .tree-card-co      .tree-photo-ring,
  .tree-card-tech    .tree-photo-ring { width: 68px !important; height: 68px !important; }
  .tree-card-hod     .tree-photo-ring { width: 64px !important; height: 64px !important; }
  .tree-card-member  .tree-photo-ring { width: 56px !important; height: 56px !important; }

  /* Typography scale on mobile */
  .tree-name { 
    font-size: 0.85rem !important; 
    word-break: break-word;
    line-height: 1.25;
  }

  .tree-card-member .tree-name { font-size: 0.78rem !important; }
  .tree-role  { font-size: 0.7rem !important; line-height: 1.3; }
  .tree-bio   { font-size: 0.74rem !important; line-height: 1.45; margin-top: 6px !important; }
  .tree-badge { font-size: 0.56rem !important; padding: 2px 8px !important; margin-bottom: 6px !important; }

  /* Founder card */
  .tree-card-founder { 
    width: 100% !important; 
    max-width: 320px !important; 
    margin: 0 auto !important; 
  }

  /* Co-Founder & Tech Lead — ALWAYS on same 2-column grid */
  .tree-row-dual {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .tree-card-co, .tree-card-tech { 
    width: 100% !important; 
    max-width: 100% !important;
  }

  /* HODs — 2-column grid */
  .tree-row-quad {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .tree-card-hod { width: 100% !important; }

  /* Core team — 2-column grid */
  .tree-row-five {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .tree-card-member { width: 100% !important; }
}

@media (max-width: 480px) {
  /* Co-founder & Tech lead remain side-by-side on 2-col grid */
  .tree-row-dual,
  .tree-row-quad,
  .tree-row-five { 
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 8px !important; 
  }
}


/* ---------------------------------------------
   CONTACT PAGE ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .contact-layout { 
    grid-template-columns: 1fr; 
    gap: 28px; 
    width: 100%;
  }

  .form-glass { 
    padding: 20px 14px; 
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
  }

  .form-glass h3 { font-size: 1.05rem; }
  .form-row { grid-template-columns: 1fr; gap: 10px; }

  .contact-card { 
    padding: 12px; 
    border-radius: 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .contact-card h4 { font-size: 0.85rem; }
  .contact-card p  { font-size: 0.76rem; }

  .social-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 14px;
    gap: 10px;
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
  }

  .social-pill { font-size: 0.76rem; padding: 5px 12px; }
}


/* ---------------------------------------------
   TRUST PAGE ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .trust-pillars-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
    width: 100%;
  }

  .trust-pillar { 
    padding: 18px 12px; 
    border-radius: 16px;
    box-sizing: border-box;
  }

  .trust-pillar-icon { font-size: 1.8rem; }

  .credentials-layout { 
    grid-template-columns: 1fr; 
    gap: 28px; 
    width: 100%;
  }

  .cert-preview-card { 
    padding: 18px 14px; 
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
  }

  .cert-name { font-size: 1.2rem; }
  .cert-footer { flex-direction: column; gap: 12px; align-items: center; }

  .faq-grid { 
    grid-template-columns: 1fr; 
    gap: 10px; 
    width: 100%;
  }

  .faq-item { 
    padding: 16px 14px; 
    border-radius: 14px;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .trust-pillars-grid { grid-template-columns: 1fr; }
}


/* ---------------------------------------------
   FOOTER ALIGNMENT
--------------------------------------------- */
@media (max-width: 768px) {
  .footer { padding: 36px 0 0; }

  .footer-grid { 
    grid-template-columns: 1fr; 
    gap: 24px; 
    padding-bottom: 24px; 
    width: 100%;
  }

  .footer-brand { max-width: 100%; }
  .footer-logo-img { height: 44px; }
  .footer-tagline { font-size: 0.85rem; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    padding: 14px 0;
    font-size: 0.7rem;
  }

  .social-links { gap: 8px; margin-top: 12px !important; }
  .social-link  { width: 30px; height: 30px; }
}


/* ---------------------------------------------
   TOUCH UX & PERFORMANCE
--------------------------------------------- */
@media (max-width: 768px) {
  .btn { min-height: 42px; }

  /* Disable hover transforms on touch to prevent sticky hover */
  .pillar-card:hover,
  .event-preview-card:hover,
  .snap-card:hover,
  .tree-card:hover,
  .contact-card:hover,
  .opportunity-item:hover,
  .credentials-list li:hover,
  .faq-item:hover,
  .social-pill:hover,
  .footer-links a:hover { 
    transform: none !important; 
  }

  .btn:active,
  .tree-card:active,
  .pillar-card:active { 
    opacity: 0.82; 
  }
}
