/* =====================================================
   AT Wire GmbH — Custom Styles
   Tailwind CDN handles utilities; this file covers
   things that cannot be expressed as Tailwind classes.
   ===================================================== */

/* ----- Hero background image ----- */
.hero-bg {
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ----- German flag (3-stripe horizontal) ----- */
.flag-de {
    background: linear-gradient(
        to bottom,
        #000000 0%,   #000000 33.33%,
        #CC0000 33.33%, #CC0000 66.66%,
        #FFCE00 66.66%, #FFCE00 100%
    );
}

/* ----- Page-header inner-page dark section ----- */
.page-header-bg {
    background-color: #0E1822;
}

/* ----- Smooth scrolling on the whole site ----- */
html {
    scroll-behavior: smooth;
}

/* ----- Remove browser default button outline on flag btns ----- */
.flag-btn:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* ----- Product detail page hero — subtle industrial gray texture ----- */
.product-hero-bg {
    background-color: #f0f2f5;
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.016) 10px,
            rgba(0, 0, 0, 0.016) 11px
        );
}

/* ----- Spec table inside product detail — zebra rows ----- */
.spec-table tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.65);
}

/* ----- Gallery image card placeholder centering fix ----- */
.gallery-card-img {
    aspect-ratio: 4 / 3;
}

/* ----- Hero Slider — dark navy with subtle grid texture ----- */
.hero-dark-bg {
    background-color: #0E1822;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 52px 52px;
}

/* ----- Hide scrollbar on product strip (mobile horizontal scroll) ----- */
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
  /* Scope only */
  #spezifikationen { --brand:#008fd0; --ink:#0f172a; --border:#e5e7eb; --muted:#64748b; }

  #spezifikationen .spec-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    box-shadow:0 14px 35px rgba(15,23,42,.08);
  }

  /* Bigger, roomier tables like the reference */
  #spezifikationen .spec-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    overflow:hidden;
    border-radius:14px;
    box-shadow:0 10px 25px rgba(15,23,42,.06);
  }

  #spezifikationen .spec-table th,
  #spezifikationen .spec-table td{
    border-top:1px solid var(--border);
    border-right:1px solid var(--border);
    padding:16px 18px;
    font-size:15.5px;
    line-height:1.4;
    vertical-align:middle;
    color:var(--ink);
  }
  #spezifikationen .spec-table tr > *:first-child{ border-left:1px solid var(--border); }
  #spezifikationen .spec-table tr:first-child > *{ border-top:1px solid var(--border); }

  #spezifikationen .spec-table th{
    background:#f6f7f9;
    color:var(--brand);
    font-weight:700;
    font-size:14.5px;
    letter-spacing:.2px;
  }

  #spezifikationen .spec-table tbody tr:nth-child(even) td{
    background:#fbfbfc;
  }

  #spezifikationen .spec-table tbody tr:hover td{
    background:#e6f7fc;
    transition: background .18s ease;
  }

  /* Werkstoffe: prevent "small tiny" look */
  #spezifikationen .werkstoffe-grid{
    display:grid;
    grid-template-columns: 1fr;
    gap:22px;
  }
  @media (min-width: 1024px){
    #spezifikationen .werkstoffe-grid{
      grid-template-columns: 1fr 1fr;
      gap:26px;
    }
    #spezifikationen .werkstoffe-wide{
      grid-column: 1 / -1;
    }
  }

  /* Mobile safety: allow horizontal scroll instead of squishing */
  #spezifikationen .table-scroll{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  #spezifikationen .table-scroll .spec-table{
    min-width: 720px; /* so 3-col tables stay readable on small screens */
  }

/* ===== Desktop navbar link styles ===== */
.main-nav__link {
    position: relative;
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.015em;
    color: #0E1822;
    text-decoration: none;
    padding-bottom: 4px;
    transition: all 0.2s ease;
}

.main-nav__link::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #121e28;
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
}

.main-nav__link:hover {
    color: #121e28;
}

.main-nav__link:hover::after {
    transform: scaleX(1);
}

.main-nav__link.is-active::after {
    transform: scaleX(1); /* Keep underline for active state */
}

.main-nav__link:focus-visible {
    outline: 2px solid #0E1822;
    outline-offset: 3px;
    border-radius: 2px;
}

/* WP active-page classes */
.current-menu-item > a::after,
.current_page_item > a::after,
.current-menu-ancestor > a::after,
.current-menu-parent > a::after {
    transform: scaleX(1);
}
.current-menu-item > a,
.current_page_item > a,
.current-menu-ancestor > a,
.current-menu-parent > a {
    color: #0E1822;
}

