@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Share+Tech+Mono&display=swap');

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

:root {
  /* Ultra-Premium Light Industrial Theme */
  --primary: #041f42; /* Very deep tech blue */
  --primary-light: #e6f0fa;
  --secondary: #0066cc; /* Crisp, electric blue */
  --accent: #ff4500; /* Intense, pure industrial orange */
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --bg-main: #fcfcfc;
  --surface: #ffffff;
  
  --border-color: rgba(15, 23, 42, 0.08);
  
  /* Advanced Glassmorphism & Depth */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.03);
  
  /* Next-Gen Shadows (Stripe/Apple Inspired) */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.03), 0 4px 6px -2px rgba(0,0,0,0.02);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.08);
  --shadow-hover: 0 30px 60px -12px rgba(0, 102, 204, 0.15);
  
  --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography Masterclass */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(3.5rem, 8vw, 6rem); }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -0.02em; }
p { margin-bottom: 1.5rem; color: var(--text-muted); font-size: 1.15rem; font-weight: 300;}
.tech-font { font-family: 'Share Tech Mono', monospace; font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase;}

/* Grid & Layout */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 2.5rem; }
.section { padding: 10rem 0; position: relative; }


.text-center { text-align: center; }

/* Interactive Header */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 10000;
  background: var(--glass-bg); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.site-header.hide { transform: translateY(-100%); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; height: 90px; }

.logo { font-size: 1.75rem; font-weight: 900; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 0.2rem; letter-spacing: -0.05em;}
.logo span { color: var(--secondary); font-weight: 300; }

.nav-links { display: flex; gap: 1.25rem; align-items: center; margin-left: auto; }
.nav-link { color: var(--primary); font-weight: 500; text-decoration: none; font-size: 1rem; position: relative; overflow: hidden; padding-bottom: 4px;}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
  background-color: var(--secondary);
  transform: translateX(-101%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after { transform: translateX(0); }

/* Dropdown Navigation */
.dropdown { position: relative; display: flex; align-items: center; height: 100%; }
.dropdown > a { color: var(--primary); font-weight: 500; text-decoration: none; font-size: 1rem; cursor: pointer; transition: color 0.3s; }
.dropdown:hover > a { color: var(--secondary); }
.dropdown-menu { 
  position: absolute; top: 120%; left: -1rem; background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  min-width: 220px; padding: 0.5rem; border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08); border: 1px solid var(--glass-border);
  opacity: 0; visibility: hidden; transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); list-style: none; z-index: 1000;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); top: 100%; }
.dropdown-menu li { margin-bottom: 2px; }
.dropdown-menu a { 
  display: block; padding: 0.75rem 1rem; color: var(--text-main);
  text-decoration: none; font-size: 0.95rem; font-weight: 600;
  border-radius: 8px; transition: all 0.2s ease;
}
.dropdown-menu a:hover { background: rgba(0, 102, 204, 0.05); color: var(--secondary); transform: translateX(5px); }

/* Language Switcher */
.lang-switcher { display: flex; gap: 0.5rem; border-left: 1px solid var(--border-color); padding-left: 1.5rem; margin-left: 1rem;}
.lang-btn { text-decoration: none; font-size: 0.85rem; font-weight: 700; padding: 0.4rem 0.6rem; border-radius: 6px; color: var(--text-muted); transition: var(--transition-fast); }
.lang-btn.active, .lang-btn:hover { background-color: var(--primary); color: white; }

