/* ================================================================
   WTS — Responsive Stylesheet
   Mobile-first breakpoints:
   xs: < 480px   sm: < 640px   md: < 900px   lg: < 1100px
   ================================================================ */

/* ── Global box-sizing & images ── */
*, *::before, *::after { box-sizing: border-box; }
img, video, svg { max-width: 100%; height: auto; }

/* ══════════════════════════════════════════════════════════════
   NAVBAR & MOBILE DRAWER
   ══════════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════════
   MOBILE NAV — completely separate from desktop mega menu
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

  /* ── Hamburger ── */
  .hamburger    { display: flex !important; }
  .btn-nav-cta  { display: none !important; }
  .navbar       { padding: 0 1rem !important; }
  .nav-logo-img { height: 26px !important; }
  .nav-actions  { gap: .25rem !important; }

  /* ── Hide desktop nav list ── */
  .nav-list { display: none !important; }

  /* ─────────────────────────────────────────────
     DRAWER — fixed sidebar, no portal/body-append
     The <ul> itself is position:fixed.
     ::before pseudo creates the sticky header strip.
  ───────────────────────────────────────────── */
  .nav-list.mobile-open {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(300px, 88vw) !important;
    height: 100dvh !important;
    background: var(--surface) !important;
    z-index: 9500 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    box-shadow: 8px 0 40px rgba(0,0,0,.25) !important;
    padding: 0 0 2rem !important;
    margin: 0 !important;
    list-style: none !important;
    animation: wtsDrawerIn .22s cubic-bezier(.25,.46,.45,.94) forwards !important;
  }

  @keyframes wtsDrawerIn {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
  }

  /* Header strip inside drawer via ::before pseudo on <ul> */
  .nav-list.mobile-open::before {
    content: 'WTS Menü' !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 56px !important;
    flex-shrink: 0 !important;
    background: linear-gradient(135deg, #001d30, #0a0f1e) !important;
    border-bottom: 1px solid rgba(177,70,248,.25) !important;
    padding: 0 1.25rem !important;
    font-size: .88rem !important;
    font-weight: 800 !important;
    letter-spacing: .01em !important;
    color: #b146f8 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* ── Nav items in drawer ── */
  .nav-list.mobile-open > .nav-item {
    display: block !important;
    height: auto !important;
    width: 100% !important;
    border-bottom: 1px solid var(--border-soft, #eaeaf0) !important;
    flex-shrink: 0 !important;
  }
  [data-theme=dark] .nav-list.mobile-open > .nav-item {
    border-bottom-color: #1c1c30 !important;
  }

  /* ── Trigger buttons ── */
  .nav-list.mobile-open .nav-trigger {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: .9rem 1.25rem !important;
    background: none !important;
    border: none !important;
    border-bottom: none !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-align: left !important;
    border-radius: 0 !important;
    height: auto !important;
    white-space: normal !important;
  }
  .nav-list.mobile-open .nav-trigger:active {
    background: var(--brand-light, #f4f0ff) !important;
  }

  /* ── Plain nav-links ── */
  .nav-list.mobile-open .nav-link {
    display: flex !important;
    padding: .9rem 1.25rem !important;
    color: var(--text) !important;
    font-size: .9rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-bottom: none !important;
  }
  .nav-list.mobile-open .nav-link:active {
    background: var(--brand-light, #f4f0ff) !important;
  }

  /* ── Chevron rotation ── */
  .nav-list.mobile-open .nav-chevron {
    transition: transform .25s ease !important;
    flex-shrink: 0 !important;
    color: var(--text-muted) !important;
  }
  .nav-list.mobile-open .nav-item.open > .nav-trigger .nav-chevron {
    transform: rotate(180deg) !important;
    color: #b146f8 !important;
  }

  /* ── Mega-panel accordion ── */
  /* JS manages max-height via scrollHeight. CSS only sets visual style + closed state. */
  /* IMPORTANT: never display:none here — JS needs scrollHeight to be measurable.
     max-height and overflow must NOT use !important — JS inline styles must win. */
  .nav-list.mobile-open .mega-panel {
    position: static !important;
    top: auto !important; left: auto !important; right: auto !important;
    width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: auto !important;
    max-height: 0;          /* closed by default — JS overrides via inline style */
    overflow: hidden;       /* closed by default — JS overrides via inline style */
    background: var(--gray-50, #f9f9fb) !important;
    box-shadow: none !important;
    border: none !important;
    border-top: 2px solid rgba(177,70,248,.15) !important;
    border-radius: 0 !important;
    padding: 0 !important;
    /* transition managed by JS inline style */
  }
  [data-theme=dark] .nav-list.mobile-open .mega-panel {
    background: rgba(255,255,255,.03) !important;
    border-top-color: rgba(177,70,248,.2) !important;
  }

  /* ── Mega inner layout ── */
  .nav-list.mobile-open .mega-inner {
    display: block !important;
    max-width: none !important;
    padding: .375rem 0 .75rem !important;
    margin: 0 !important;
  }
  .nav-list.mobile-open .mega-col {
    display: block !important;
    width: 100% !important;
    padding: .125rem 1rem !important;
    border: none !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .nav-list.mobile-open .mega-col--promo,
  .nav-list.mobile-open .mega-promo { display: none !important; }

  .nav-list.mobile-open .mega-heading {
    display: block !important;
    font-size: .67rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .08em !important;
    color: #b146f8 !important;
    padding: .75rem .25rem .2rem !important;
    margin: 0 !important;
  }
  .nav-list.mobile-open .mega-item {
    display: flex !important;
    align-items: center !important;
    gap: .5rem !important;
    padding: .5rem .25rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: var(--text) !important;
    background: none !important;
    transition: background .1s !important;
  }
  .nav-list.mobile-open .mega-item:active {
    background: rgba(177,70,248,.08) !important;
  }
  .nav-list.mobile-open .mega-icon   { display: none !important; }
  .nav-list.mobile-open .mi-text     { display: flex !important; flex-direction: column !important; gap: 1px !important; }
  .nav-list.mobile-open .mi-title    { font-size: .85rem !important; font-weight: 600 !important; color: var(--text) !important; white-space: normal !important; }
  .nav-list.mobile-open .mi-sub      { font-size: .72rem !important; color: var(--text-muted) !important; white-space: normal !important; }
  .nav-list.mobile-open .tld-grid    { display: none !important; }
  .nav-list.mobile-open .loc-pills   { display: none !important; }
  .nav-list.mobile-open .view-all,
  .nav-list.mobile-open .quick-link  {
    display: flex !important;
    align-items: center !important;
    gap: .5rem !important;
    font-size: .82rem !important;
    padding: .5rem .25rem !important;
    color: #b146f8 !important;
    text-decoration: none !important;
  }
  .nav-list.mobile-open .view-all svg,
  .nav-list.mobile-open .quick-link svg { width: 12px !important; height: 12px !important; }

  /* Notification bell */
  .nav-notif { display: none !important; }
}




/* Mobile overlay styles are defined in navbar.css — no duplicate needed here */

/* ══════════════════════════════════════════════════════════════
   LAYOUT — containers, grids, sections
   ══════════════════════════════════════════════════════════════ */
.container     { width: 100%; padding-left: 1.25rem; padding-right: 1.25rem; }
.container--sm { max-width: 680px; }

@media (max-width: 640px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .section   { padding: 3rem 0; }
  .section--sm { padding: 2rem 0; }
  .section-alt { padding: 3rem 0; }
}

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { padding: 5rem 1.5rem 3rem; text-align: center; }
  .hero-stats { justify-content: center; flex-wrap: wrap; gap: 1.25rem; }
  .hero-actions { justify-content: center; }
  .hero-orb-1, .hero-orb-2 { display: none; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .hero p   { font-size: .9rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; }
}

/* ══════════════════════════════════════════════════════════════
   PAGE BANNER
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .page-banner { padding: 3rem 1.25rem 2rem; }
  .page-banner h1 { font-size: 1.75rem; }
  .banner-sub { font-size: .875rem; }
}

/* ══════════════════════════════════════════════════════════════
   PLANS / PRICING
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .plans-grid, .plan-cards { grid-template-columns: 1fr !important; max-width: 480px; margin-left: auto; margin-right: auto; }
}

/* ══════════════════════════════════════════════════════════════
   DOMAIN SEARCH
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .domain-search-box { flex-direction: column; }
  .domain-search-box input, .domain-search-box button { width: 100%; border-radius: 12px !important; }
}

/* ══════════════════════════════════════════════════════════════
   FEATURES GRID
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   TESTIMONIALS
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .testimonials-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column; gap: .75rem; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .lang-sw--footer { align-self: center; }
}

/* ══════════════════════════════════════════════════════════════
   ACCOUNT LAYOUT
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .acc-layout { grid-template-columns: 1fr !important; padding: .875rem !important; }
  .acc-sidebar {
    position: static !important;
    width: 100% !important;
  }
  .acc-nav {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .25rem;
  }
  .acc-nav-item {
    justify-content: center;
    flex-direction: column;
    gap: .25rem;
    padding: .625rem .5rem;
    font-size: .72rem;
    text-align: center;
  }
  .acc-nav-item svg { display: none; }
  .acc-nav-divider { display: none; }
  .acc-nav-logout { grid-column: 1 / -1; flex-direction: row; font-size: .82rem; }
}
@media (max-width: 560px) {
  .acc-stats { grid-template-columns: 1fr 1fr !important; }
  .acc-stat { padding: 1rem; }
}

/* ══════════════════════════════════════════════════════════════
   SERVICE PAGES
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .svc-hero-inner { grid-template-columns: 1fr !important; }
  .svc-visual { display: none !important; }
  .svc-packages { grid-template-columns: 1fr !important; max-width: 440px; margin: 0 auto; }
  .svc-hero-badges { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  /* Service page two-column sections → single column */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] { 
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
  }
  .svc-feature-grid { grid-template-columns: 1fr !important; }
  .svc-timeline::before { left: 16px; }
  .svc-cta-btns { flex-direction: column; align-items: center; }
  .svc-cta-btns .btn { width: 100%; max-width: 320px; }
}
@media (max-width: 480px) {
  .svc-hero { padding: 3.5rem 1.25rem 3rem; }
  .svc-hero h1 { font-size: 1.75rem; }
  .wp-packages { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   BLOG
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  /* Blog two-column layout → single column */
  .section .container > [style*="grid-template-columns: 1fr 280px"] {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   CHECKOUT
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .checkout-grid { grid-template-columns: 1fr !important; }
  .checkout-steps { gap: 0 !important; }
  .checkout-step { flex-direction: column; align-items: center; gap: .25rem; }
  .step-connector { width: 1px; height: 24px; background:var(--border); }
}

/* ══════════════════════════════════════════════════════════════
   DATACENTER MAP
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .dc-map-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   KARRIERE & JOBS
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .job-card { flex-direction: column; }
  .job-card-icon { width: 40px; height: 40px; border-radius: 11px; }
}

/* ══════════════════════════════════════════════════════════════
   KONTAKT PAGE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .kt-hero-grid { grid-template-columns: 1fr !important; }
  .kt-hero-left { padding: 2rem 0 1.5rem !important; }
  .kt-form-panel { border-radius: 20px !important; }
}
@media (max-width: 560px) {
  .kt-input-row { grid-template-columns: 1fr !important; }
  .kt-dept-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   REFERENZEN
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ref-card-header { height: 80px; }
}

/* ══════════════════════════════════════════════════════════════
   ANGEBOT (QUOTE FORM)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  #cat-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   NACHRICHTEN (INBOX)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  /* Inbox two-column → stack */
  .section--sm .container > [style*="grid-template-columns: 280px 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   PRESSKIT
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .presskit-asset { min-width: unset; }
}

/* ══════════════════════════════════════════════════════════════
   CONFIGURE PAGE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .configure-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   NOTIFICATION PANEL
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .notif-panel { width: calc(100vw - 1.5rem); right: -1rem; }
}

/* ══════════════════════════════════════════════════════════════
   GENERAL UTILITY — hide/show helpers
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block !important; }
}
@media (min-width: 641px) {
  .show-mobile { display: none !important; }
}

/* Show notification bell on mobile when logged in (JS sets display:flex) */
@media (max-width: 900px) {
  #nav-notif-wrap[style*="display: flex"],
  #nav-notif-wrap[style*="display:flex"] {
    display: flex !important;
  }
}
