/* ════════════════════════════════════════════════════════════
   ANORA — Responsive Media Queries
   Breakpoints:
     1280px — wide tablet / narrow desktop
     1080px — tablet landscape
      768px — tablet portrait / mobile landscape
      480px — small mobile
   ════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   HAMBURGER BUTTON (always in DOM, shown only on mobile)
   ══════════════════════════════════════════════════════════════ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.ham-line {
  display: block;
  width: 18px;
  height: 2px;
  background: #A8A8A8;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburger → X when open */
.navbar.nav-open .ham-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar.nav-open .ham-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.navbar.nav-open .ham-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ══════════════════════════════════════════════════════════════
   i18n / long-text overflow guards (all screen sizes)
   Prevents long FR/ES strings from breaking layouts
   ══════════════════════════════════════════════════════════════ */

.card-title,
.card-desc,
.why-title,
.why-desc,
.leader-name,
.leader-role,
.leader-bio,
.feature-desc,
.project-name,
.project-block h4,
.project-block p,
.project-impact-list li,
.cta-title,
.cta-subtitle,
.section-title,
.section-desc,
.hero-subtitle,
.story-text p,
.tech-serves-life p,
.footer-links a,
.footer-contact-item,
.footer-bottom-text {
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero-title {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Feature tags — allow wrapping rather than overflow */
.feature-tag {
  white-space: normal;
  flex-wrap: wrap;
  height: auto;
}

/* ── Button width guard: auto-expand for long i18n strings ── */
.btn-white,
.btn-glow,
.btn-cta-primary,
.btn-cta-secondary,
.btn-cta,
.btn-send,
.btn-learn,
.btn-contact {
  width: auto !important;
  min-width: max-content;
  white-space: nowrap;
}

/* Contact nav link — hidden on desktop, shown only in mobile dropdown */
.nav-contact-li { display: none; }
@media (max-width: 768px) {
  .nav-contact-li { display: block; }
}


/* ══════════════════════════════════════════════════════════════
   1280px — wide tablet
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1280px) {

  /* Home services grid — two equal columns */
  .services-row.row-1 { grid-template-columns: 1fr 1fr; }
  .services-row.row-2 { grid-template-columns: 1fr 1fr; }
  .card-split-visual { width: 220px; }

  /* About stats — contained */
  .stats-cluster { width: 520px; }
  .tech-serves-life { width: auto; flex: 1; }

  /* About leadership cards — start wrapping */
  .leadership-grid { flex-wrap: wrap; width: 100%; }

  /* Blog grid — tighter padding */
  .blog-filters { padding-left: 40px; padding-right: 40px; }
  .blog-section  { padding-left: 40px; padding-right: 40px; }
}


/* ══════════════════════════════════════════════════════════════
   1080px — tablet landscape
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1080px) {

  /* ── Navbar ── */
  .navbar { padding: 0 32px !important; }

  /* ── Home: adaptive cards — 2 columns ── */
  .cards-row { flex-wrap: wrap; justify-content: center; }
  .cards-row .service-card { width: calc(50% - 12px) !important; }

  /* ── Home: services grid — single column ── */
  .services-row.row-1,
  .services-row.row-2 { grid-template-columns: 1fr !important; }
  .card-split { flex-direction: column; gap: 24px; }
  .card-split-visual { width: 100%; max-width: 369px; }

  /* ── About: story ── */
  .story-section { flex-direction: column !important; padding: 48px 40px !important; }
  .story-text { width: 100% !important; }
  .story-graphic { width: 100%; justify-content: flex-start; }

  /* ── About: stats ── */
  .stats-section {
    flex-direction: column !important;
    padding: 48px 40px !important;
    align-items: flex-start;
    gap: 0;
    overflow: hidden !important;
  }
  .stats-cluster {
    transform: scale(0.72);
    transform-origin: left top;
    margin-bottom: -140px;
    height: 340px;
  }
  .tech-serves-life { width: 100% !important; }

  /* ── About: leadership ── */
  .leadership-grid { flex-wrap: wrap; width: 100%; }
  .leader-bio-card { width: calc(50% - 10px) !important; height: auto !important; }

  /* ── Service: cards ── */
  .services-row { flex-wrap: wrap !important; width: 100% !important; }
  .service-card {
    width: calc(50% - 10px) !important;
    height: auto !important;
    flex-shrink: 1;
  }

  /* ── Service: why columns ── */
  .why-row { flex-wrap: wrap !important; width: 100% !important; }
  .why-col { width: calc(50% - 1px) !important; height: auto !important; }

  /* ── Contact: why cards ── */
  .why-grid { flex-wrap: wrap !important; width: 100% !important; }
  .why-card { width: calc(50% - 10px) !important; height: auto !important; }

  /* ── Contact: info + form ── */
  .contact-wrapper { padding: 48px 40px !important; }
  .contact-row { flex-direction: column !important; width: 100% !important; }
  .contact-info,
  .contact-info-heading,
  .contact-items-group,
  .connect-section { width: 100% !important; }
  .form-card { width: 100% !important; }
  .form-field { width: 100% !important; }
  .form-input, .form-textarea { width: 100% !important; }

  /* ── Projects: IntelliBra ── */
  .project-intellibra {
    flex-direction: column !important;
    padding: 48px 40px !important;
    min-height: auto !important;
  }
  .project-text-col { width: 100% !important; flex: none !important; }
  .project-blocks,
  .project-block { width: 100% !important; }
  .ib-decorative {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 360px;
    height: 260px !important;
    margin: 24px auto 0;
    background-size: contain !important;
    background-position: center !important;
  }

  /* ── Projects: Cancer Registry ── */
  .project-cancer {
    flex-direction: column !important;
    padding: 48px 40px !important;
    min-height: auto !important;
    gap: 24px !important;
  }
  .cr-screenshots {
    width: 100% !important;
    max-width: 520px;
    margin: 0 auto;
  }

  /* ── Footer ── */
  .site-footer { padding: 48px 40px 0 !important; }
  .footer-main {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 32px !important;
  }

  /* ── Blog: 2-column grid at 1080px ── */
  .blog-grid { grid-template-columns: 1fr 1fr !important; }
  .blog-filters { padding-left: 32px; padding-right: 32px; }
  .blog-section  { padding-left: 32px; padding-right: 32px; }
}