/* Russian Language Header Optimization (Overflow Fix) */
html[lang="ru"] .nav-links { gap: 0.75rem; }
html[lang="ru"] .nav-link, html[lang="ru"] .dropdown > a { font-size: 0.9rem; }
html[lang="ru"] .site-header .btn { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
html[lang="ru"] .lang-switcher { padding-left: 0.75rem; margin-left: 0.5rem; }

/* Advanced Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 2.5rem; border-radius: 50px; font-weight: 600; cursor: pointer;
  transition: var(--transition); border: none; font-size: 1.1rem; gap: 0.75rem;
  text-decoration: none; position: relative; overflow: hidden; white-space: nowrap;
}
.btn::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%); transition: 0.6s;
}
.btn:hover::before { transform: translateX(100%); }

.btn-primary { background-color: var(--primary); color: white; box-shadow: 0 10px 20px -5px rgba(4, 31, 66, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 25px -5px rgba(4, 31, 66, 0.4); }

.btn-accent { background-color: var(--accent); color: white; box-shadow: 0 10px 20px -5px rgba(255, 69, 0, 0.3); }
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 15px 25px -5px rgba(255, 69, 0, 0.4); }
.hero {
  padding: 16rem 0 10rem;
  position: relative;
  overflow: hidden;
}

/* Base container for the background elements */
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #030712; /* Deepest industrial slate */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: -2;
  box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.9);
}

/* Subtle Industrial Fabric / Carbon Weave Texture */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.4) 0px, rgba(0, 0, 0, 0.4) 2px, transparent 2px, transparent 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.4) 0px, rgba(0, 0, 0, 0.4) 2px, transparent 2px, transparent 4px);
  z-index: -2;
  opacity: 0.4;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Highly Polished Stainless Steel Light Sweep */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 255, 255, 0.03) 47%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.03) 53%,
    transparent 58%,
    transparent 100%
  );
  background-size: 200% 200%;
  animation: steelSweep 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: color-dodge;
}

/* Majestic Kinetic Blueprint Grid */
.grid-overlay {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(to right, rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  z-index: -1;
  animation: gridBreathe 24s ease-in-out infinite alternate;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

/* +1000°C Thermal Core */
.hero-flare {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 110%, 
    rgba(255, 255, 255, 0.8) 0%,     /* White hot core */
    rgba(253, 224, 71, 0.5) 15%,     /* Yellow hot */
    rgba(234, 88, 12, 0.3) 35%,      /* Intense orange */
    rgba(153, 27, 27, 0.15) 55%,     /* Cherry red */
    transparent 75%
  );
  animation: corePulse 5s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

/* Layer 1: Floating High-Temperature Embers (Large & Slow) */
.hero-flare::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 
    12vw 15vh 4px 2px #f97316,
    28vw 45vh 5px 3px #fef08a,
    42vw 25vh 3px 1px #ef4444,
    58vw 65vh 6px 2px #ea580c,
    74vw 35vh 4px 2px #facc15,
    88vw 55vh 5px 2px #dc2626,
    95vw 80vh 3px 1px #f97316,
    5vw 70vh 5px 3px #fef08a,
    50vw 10vh 4px 1px #ea580c,
    80vw 20vh 3px 1px #ef4444;
  animation: floatSparksPrimary 16s linear infinite;
  opacity: 0;
  z-index: 1;
}

/* Layer 2: Floating High-Temperature Embers (Small & Fast Parallax) */
.hero-flare::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 
    18vw 80vh 2px 1px #fef08a,
    33vw 20vh 3px 2px #ea580c,
    48vw 90vh 1px 1px #ffffff,
    63vw 40vh 2px 1px #f97316,
    78vw 70vh 4px 2px #ef4444,
    92vw 10vh 2px 1px #facc15,
    22vw 60vh 3px 1px #ea580c,
    68vw 85vh 2px 1px #fef08a;
  animation: floatSparksSecondary 12s linear infinite;
  opacity: 0;
  z-index: 1;
}

.hero h1, .hero p { color: #f8fafc !important; position: relative; z-index: 5; }
.hero .badge { background: rgba(59, 130, 246, 0.1) !important; color: #60a5fa !important; border-color: rgba(59, 130, 246, 0.2) !important; text-shadow: 0 0 10px rgba(59, 130, 246, 0.2); position: relative; z-index: 5;}

/* --- Gemini V2 Keyframes --- */
@keyframes steelSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}
@keyframes gridBreathe {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.03) translate(-1.5%, -1.5%); }
}
@keyframes corePulse {
  0% { opacity: 0.75; }
  100% { opacity: 1; }
}
@keyframes floatSparksPrimary {
  0% { transform: translateY(10vh); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(-110vh); opacity: 0; }
}
@keyframes floatSparksSecondary {
  0% { transform: translateY(5vh); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-120vh); opacity: 0; }
}