/* ===== Header logo size ===== */
nav img[alt="AT Wire Logo"] {
    height: 44px;
    width: auto;
}
@media (max-width: 1024px) {
    nav img[alt="AT Wire Logo"] { height: 38px; }
}
@media (max-width: 640px) {
    nav img[alt="AT Wire Logo"] { height: 34px; }
}

/* ===== Submenu dropdown dropdown submenu ===== */
.has-submenu {
    position: relative;
}

.atw-submenu {
    visibility: hidden;
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    position: absolute;
    top: 100%; /* Changed from calc(100% + 10px) to eliminate gap */
    left: 50%;
    min-width: 260px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    list-style: none;
    z-index: 500; /* Increased z-index */
    pointer-events: none; /* Prevent interaction when hidden */
}

/* Pseudo-element to bridge the gap if any */
.atw-submenu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.has-submenu:hover .atw-submenu,
.has-submenu:focus-within .atw-submenu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.atw-submenu li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.atw-submenu li a:hover,
.atw-submenu li a:focus-visible {
    color: #121e28;
    background: #f3f4f6;
    outline: none;
}

/* Separate specific Über uns dropdown if needed, but the generic one should work */

/* ===== HOMEPAGE ===== */
.atw-home-page {
  --accent:#008fd0;
  --accent2:#46c2ff;
  --text:#0b1220;
  --muted:#5f6b7a;
  --line:#e6edf5;
  --bg-soft:#f8fbff;
  --radius:18px;
  --shadow:0 20px 50px rgba(11,18,32,.08);
  --shadow2:0 10px 30px rgba(11,18,32,.06);
}

.atw-home-page .kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(11,18,32,.70);
  font-weight:900;
  margin-bottom: 14px;
}
.atw-home-page .kicker .dot{
  width:10px;height:10px;border-radius:999px;
  background:linear-gradient(90deg,var(--accent2),var(--accent));
  box-shadow:0 10px 20px rgba(0,143,208,.22);
}

.atw-home-page .hero{
  background:linear-gradient(135deg,#0f1a24 0%, #162636 55%, #1d3347 100%);
  border-radius:22px;
  border:1px solid rgba(0,143,208,.14);
  box-shadow:0 28px 70px rgba(11,18,32,.18), 0 12px 26px rgba(0,143,208,.14);
  overflow:hidden;
  position:relative;
  margin-bottom: 26px;
}
.atw-home-page .hero::before{
  content:"";
  position:absolute; inset:-30% -30%;
  background:
    radial-gradient(circle at 20% 40%, rgba(0,143,208,.28), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(70,194,255,.22), transparent 55%),
    linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.10) 18%, rgba(255,255,255,.22) 24%, rgba(255,255,255,.06) 34%, rgba(255,255,255,0) 46%);
  opacity:.55;
  mix-blend-mode:overlay;
  pointer-events:none;
  transform:translateX(-20%) rotate(-2deg);
}
.atw-home-page .hero-inner{
  padding:34px 34px 32px;
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap:22px;
  align-items:start;
  position:relative;
  z-index:1;
}
.atw-home-page .hero h1{
  margin:10px 0 10px;
  font-size:36px;
  line-height:1.12;
  letter-spacing:-.4px;
  color:#fff;
}
.atw-home-page .hero p{
  margin:0;
  color:rgba(255,255,255,.85);
  line-height:1.75;
  font-size:15px;
  max-width:780px;
}
.atw-home-page .hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
  margin-top:8px;
}
.atw-home-page .badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(11,18,32,.34);
  color:#fff;
  font-weight:900;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  white-space:nowrap;
}
.atw-home-page .badge svg{ width:18px;height:18px; stroke:#46c2ff; stroke-width:2.3; fill:none; }

@media(max-width:980px){
  .atw-home-page .hero-inner{ grid-template-columns:1fr; }
  .atw-home-page .hero-badges{ justify-content:flex-start; }
  .atw-home-page .hero h1{ font-size:30px; }
}

.atw-home-page .section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin:22px 0 12px;
}
.atw-home-page .section-head h2{
  margin:0;
  font-size:13px;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-weight:950;
  color:var(--accent);
}
.atw-home-page .section-head .muted{
  margin:0;
  color:rgba(11,18,32,.62);
  font-size:13px;
  font-weight:750;
}

.atw-home-page .stats-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0,1fr));
  gap:14px;
}
@media(max-width:1100px){ .atw-home-page .stats-grid{ grid-template-columns:repeat(3,1fr); } }
@media(max-width:720px){ .atw-home-page .stats-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:420px){ .atw-home-page .stats-grid{ grid-template-columns:1fr; } }