/* ══════════════════════════════════════════════════════════════
   768px — mobile / tablet portrait
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ════ Navbar — hamburger mode ════ */
  .nav-hamburger { display: flex; }

  /* Hide desktop-only items */
  .btn-contact { display: none !important; }

  /* Navbar: fixed 68px height, flex-wrap for expandable menu */
  .navbar {
    padding: 0 20px !important;
    height: 68px !important;
    flex-wrap: wrap !important;
    align-content: flex-start;
  }

  /* Expanded state */
  .navbar.nav-open { height: auto !important; }

  .nav-logo img { width: 120px !important; height: 38px !important; }

  /* Mobile nav links — hidden as a full-width flex row at the bottom of the navbar */
  .nav-links {
    display: none !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    order: 10;
    flex-basis: 100% !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 16px 0 22px !important;
    background: transparent !important;
    border-top: 1px solid #1D1D21 !important;
    border-bottom: none !important;
    list-style: none !important;
    margin-top: 0 !important;
  }
  .navbar.nav-open .nav-links { display: flex !important; }
  .navbar.nav-open .nav-links a { font-size: 18px; }

  /* ════ Hero sections ════ */
  .hero {
    height: auto !important;
    min-height: 420px !important;
    padding: 88px 20px 56px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .hero-content {
    width: 100% !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Soften side gradient overlay on mobile (service/contact) */
  .hero-fade { opacity: 0.5 !important; }
  .hero-mesh,
  .hero-bg-network { opacity: 0.2 !important; }

  /* Hero typography */
  .hero-title {
    font-size: clamp(30px, 8vw, 52px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.5px !important;
  }
  .hero-subtitle {
    font-size: 15px !important;
    max-width: 100% !important;
    line-height: 1.65 !important;
  }
  .hero-badge,
  .badge-pill { font-size: 12px !important; padding: 5px 12px !important; }

  /* Hero action buttons */
  .hero-actions {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 10px !important;
  }
  .btn-white, .btn-glow {
    width: 100% !important;
    max-width: 280px;
  }

  /* ════ Section headings ════ */
  .section-title,
  .cta-title,
  .why-section h2,
  .leadership-header h2,
  .story-text h2,
  .tech-serves-life h2,
  .form-card h3 {
    font-size: clamp(24px, 6vw, 36px) !important;
    line-height: 1.25 !important;
  }
  .section-desc,
  .cta-subtitle,
  .leadership-header p,
  .tech-serves-life p,
  .story-text p { font-size: 15px !important; }

  /* ════ Section padding ════ */
  .adaptive-section   { padding: 40px 20px !important; }
  .services-section   { padding: 40px 20px !important; }
  .why-section        { padding: 40px 20px !important; }
  .leadership-section { padding: 40px 20px !important; }
  .story-section      { padding: 40px 20px !important; }
  .stats-section      { padding: 40px 20px !important; }
  .cta-inner          { padding: 56px 20px !important; }
  .contact-wrapper    { padding: 40px 20px !important; }
  .project-intellibra { padding: 40px 20px !important; }
  .project-cancer     { padding: 40px 20px !important; }

  /* ════ CTA section ════ */
  .cta-section { min-height: auto !important; padding: 0 !important; }
  .cta-inner { padding: 56px 20px !important; }

  /* ════ CTA actions ════ */
  .cta-actions {
    flex-direction: column !important;
    align-items: center !important;
    width: 100%;
    gap: 10px !important;
  }
  .btn-cta-primary, .btn-cta-secondary, .btn-cta {
    width: 100% !important;
    max-width: 280px;
  }

  /* ════ Home: adaptive cards — single column ════ */
  .cards-row {
    flex-direction: column !important;
    align-items: center !important;
  }
  .cards-row .service-card {
    width: 100% !important;
    max-width: 480px;
  }

  /* ════ Home: services grid ════ */
  .services-row.row-1,
  .services-row.row-2 { grid-template-columns: 1fr !important; }
  .card-split { flex-direction: column !important; gap: 20px; }
  .card-split-visual { width: 100% !important; max-width: 320px; }
  .card-graphic { display: none !important; }

  /* ════ About: story ════ */
  .story-section { flex-direction: column !important; gap: 24px; }
  .story-text { width: 100% !important; }

  /* ════ About: stats cluster ════ */
  .stats-section { gap: 0 !important; overflow: hidden !important; }
  .stats-cluster {
    transform: scale(0.55) !important;
    transform-origin: left top !important;
    margin-bottom: -200px !important;
    height: 280px !important;
    flex-shrink: 0;
  }

  /* ════ About: leadership ════ */
  .leadership-grid {
    flex-direction: column !important;
    align-items: center;
    width: 100%;
  }
  .leader-bio-card {
    width: 100% !important;
    height: auto !important;
    max-width: 480px;
  }

  /* ════ Service: cards — single column ════ */
  .services-row {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }
  .service-card {
    width: 100% !important;
    max-width: 480px;
    height: auto !important;
    flex-shrink: 1;
  }

  /* ════ Service: why columns — single column ════ */
  .why-row {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }
  .why-col {
    width: 100% !important;
    max-width: 480px;
    height: auto !important;
    border-right: none !important;
  }
  .why-col.has-divider {
    border-right: none !important;
    border-bottom: 1px solid #4E4E52;
  }

  /* ════ Contact: why cards — single column ════ */
  .why-grid {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }
  .why-card {
    width: 100% !important;
    max-width: 480px;
    height: auto !important;
  }

  /* ════ Contact: info + form — stacked ════ */
  .contact-row { flex-direction: column !important; width: 100%; }
  .contact-info,
  .contact-info-heading,
  .contact-items-group,
  .connect-section { width: 100% !important; }
  .form-card { width: 100% !important; padding: 28px 20px !important; }
  .form-field { width: 100% !important; }
  .form-input, .form-textarea { width: 100% !important; }
  .form-card h3 { font-size: 28px !important; line-height: 1.3 !important; }

  /* ════ Projects: IntelliBra ════ */
  .project-intellibra {
    flex-direction: column !important;
    min-height: auto !important;
  }
  .project-text-col { width: 100% !important; flex: none !important; }
  .project-blocks,
  .project-block { width: 100% !important; }
  /* Hide large decorative visual on mobile */
  .ib-decorative { display: none !important; }
  .ib-blob-1, .ib-blob-2, .ib-blob-3 { opacity: 0.08 !important; }

  /* ════ Projects: Cancer Registry ════ */
  .project-cancer {
    flex-direction: column !important;
    min-height: auto !important;
  }
  /* Scale down screenshot stack */
  .cr-screenshots {
    width: 100% !important;
    max-width: 100%;
    height: 260px !important;
    transform: scale(0.65);
    transform-origin: center top;
    margin-bottom: -90px;
  }

  /* ════ Footer ════ */
  .site-footer { padding: 40px 20px 0 !important; }
  .footer-main {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
    padding-bottom: 36px !important;
  }
  .footer-newsletter-form { flex-direction: column; }
  .footer-email-input { width: 100%; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}


/* ══════════════════════════════════════════════════════════════
   480px — small mobile
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {

  /* Further hero text reduction */
  .hero-title { font-size: clamp(26px, 9vw, 38px) !important; }

  .section-title,
  .cta-title,
  .why-section h2,
  .leadership-header h2,
  .story-text h2,
  .tech-serves-life h2,
  .form-card h3 { font-size: 22px !important; }

  /* Compact lang buttons */
  .lang-btn { padding: 4px 8px !important; font-size: 11px !important; }

  /* Nav control group — tighter */
  .navbar { padding: 0 14px !important; }
  .nav-logo img { width: 105px !important; height: 32px !important; }

  /* Section padding — compact */
  .adaptive-section,
  .services-section,
  .why-section,
  .leadership-section { padding: 32px 16px !important; }
  .cta-inner { padding: 48px 16px !important; }
  .contact-wrapper { padding: 32px 16px !important; }
  .project-intellibra,
  .project-cancer { padding: 32px 16px !important; }
  .site-footer { padding: 32px 16px 0 !important; }

  /* Footer: single column */
  .footer-main { grid-template-columns: 1fr !important; }

  /* Why col padding */
  .why-col { padding: 28px 16px !important; }

  /* Project text */
  .project-name { font-size: 26px !important; }
  .project-block h4 { font-size: 16px !important; }
  .project-block p,
  .project-impact-list li { font-size: 14px !important; }

  /* Card icons compact */
  .card-icon { width: 48px !important; height: 48px !important; }

  /* Contact form */
  .form-card { padding: 22px 14px !important; }
  .form-label { font-size: 15px !important; }
  .form-input, .form-textarea { font-size: 14px !important; }

  /* ════ Blog / News pages ════ */
  .blog-hero { height: auto !important; padding: 110px 20px 40px !important; }
  .blog-hero-title { font-size: clamp(26px, 8vw, 42px) !important; }
  .blog-filters { padding: 32px 16px 0 !important; gap: 8px !important; }
  .blog-section { padding: 32px 16px 60px !important; }
  .blog-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  .post-article { padding: 40px 16px 60px !important; }
  .post-title { font-size: clamp(22px, 6vw, 32px) !important; }
  .post-featured-img { border-radius: 10px !important; }
}