.badge {
  display: inline-block; padding: 0.5rem 1.2rem; background: rgba(0, 102, 204, 0.08);
  color: var(--secondary); border-radius: 50px; font-weight: 700; font-size: 0.85rem;
  margin-bottom: 2rem; border: 1px solid rgba(0, 102, 204, 0.15); letter-spacing: 0.1em;
}

/* Jaw-dropping Text Reveal */
.reveal-text {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}
.reveal-text span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-text.visible span { transform: translateY(0); }

/* 3D Product Cards */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 3rem; margin-top: 5rem;
}
.card-3d-wrap { display: block; }
.card-3d {
  background: var(--surface); border-radius: 20px; padding: 3rem;
  box-shadow: var(--shadow-md); border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; position: relative; overflow: hidden;
}
.card-3d:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog-tint { transition: opacity 0.4s ease; pointer-events: none; }
.card-3d:hover .blog-tint { opacity: 0 !important; }
.card-3d img { width: 100%; border-radius: 12px; margin-bottom: 2rem; }
.card-3d h3 { font-size: 2rem; }
.card-3d p { line-height: 1.6; }
.tech-spec {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border-color); padding-top: 1.25rem; margin-top: auto;
  font-size: 0.9rem; font-family: 'Share Tech Mono', monospace;
  letter-spacing: 1.5px; color: var(--secondary);
}
.tech-spec strong {
  background: linear-gradient(135deg, rgba(0,102,204,0.08), rgba(0,102,204,0.02));
  padding: 0.4rem 1rem; border-radius: 6px; font-size: 1rem;
  color: var(--primary); border: 1px solid rgba(0,102,204,0.12);
}

/* Interactive Layers Section */
.layers-container {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: center;
}
.layer-image-container { position: relative; }
.layer-image-container img { border-radius: 24px; box-shadow: var(--shadow-lg); width: 100%; }
.layer-hotspot {
  position: absolute; width: 30px; height: 30px; background: var(--secondary);
  border-radius: 50%; border: 4px solid white; box-shadow: 0 0 20px rgba(0,102,204,0.5);
  cursor: pointer; transition: var(--transition-fast); z-index: 50; 
  touch-action: manipulation;
}
.layer-hotspot::after {
  content: ''; position: absolute; top: -15px; left: -15px; right: -15px; bottom: -15px;
  border-radius: 50%; background: transparent; z-index: -1;
}
.layer-hotspot:active { transform: scale(1.3); background: var(--accent); }
.layer-hotspot::before {
  content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 50%; border: 2px solid var(--secondary); animation: pulse 2s infinite;
}
@keyframes pulse { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

.layer-info-box {
  background: white; padding: 3rem; border-radius: 24px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color); position: relative;
}
.layer-info-box h3 { font-size: 2.5rem; color: var(--secondary); margin-bottom: 0.5rem;}
.layer-info-box .subtitle { font-family: 'Share Tech Mono'; color: var(--text-muted); margin-bottom: 2rem; display: block;}

/* Premium Accents */
.accent-line { width: 60px; height: 4px; background: var(--secondary); margin: 2rem 0; border-radius: 2px;}
.accent-line.center { margin: 2rem auto; }