.atw-home-page .card{
  background:#fff;
  border:1px solid rgba(11,18,32,.10);
  border-radius:18px;
  box-shadow:0 18px 40px rgba(11,18,32,.10);
  overflow:hidden;
  position:relative;
}
.atw-home-page .card::before{
  content:"";
  position:absolute; left:0; top:0; right:0;
  height:3px;
  background:linear-gradient(90deg,var(--accent2),var(--accent));
  opacity:.9;
}
.atw-home-page .stat-card{
  padding:18px 18px 16px;
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.atw-home-page .ico{
  width:44px;height:44px;border-radius:16px;
  border:1px solid rgba(0,143,208,.22);
  background:rgba(0,143,208,.08);
  display:grid; place-items:center;
  flex:0 0 auto;
}
.atw-home-page .ico svg{
  width:22px;height:22px;
  stroke:var(--accent);
  stroke-width:2.2;
  fill:none;
}
.atw-home-page .stat-meta b{
  display:block;
  font-size:20px;
  letter-spacing:-.2px;
  color:rgba(11,18,32,.92);
}
.atw-home-page .stat-meta span{
  display:block;
  margin-top:6px;
  font-size:12.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:900;
  color:rgba(11,18,32,.56);
}

.atw-home-page .grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  align-items:stretch;
  margin-top: 14px;
}
@media(max-width:980px){ .atw-home-page .grid-2{ grid-template-columns:1fr; } }

.atw-home-page .block{ padding:18px 18px 16px; }
.atw-home-page .block h3{ margin:0 0 10px; font-size:16px; font-weight:950; color:rgba(11,18,32,.92); }
.atw-home-page .block p{ margin:0 0 10px; color:rgba(11,18,32,.70); line-height:1.7; font-size:14.5px; }

.atw-home-page .list{
  margin:10px 0 0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.atw-home-page .li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.08);
  background:linear-gradient(180deg,#ffffff 0%, #fbfdff 100%);
}
.atw-home-page .li svg{
  width:20px;height:20px;
  flex:0 0 auto;
  margin-top:1px;
  stroke:var(--accent);
  stroke-width:2.4;
  fill:none;
}
.atw-home-page .li span{ color:rgba(11,18,32,.72); line-height:1.6; font-size:14px; }

.atw-home-page .flow{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
@media(max-width:520px){ .atw-home-page .flow{ grid-template-columns:1fr; } }
.atw-home-page .step{
  padding:14px 14px 12px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.08);
  background:rgba(255,255,255,.92);
  position:relative;
  overflow:hidden;
}
.atw-home-page .step::before{
  content:"";
  position:absolute; left:0; top:0; bottom:0;
  width:3px;
  background:linear-gradient(180deg,var(--accent2),var(--accent));
}
.atw-home-page .step .k{ margin:0 0 8px; font-size:11.5px; letter-spacing:.18em; text-transform:uppercase; font-weight:950; color:rgba(11,18,32,.86); }
.atw-home-page .step .v{ margin:0; color:rgba(11,18,32,.68); line-height:1.6; font-size:13.5px; }

/* Dynamic Banner Styling */
.atw-home-page .hero-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ===== Product detail spec section (#product-description-wrapper) ===== */
#product-description-wrapper {
    --brand: #008fd0;
    --ink: #555;
    --card: #ffffff;
    --border: #e0e0e0;
    --border-strong: #d0d5dd;
}

#product-description-wrapper h2,
#product-description-wrapper h3 {
    color: var(--brand);
    margin: 0 0 14px;
    text-align: left;
}
#product-description-wrapper h2 { font-size: clamp(22px, 3vw, 28px); }

#product-description-wrapper .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

#product-description-wrapper table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin: 12px auto 18px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
    table-layout: fixed;
}
#product-description-wrapper table,
#product-description-wrapper th,
#product-description-wrapper td {
    border: 1px solid var(--border);
}
#product-description-wrapper th,
#product-description-wrapper td {
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
    vertical-align: middle !important;
    word-wrap: break-word;
}
#product-description-wrapper th {
    background: #f2f2f2;
    color: var(--brand);
    font-weight: 700;
}

#product-description-wrapper tr:nth-child(even) { background: #fafafa; }
#product-description-wrapper table tr:hover {
    background: rgba(0, 143, 208, 0.08);
    transition: 0.25s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#product-description-wrapper .columns { display: block; }
#product-description-wrapper .columns > table {
    width: 100%;
    margin: 0;
}
#product-description-wrapper .card table { width: 100%; }
#product-description-wrapper .columns table {
    margin-top: 28px !important;
    margin-bottom: 28px !important;
}