/* Scroll Anim Classes */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* Certifications */
.cert-grid { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 3rem; margin-top: 5rem; padding-top: 5rem; border-top: 1px solid var(--border-color);}
.cert-item { text-align: center; filter: grayscale(100%); opacity: 0.5; transition: var(--transition); }
.cert-item:hover { filter: grayscale(0%); opacity: 1; transform: translateY(-5px); }
.cert-item h4 { font-size: 2rem; margin-bottom: 0; color: #000;}
.cert-item p { font-family: 'Share Tech Mono'; font-size: 0.85rem; margin-top: 0; transform: translateY(8px); letter-spacing: 1px;}

/* Document Grid */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.doc-card { 
  display: flex; align-items: flex-start; gap: 1.5rem; padding: 2rem; 
  background: white; border-radius: 16px; border: 1px solid var(--border-color);
  text-decoration: none; color: inherit; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.doc-card:hover { transform: translateY(-5px); border-color: var(--secondary); box-shadow: var(--shadow-hover); }
.doc-icon { 
  width: 60px; height: 60px; background: var(--primary-light); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: var(--secondary); flex-shrink: 0;
}
.doc-card h4 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.doc-card p { font-size: 0.9rem; margin-bottom: 0; }

/* Footer */
.site-footer { background: var(--primary); color: white; padding: 6rem 0 3rem; margin-top: 6rem;}
.site-footer h4 { color: white; margin-bottom: 2rem; font-size: 1.5rem;}
.site-footer p { color: rgba(255,255,255,0.6); }
.site-footer img { height: 80px !important; width: auto; margin-bottom: 2rem; transition: transform 0.3s; }
.site-footer img:hover { transform: scale(1.05); }
.footer-link { color: rgba(255,255,255,0.6); text-decoration: none; transition: var(--transition-fast); display: block; margin-bottom: 1rem;}

.footer-link:hover { color: white; transform: translateX(5px); }
.footer-bottom { text-align: center; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 4rem; color: rgba(255,255,255,0.4); font-size: 0.9rem;}

/* Premium FAQ Accordion */
.faq-section { background-color: var(--bg-main); padding-top: 2rem; padding-bottom: 6rem; border-top: 1px solid var(--border-color); }
.faq-container { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.faq-item:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.5rem 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
  outline: none;
}
.faq-question:hover { color: var(--secondary); }
.faq-icon {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--secondary);
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px;
}
.faq-icon::before { top: 11px; left: 4px; width: 16px; height: 2px; }
.faq-icon::after { top: 4px; left: 11px; width: 2px; height: 16px; }
.faq-item.active .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-item.active .faq-question { color: var(--secondary); padding-bottom: 0.5rem; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}
.faq-answer-inner {
  padding: 0 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .layers-container { grid-template-columns: 1fr; }
  .layer-image-container img { max-height: 500px; object-fit: cover; }
}
@media (max-width: 768px) {
  .site-header .nav-links { display: flex; }
  h1 { font-size: 3rem; }
  .section { padding: 6rem 0; }
}


/* Mobile Navigation & Toggle Enhancement */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
}
.mobile-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    border-radius: 3px;
}
@media (max-width: 992px) {
    .mobile-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 100%; height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 999;
        gap: 2rem;
    }
    .nav-links a { font-size: 1.5rem; }
    .nav-links.active { right: 0; }
    .mobile-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    .header-btn { display: none; }
}

/* Interactive Language Dropdown CSS */
.lang-selector { position: relative; }
.lang-dropdown { 
    display: none; position: absolute; top: 100%; right: 0; 
    margin-top: 0; transform: translateY(8px); background: var(--surface); border: 1px solid var(--border-color); 
    border-radius: 8px; box-shadow: var(--shadow-md); overflow: hidden; 
    flex-direction: column; min-width: 140px; z-index: 1000;
}

/* Hover Bridge for Dropdown */
.lang-selector::after {
    content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 20px; z-index: 999;
}
.lang-selector:hover .lang-dropdown, .lang-selector.active .lang-dropdown { 
    display: flex; 
    animation: fadeInDown 0.15s ease-out forwards;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(0px); }
    to { opacity: 1; transform: translateY(8px); }
}

.lang-dropdown a { 
    display:flex; align-items:center; gap:0.75rem; padding: 0.75rem 1rem; 
    color: var(--text-main); text-decoration: none; transition: background 0.2s; font-weight: 600; font-size: 0.9rem;
}
.lang-dropdown a:hover { background: var(--bg-main); color: var(--primary); }
.lang-btn {
    display:flex; align-items:center; gap:0.5rem; 
    background: rgba(255,255,255,0.05); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2); 
    padding: 0.5rem 1.25rem; border-radius: 8px; cursor: pointer; color: white; font-weight: 600;
    transition: all 0.3s;
}
.lang-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }

/* Override for non-hero pages (like blogs.html) where header background is light */
body[data-page="blogs"] .lang-btn, body[data-page="projects"] .lang-btn {
    background: var(--surface); border: 1px solid var(--border-color); color: var(--text-main);
}

/* ==========================================================================
   ADVANCED RESPONSIVE ARCHITECTURE
   ========================================================================== */

/* 1. Global Layout & Container Scaling */
@media (max-width: 1400px) {
    .container { max-width: 1200px; padding: 0 2rem; }
}

@media (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 1.5rem; }
    .section { padding: 6rem 0; }
    
    /* Responsive Grid Scaling for Inline Styles - Catching multiple variations */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: repeat(2, 1fr)"],
    [style*="grid-template-columns:repeat(2,1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    
    [style*="grid-template-columns: repeat(4, 1fr)"],
    [style*="grid-template-columns:repeat(4, 1fr)"],
    [style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    .hero { padding: 12rem 0 6rem; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .section { padding: 4rem 0; }
    
    h1 { font-size: clamp(2.2rem, 10vw, 3.2rem) !important; }
    h2 { font-size: clamp(1.8rem, 8vw, 2.2rem) !important; }
    h3 { font-size: 1.4rem !important; }

    /* Force ALL hardcoded grids to stack on mobile */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Header & Mobile Menu Premium Polish */
    .site-header .container { height: 75px; }
    .logo img { height: 35px !important; }
    
    .nav-links {
        padding-top: 6rem !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    .nav-link { 
        font-size: 1.4rem !important; 
        width: 100%; 
        text-align: center; 
        padding: 0.5rem 0 !important;
        color: var(--primary) !important;
    }
    .lang-selector { 
        margin: 1.5rem 0 !important; 
        width: 100%; 
        display: flex; 
        justify-content: center; 
    }
    .lang-btn {
        color: var(--primary) !important;
        border-color: var(--border-color) !important;
    }
    .site-header .btn { 
        margin: 1rem auto 0 !important; 
        width: 80% !important; 
        max-width: 300px;
    }

    .layers-container { 
        grid-template-columns: 1fr !important; 
        gap: 2.5rem !important; 
        margin-top: 2rem !important;
    }
    .layer-image-container { order: 1; }
    .layer-info-box { order: 2; padding: 2rem !important; margin-top: 1rem; border-radius: 16px !important; }
    .layer-info-box h3 { font-size: 1.6rem !important; }

    [id="kurumsal"] [style*="display: flex; gap: 3rem"],
    [style*="display: flex; gap: 3rem"],
    [style*="display: flex; gap: 2rem"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: center;
        text-align: center;
    }
    
    .products-grid, .project-grid, .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    #pro-contact-form [style*="display: grid"],
    form [style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .site-footer { padding: 4rem 0 2rem; }
    .site-footer img { height: 60px !important; }
    .site-footer [style*="display: flex; justify-content: center"] {
        flex-direction: column !important;
        align-items: center;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 1.25rem; }
    .hero { padding: 9rem 0 4rem; }
    .hero h1 { font-size: 2.1rem !important; }
    .hero h1 br { display: none; }
    .hero p { font-size: 1.05rem !important; }
    .btn { padding: 0.8rem 1.6rem; font-size: 1rem; width: 100%; border-radius: 12px !important; }
    
    .hero [style*="display: flex"],
    [id="dokumanlar"] [style*="display: flex"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    [style*="display: flex; gap: 1.5rem"],
    [style*="display: flex; gap: 1.25rem"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }
}

/* Universal Prevention & Scaling */
body, html {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    max-width: 100vw;
}

img, video, iframe, svg {
    max-width: 100% !important;
    height: auto;
}

/* Fix for possible floating point rounding issues */
* { box-sizing: border-box; }

.mobile-toggle.active span { background-color: var(--secondary); }