#product-description-wrapper .note {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
    padding-left: 2px;
}

#product-description-wrapper .br-cell {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
}
#product-description-wrapper .br-cell span:first-child {
    display: inline-block;
    width: 60px;
}

#product-description-wrapper .narrow {
    width: 40px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle !important;
}

#product-description-wrapper td span.arr {
    display: inline-block;
    width: 20px;
    text-align: center;
}

#product-description-wrapper .aligned-header {
    margin-left: 12px !important;
    color: #008fd0 !important;
    font-weight: normal !important;
}

#product-description-wrapper .card > h2 {
    margin-left: 12px !important;
}

/* Schneiddraht: table-wrap & list-grid */
#product-description-wrapper .table-wrap {
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
#product-description-wrapper .table-wrap table {
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}
#product-description-wrapper .table-wrap thead th {
    background: #f3f6fb;
    color: var(--brand);
    font-weight: 600;
    border-bottom: 1px solid var(--border-strong);
    border-right: 1px solid var(--border);
    font-size: 13.5px;
    line-height: 1.35;
    white-space: normal;
}
#product-description-wrapper .table-wrap thead th:last-child { border-right: none; }
#product-description-wrapper .table-wrap tbody td {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}
#product-description-wrapper .table-wrap tbody tr:last-child td { border-bottom: none; }
#product-description-wrapper .table-wrap tbody td:last-child { border-right: none; }
#product-description-wrapper .table-wrap tbody tr:nth-child(even) td { background: #fbfcff; }

#product-description-wrapper .list-grid {
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
#product-description-wrapper .list-grid .row {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
}
#product-description-wrapper .list-grid .row:nth-child(even) { background: #fbfcff; }
#product-description-wrapper .list-grid .row:last-child { border-bottom: none; }

/* ATW Lightbox/Zoom */
body {
    scrollbar-gutter: stable;
}
body.overflow-hidden {
    overflow: hidden !important;
}
.atw-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important; /* Max z-index */
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    display: none; /* JS handles this */
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    cursor: zoom-out !important;
    opacity: 0;
    transition: opacity 0.3s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}
.atw-lightbox.is-active {
    display: flex !important;
    opacity: 1 !important;
}
.atw-lightbox__content {
    max-width: 94% !important;
    max-height: 94vh !important;
    position: relative !important;
    cursor: default !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    z-index: 2147483647 !important;
}
.atw-lightbox__content img {
    max-width: 100% !important;
    max-height: 85vh !important;
    border-radius: 12px !important;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7) !important;
    display: block !important;
    object-fit: contain !important;
}
.atw-lightbox__close {
    position: absolute !important;
    top: -50px !important;
    right: 0 !important;
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    z-index: 2147483647 !important;
}
.atw-lightbox__close:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: scale(1.1) !important;
}

/* Lightbox Navigation */
.atw-lightbox__nav {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    z-index: 2147483647 !important;
}
.atw-lightbox__nav:hover {
    background: rgba(255,255,255,0.25) !important;
    transform: translateY(-50%) scale(1.1) !important;
}
.atw-lightbox__nav--prev { left: 30px !important; }
.atw-lightbox__nav--next { right: 30px !important; }

.atw-lightbox__meta {
    margin-top: 20px !important;
    text-align: center !important;
    color: white !important;
    width: 100% !important;
}
.atw-lightbox__title {
    font-weight: 800 !important;
    font-size: 20px !important;
    margin-bottom: 6px !important;
    letter-spacing: -0.01em !important;
}
.atw-lightbox__desc {
    font-size: 15px !important;
    opacity: 0.7 !important;
}
.atw-lightbox__counter {
    margin-top: 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    opacity: 0.5 !important;
    letter-spacing: 0.1em !important;
}

[data-atw-zoom] {
    cursor: zoom-in !important;
}
@media (max-width: 768px) {
    .atw-lightbox__nav { width: 44px !important; height: 44px !important; }
    .atw-lightbox__nav--prev { left: 10px !important; }
    .atw-lightbox__nav--next { right: 10px !important; }
}
@media (max-width: 640px) {
    .atw-lightbox__content { max-width: 100% !important; }
    .atw-lightbox__close { top: 10px !important; right: 10px !important; background: rgba(0,0,0,0.5) !important; }
    .atw-lightbox__nav { top: auto !important; bottom: 20px !important; transform: none !important; }
    .atw-lightbox__nav:hover { transform: scale(1.1) !important; }
    .atw-lightbox__nav--prev { left: 20px !important; }
    .atw-lightbox__nav--next { right: 20px !important; }
}
