﻿/* ============================================
   Ballesta Official Website - Main Stylesheet
   Version: 1.0.0 (Phase 1 Optimized)
   Based on: v6-final design system
   Created: 2026-05-15
   ============================================ */

/* ===== CSS Variables ===== */
:root {
  --surface-midnight: #080808;
  --surface-dark: #111111;
  --surface-soft: #f5f5f7;
  --ink: #1a1a1a;
  --body-mid: #444;
  --body: #666;
  --mute: #888;
  --hairline: #e5e5e5;
  --accent-blue: #1B4A8F;
  --accent-gold: #C49A3C;
  --accent-gold-hover: #d4b24c;
  --on-dark-muted: rgba(255,255,255,.7);
  --on-dark-faint: rgba(255,255,255,.4);
  --accent-green: #22c55e;
  --canvas: #fff;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-display); color: var(--ink); background: var(--canvas); }
a { text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ===== Announcement Bar ===== */
.announcement {
  background: var(--surface-midnight);
  color: var(--on-dark-muted);
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 0;
  letter-spacing: 0.3px;
}
.announcement a { color: var(--accent-gold); }
.announcement a:hover { color: var(--accent-gold-hover); }

/* ===== Navbar ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
  height: 72px;
  display: flex;
  align-items: center;
}
nav .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .logo-img { height: 40px; width: auto; }
.nav-left { flex-shrink: 0; }
nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}
nav ul li:first-child { margin-left: 32px; }
nav ul li:last-child  { margin-right: 32px; }

/* Nav link animated underline */
.nav-link {
  position: relative;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--body-mid);
  text-decoration: none;
  padding-bottom: 4px;
  transition: color .3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
  border-radius: 1px;
  transform-origin: center;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.nav-link:hover,
.nav-link.active { color: var(--ink); }
.nav-link:hover::after,
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }

.btn-solid {
  background: var(--accent-gold);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.btn-solid:hover { background: var(--accent-gold-hover); }

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--surface-midnight);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: grayscale(20%) contrast(1.1);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(27,58,110,.15) 0%, transparent 70%),
    linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.7) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 96px 24px 64px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}


.hero-eyebrow span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: -2.5px;
  color: #fff;
  margin-bottom: 28px;
  max-width: 800px;
}
.text-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, var(--accent-gold) 30%, #ef4444 50%, var(--accent-gold) 70%, #3b82f6 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 8s ease-in-out infinite;
}
.hero p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
  color: var(--on-dark-muted);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 80px; }
.btn-ghost {
  background: transparent;
  color: #fff;
  padding: 10px 24px;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.6); }

/* Hero ghost button: starburst container */
.hero-cta .btn-ghost {
  position: relative;
  overflow: visible;
}
.hero-cta .btn-ghost .starburst-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

/* Hero stat cards */
.hero-stats {
  position: absolute;
  right: 4%;
  bottom: 8%;
  z-index: 2;
  display: none;
  gap: 16px;
}
@media (min-width: 1024px) {
  .hero-stats { display: flex; }
}
.hero-stat-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 20px 25px;
  text-align: center;
  min-width: 126px;
}
.hero-stat-card div:first-child {
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  letter-spacing: -1px;
  will-change: filter, text-shadow;
}
.plus-sign {
  display: inline-block;
  position: relative;
  will-change: transform;
}

/* Button burst glow */
.hero-cta .btn-solid.bursting {
  animation: btnBurst 2.5s ease-out forwards;
}
@keyframes btnBurst {
  0% {
    box-shadow: 0 0 0 0 rgba(196,154,60,0.6), 0 0 40px 20px rgba(255,215,80,0.3);
    transform: scale(1.05);
  }
  20% {
    box-shadow: 0 0 30px 15px rgba(196,154,60,0.4), 0 0 60px 30px rgba(255,215,80,0.15);
    transform: scale(1.03);
  }
  60% {
    box-shadow: 0 0 15px 5px rgba(196,154,60,0.15), 0 0 30px 10px rgba(255,215,80,0.05);
    transform: scale(1.01);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}
.hero-stat-card div:last-child {
  font-size: 11px;
  margin-top: 4px;
  color: var(--on-dark-faint);
  font-weight: 500;
}

/* ===== SOLUTION CARDS ===== */
.product-grid, .solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 900px) {
  .product-grid, .solutions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .product-grid, .solutions-grid { grid-template-columns: 1fr; }
}
.solution-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.solution-card .card-img {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.solution-card .card-overlay {
  display: none;
}
.solution-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.solution-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.solution-card:hover img { transform: scale(1.05); }
.solution-card .body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.solution-tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 8px;
}
.solution-card h3 {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 3px;
}
.solution-card p {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  color: var(--body-mid);
  flex: 1;
}
.solution-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-top: 20px;
  transition: gap .2s;
}
.solution-link:hover { gap: 10px; }

/* Products section - center text and add spacing */
.products {
  padding: 70px 0 80px 0;
}
.products .section-header {
  text-align: center;
  margin-bottom: 60px;
}
.products .feature-eyebrow {
  margin-bottom: 16px;
  color: var(--accent-blue);
  font-weight: 700;
}
.products .feature-title {
  margin-bottom: 20px;
  font-size: 42px;
  letter-spacing: -0.5px;
  font-weight: 800;
}
.products .feature-sub {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Why Choose Us ===== *//* ===== Why Choose Us ===== */
.why-choose {
  padding: 80px 0;
  background: var(--surface-soft);
}
.feature-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px) {
  .feature-mini-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .feature-mini-grid { grid-template-columns: repeat(6, 1fr); }
}
.feature-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 24px 16px;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all .3s ease;
}
.feature-mini-card:hover {
  border-color: var(--hairline);
  box-shadow: 0 8px 30px rgba(0,0,0,.07);
  transform: translateY(-3px);
}
.feature-icon-wrap-sm {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(27,58,110,.08), rgba(200,149,56,.08));
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon-wrap-sm img { width: 28px; height: 28px; object-fit: contain; }
.feature-mini-card h3 {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  text-align: center;
  margin-top: 8px;
}

/* ===== CTA Dark Band ===== */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 96px 0;
  text-align: center;
  background: var(--surface-dark);
}
.cta-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.cta-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(25,28,32,0.55) 0%, rgba(25,28,32,0.7) 100%);
  z-index: 1;
}
.cta-band .content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 42px;
  letter-spacing: -1.2px;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.1;
}
.cta-band p {
  color: var(--on-dark-muted);
  font-size: 18px;
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}
.video-container {
  margin-top: 40px;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
}
.video-container video {
  max-width: 700px;
  width: 100%;
  border-radius: 16px;
  display: block;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.cta-band .btn-solid {
  font-size: 15px;
  padding: 18px 44px;
}

/* ===== Projects ===== */
.projects {
  padding: 80px 0;
}
.projects-header {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 48px;
}
@media (min-width: 1024px) {
  .projects-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.sec-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 14px;
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -1.2px;
  color: var(--ink);
  line-height: 1.12;
}
.sec-sub {
  font-size: 16px;
  color: var(--body-mid);
  line-height: 1.65;
  max-width: 520px;
}
.btn-outline {
  display: inline-block;
  padding: 10px 24px;
  border: 1.5px solid var(--hairline);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s;
  align-self: flex-start;
}
@media (min-width: 1024px) {
  .btn-outline { align-self: auto; }
}
.btn-outline:hover { border-color: var(--accent-blue); }

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Successful Cases 鏃犻檺杞挱锛堟闈㈢锛?===== */
.project-carousel-wrap {
  overflow: hidden;
  width: 100%;
}
.project-carousel {
  display: flex;
  gap: 24px;
  animation: carousel-scroll 60s linear infinite;
}
.project-carousel:hover {
  animation-play-state: paused;
}
@keyframes carousel-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-5760px); }
}
/* 杞挱鍐呭崱鐗囧浐瀹氬搴︼紝涓嶆媺浼?*/
.project-carousel .case-card {
  flex: 0 0 300px;
}
/* 绉诲姩绔細闈欐€佺綉鏍?*/
@media (max-width: 767px) {
  .project-carousel-wrap { display: none; }
  .project-grid { display: grid !important; }
}
/* 妗岄潰绔細杞挱 */
@media (min-width: 768px) {
  .project-carousel-wrap { display: block; }
  .project-grid { display: none; }
}
.case-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.04);
  transition: transform .3s ease;
}
.case-card:hover { transform: translateY(-4px); }
.case-img-wrap {
  position: relative;
  overflow: hidden;
}
.case-img-wrap img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform .5s ease;
}
.case-card:hover .case-img-wrap img { transform: scale(1.04); }
.case-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  background: var(--accent-gold);
  color: var(--ink);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.case-card .body { padding: 24px; padding-top: 28px; }
.case-card h3 {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 6px;
}
.case-card .location {
  font-size: 14px;
  color: var(--mute);
}

/* Thumbnail Strip */
.thumb-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
@media (min-width: 768px) {
  .thumb-strip { grid-template-columns: repeat(6, 1fr); }
}
.thumb-strip img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: all .3s;
  border: 2px solid transparent;
}
.thumb-strip img:hover {
  transform: scale(1.05);
  border-color: var(--accent-gold);
}

/* ===== Architectural Partners ===== */
.partners {
  padding: 80px 0;
  text-align: center;
  background: var(--surface-dark);
  position: relative;
  overflow: hidden;
}
.partners-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.partners-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 35, 65, 0.70);
  z-index: 1;
}
.partners-content {
  position: relative;
  z-index: 2;
}
.partners .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.partners h2 {
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  margin-bottom: 16px;
}
.partners .sub {
  font-size: 15px;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--on-dark-muted);
}
.partner-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.arch-logo-item {
  padding: 16px 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  transition: all .3s ease;
}
.arch-logo-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.15);
  transform: translateY(-2px);
}
.arch-logo-item img {
  height: 32px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.7);
  transition: filter .3s ease;
}
.arch-logo-item:hover img {
  filter: brightness(0) invert(1) opacity(1);
}

/* ===== News Section (Light Theme) ===== */
.news-section {
  padding: 80px 0;
  background: var(--surface-light);
}
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 48px;
}
@media (min-width: 768px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}
.news-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.news-thumb {
  height: 200px;
  overflow: hidden;
}
.news-thumb img {
  width: 100%;
  height: 100%;
 object-fit: cover;
  transition: transform .5s ease;
}
.news-item:hover .news-thumb img {
  transform: scale(1.05);
}
.news-body {
  padding: 24px;
}
.news-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(27,74,143,.08);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.news-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 10px;
}
.news-body p {
  font-size: 14px;
  color: var(--body-mid);
  line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
  transition: color .2s;
}
.news-link:hover {
  color: var(--accent-gold);
}
.btn-view-all {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-blue);
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .3s ease, transform .2s ease;
}
.btn-view-all:hover {
  background: #3D5A8F;
  box-shadow: 0 0 20px rgba(196,154,60,.4), 0 0 40px rgba(196,154,60,.15);
  transform: translateY(-2px);
}

/* ===== Contact Section ===== */
.contact {
  padding: 80px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1.2fr 1fr; }
}
.contact h3 {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 10px;
}
.contact .sub {
  font-size: 15px;
  margin-bottom: 32px;
  color: var(--body-mid);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  margin-top: 8px;
  letter-spacing: 0.3px;
}
.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--hairline);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  transition: all .2s;
  background: var(--canvas);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(27,58,110,.08);
}
textarea.form-input { resize: vertical; min-height: 110px; }
.btn-dark {
  background: var(--surface-midnight);
  color: #fff;
  padding: 16px 44px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background .3s, transform .2s, box-shadow .3s;
}
.btn-dark:hover {
  background: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(27,74,143,.3);
}

/* Contact info */
.info-block {
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 20px;
}
.info-block h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 18px;
}
.info-block p {
  font-size: 14px;
  color: var(--body);
  line-height: 1.75;
  margin-bottom: 8px;
}
.info-block a { color: var(--accent-blue); font-weight: 500; }

/* ===== Footer ===== */
footer {
  background: var(--surface-midnight);
  color: var(--on-dark-muted);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 280px;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.footer-logo img { height: 55px; width: auto; }
footer .brand-desc {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.55;
  max-width: 280px;
}
.footer-cert-logo {
  display: block;
  max-width: 204px;
  width: 100%;
  height: auto;
  margin: 30px 0 0 40px;
  opacity: 0.9;
}
.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: 13px;
  color: var(--on-dark-muted);
  transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.35;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; }
}
.footer-bottom span:last-child { margin-top: 8px; }
@media (min-width: 768px) {
  .footer-bottom span:last-child { margin-top: 0; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .feature-title { font-size: 34px; }
  .cta-band h2 { font-size: 34px; }
  .sec-title { font-size: 30px; }
}
@media (max-width: 768px) {
  .hero-stats { display: none; }
  .cta-band { padding: 64px 0; }
  .cta-band h2 { font-size: 28px; }
  .sec-title { font-size: 26px; }
  .video-container { max-width: 100% !important; }
}


.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
/* ===== Nav Social Icons ===== */
.nav-social {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: #333;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.nav-social a {
  position: relative;
  animation: socialWave 5s ease-in-out infinite;
  transition: box-shadow 0.5s ease, transform 0.5s ease;
  z-index: 1;
}
.nav-social a:nth-child(1) { animation-delay: -0.1s; }
.nav-social a:nth-child(2) { animation-delay: 0.4s; }
.nav-social a:nth-child(3) { animation-delay: 0.9s; }
.nav-social a:nth-child(4) { animation-delay: 1.4s; }

/* Hover: pause wave, highlight */
.nav-social:hover a {
  animation-play-state: paused;
  box-shadow: none !important;
  transform: scale(1) !important;
}
.nav-social a:hover {
  box-shadow: 0 0 24px 6px rgba(196,154,60,0.5) !important;
  transform: scale(1.18) !important;
}

@keyframes socialWave {
  0% {
    box-shadow: none;
    transform: scale(1);
  }
  5% {
    box-shadow: 0 0 4px 1px rgba(196,154,60,0.06);
    transform: scale(1.02);
  }
  12% {
    box-shadow: 0 0 16px 4px rgba(196,154,60,0.40);
    transform: scale(1.13);
  }
  18%, 22% {
    box-shadow: 0 0 20px 5px rgba(196,154,60,0.45);
    transform: scale(1.15);
  }
  30% {
    box-shadow: 0 0 10px 2px rgba(196,154,60,0.12);
    transform: scale(1.04);
  }
  38%, 100% {
    box-shadow: none;
    transform: scale(1);
  }
}

/* ===== Footer Social Icons ===== */
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  margin-left: 50px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.footer-social a:hover {
  background: var(--accent-gold, #C3943B);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== Nav Dropdown ===== */
.nav-dropdown {
  position: relative;
}
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,.12);
  min-width: 320px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s, transform .25s;
  transform-origin: top center;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.nav-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s;
}
.nav-dropdown .dropdown-item:hover {
  background: #f5f5f7;
}
.nav-dropdown .dropdown-thumb {
  width: 72px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.nav-dropdown .dropdown-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.nav-dropdown .dropdown-text {
  display: flex;
  flex-direction: column;
}
.nav-dropdown .dropdown-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.nav-dropdown .dropdown-desc {
  font-size: 12px;
  color: var(--body);
}
.nav-dropdown .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--hairline);
  border-top: 1px solid var(--hairline);
}

/* ===== Nav Sub-dropdown (level 2 & 3) ===== */
/* Container inside dropdown-menu that has a sub-list */
.sub-root {
  position: relative;
}
.sub-list-bridge { position: absolute; left: -16px; top: 0; width: 16px; height: 100%; }

.sub-root .sub-list {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: calc(100% - 8px);
  top: -6px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  min-width: 210px;
  padding: 6px;
  z-index: 210;
  transition: visibility 0s linear .35s, opacity .2s ease;
}
.sub-root:hover .sub-list {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.sub-root .sub-menu-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #999;
  flex-shrink: 0;
}
.sub-root .sub-list::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 20px;
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

/* Sub-list items */
.sub-list .sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
  white-space: nowrap;
}
.sub-list .sub-item:hover {
  background: #f5f5f7;
}
.sub-list .sub-item .sub-thumb,
.sub-sub-list .sub-sub-item .sub-thumb {
  width: 46px;
  height: 34px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}
.sub-list .sub-item .sub-thumb img,
.sub-sub-list .sub-sub-item .sub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Third level - sub-submenu */
.sub-sub-root {
  position: relative;
}
.sub-sub-root .sub-sub-list {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: calc(100% - 8px);
  top: -6px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  min-width: 130px;
  padding: 6px;
  z-index: 220;
  transition: visibility 0s linear .35s, opacity .2s ease;
}
.sub-sub-root:hover .sub-sub-list {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.sub-sub-root .sub-sub-list::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 14px;
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.sub-sub-list .sub-sub-item {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
  white-space: nowrap;
}
.sub-sub-list .sub-sub-item:hover {
  background: #f5f5f7;
}

/* ============================================
   INFO CENTER - Article Images
   ============================================ */
.article-inline-figure {
  margin: 2rem 0;
  text-align: center;
}
.article-inline-img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
  display: inline-block;
}
.article-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: block;
}
.article-body .article-inline-img {
  background: var(--surface-light);
  padding: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ===== Footer Contact Team ===== */
.footer-contact-team {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.contact-name {
  cursor: pointer;
  font-size: 14px;
  color: rgba(255,255,255,.75);
  transition: color .2s;
  padding: 0;
  display: inline-block;
  width: fit-content;
  align-self: flex-start;
}
.contact-name:hover {
  color: #C49A3C;
}

/* ===== Contact Tooltip ===== */
.contact-tooltip {
  position: fixed;
  z-index: 10000;
  background: #1a1a1a;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  min-width: 200px;
}
.contact-tooltip .ct-tip-arrow {
  position: absolute;
  top: 18px;
  left: -7px;
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  transform: rotate(45deg);
  border-bottom: 1px solid rgba(255,255,255,.12);
  border-left: 1px solid rgba(255,255,255,.12);
}
.contact-tooltip.ct-flip-left .ct-tip-arrow {
  left: auto;
  right: -7px;
  border-bottom: none;
  border-left: none;
  border-top: 1px solid rgba(255,255,255,.12);
  border-right: 1px solid rgba(255,255,255,.12);
}
.contact-tooltip .ct-header {
  font-size: 13px;
  font-weight: 700;
  color: #C49A3C;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.contact-tooltip .ct-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  margin-bottom: 5px;
}
.contact-tooltip .ct-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.4);
}
.contact-tooltip .ct-val {
  white-space: nowrap;
}
.contact-tooltip .ct-qr-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.contact-tooltip .ct-qr-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.contact-tooltip .ct-qr-img {
  width: 120px;
  height: 120px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
}

/* ===== Overview Layout (Product Detail Pages) ===== */
.overview-layout {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  margin-top: 32px;
}
.overview-text {
  flex: 0 0 48%;
  max-width: 48%;
}
.overview-text h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
}
.overview-text ul {
  list-style: none;
  padding: 0;
}
.overview-text ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--body-mid);
}
.overview-text ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--accent-gold);
  border-radius: 50%;
}
.overview-text ul li strong {
  color: var(--ink);
}
.overview-images {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.overview-images img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* Finishes dropdown - single column, same as other menus */
.finishes-menu {
  min-width: 320px !important;
  padding: 8px !important;
}
.finishes-menu .dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 10px 12px !important;
}
.finishes-menu .dropdown-thumb {
  width: 72px !important;
  height: 52px !important;
  flex-shrink: 0;
}
.finishes-menu .dropdown-text {
  display: flex;
  flex-direction: column;
}
.finishes-menu .dropdown-title {
  font-size: 14px !important;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.finishes-menu .dropdown-desc {
  font-size: 12px !important;
  color: var(--body);
}

/* ============================================
   MOBILE OPTIMIZATION - Ballesta Website
   Mobile-first responsive improvements
   ============================================ */

/* ===== 1. FIXED BOTTOM BAR (WhatsApp + Call + Inquiry) ===== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1B4A8F 0%, #0d2a52 100%);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-bar a,
.mobile-bottom-bar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    background: transparent;
    border: none;
    cursor: pointer;
    min-width: 70px;
}

.mobile-bottom-bar a i,
.mobile-bottom-bar button i {
    font-size: 22px;
    margin-bottom: 4px;
}

.mobile-bottom-bar .btn-inquiry {
    background: #C49A3C;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
}

.mobile-bottom-bar .btn-inquiry i {
    margin-right: 6px;
    font-size: 16px;
}

/* ===== 2. PRODUCT/SOLUTION CARDS - Mobile Single Column ===== */
@media (max-width: 768px) {
    /* Product grid single column */
    .product-grid,
    .solutions-grid,
    .category-grid,
    .model-grid,
    .sub-cat-grid,
    .project-grid,
    .article-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 16px !important;
    }
    
    .product-card,
    .solution-card,
    .category-card,
    .model-card,
    .sub-cat-card,
    .project-card,
    .article-card {
        width: 100% !important;
        margin: 0 !important;
        flex: none !important;
    }
    
    /* Card image optimization */
    .product-card img,
    .solution-card img,
    .category-card img,
    .model-card img,
    .sub-cat-card img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/10 !important;
        object-fit: cover !important;
    }
    
    /* Card content padding */
    .product-card .card-content,
    .solution-card .card-content,
    .category-card .card-content {
        padding: 16px !important;
    }
    
    /* Card title size */
    .product-card h3,
    .solution-card h3,
    .category-card h3 {
        font-size: 16px !important;
        line-height: 1.3 !important;
    }
    
    /* Card description */
    .product-card p,
    .solution-card p,
    .category-card p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        -webkit-line-clamp: 2 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    /* Arrow button */
    .card-arrow,
    .card-link {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        color: #1B4A8F;
        font-size: 14px;
        font-weight: 600;
        margin-top: 10px;
    }
}

/* ===== 3. TEXT TYPOGRAPHY OPTIMIZATION ===== */
@media (max-width: 768px) {
    /* Body text */
    body {
        font-size: 15px !important;
        line-height: 1.65 !important;
    }
    
    /* Paragraphs */
    p, .body-text {
        font-size: 15px !important;
        line-height: 1.7 !important;
        margin-bottom: 16px !important;
    }
    
    /* Section titles */
    .section-title,
    h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
    }
    
    /* Sub-titles */
    h3 {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }
    
    /* Hero text */
    .hero h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }
    
    .hero p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    /* Long paragraphs - truncate with ellipsis for cards */
    .card p,
    .overview-text p,
    .advantages-text p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Lists */
    ul, ol {
        padding-left: 20px !important;
    }
    
    li {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 8px !important;
    }
}

/* ===== 4. TOUCH-FRIENDLY BUTTONS ===== */
@media (max-width: 768px) {
    /* All buttons minimum 48px height */
    .btn,
    button,
    .cta-button,
    .primary-button,
    input[type="submit"],
    .nav-cta {
        min-height: 48px !important;
        padding: 14px 24px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
    }
    
    /* Form inputs */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        min-height: 48px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        width: 100% !important;
    }
    
    textarea {
        min-height: 120px !important;
    }
    
    /* Links */
    a {
        padding: 8px 0;
    }
}

/* ===== 5. NAVIGATION HAMBURGER ===== */
@media (max-width: 768px) {
    /* Hamburger menu improvements */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        cursor: pointer;
        padding: 10px;
    }
    
    .hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background: #333;
        margin: 3px 0;
        transition: all 0.3s;
    }
    
    /* Mobile menu dropdown */
    .nav-dropdown,
    .mobile-menu,
    .mobile-nav {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Menu items */
    .nav-dropdown a,
    .mobile-menu a,
    .mobile-nav a {
        padding: 14px 16px !important;
        border-bottom: 1px solid #eee;
        font-size: 15px;
    }
    
    /* Submenu items */
    .nav-dropdown .submenu a,
    .mobile-menu .submenu a {
        padding-left: 32px !important;
        font-size: 14px;
        color: #666;
    }
}

/* ===== 6. HERO SECTION MOBILE ===== */
@media (max-width: 768px) {
    .hero {
        min-height: 50vh !important;
        padding: 60px 16px 80px !important;
    }
    
    .hero h1 {
        font-size: 28px !important;
        margin-bottom: 16px !important;
    }
    
    .hero p {
        font-size: 15px !important;
        margin-bottom: 24px !important;
    }
    
    .hero .btn {
        width: 100% !important;
        max-width: 300px;
        margin: 0 auto;
        display: block;
        text-align: center;
    }
}

/* ===== 7. SECTION SPACING ===== */
@media (max-width: 768px) {
    section {
        padding: 48px 0 !important;
    }
    
    .container {
        padding: 0 16px !important;
    }
    
    .section-header {
        margin-bottom: 24px !important;
        padding: 0 16px;
    }
    
    .section-header h2 {
        font-size: 22px !important;
    }
    
    .section-header p {
        font-size: 14px !important;
    }
}

/* ===== 8. FAQ ACCORDION ===== */
@media (max-width: 768px) {
    .faq-item {
        margin-bottom: 12px !important;
    }
    
    .faq-question {
        padding: 16px !important;
        font-size: 15px !important;
        line-height: 1.4 !important;
    }
    
    .faq-answer {
        padding: 0 16px 16px !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

/* ===== 9. TABLE RESPONSIVE ===== */
@media (max-width: 768px) {
    table {
        font-size: 13px !important;
    }
    
    th, td {
        padding: 10px 8px !important;
    }
    
    /* Scrollable table */
    .table-wrapper,
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== 10. IMAGE LAZY LOADING ===== */
@media (max-width: 768px) {
    img {
        loading: lazy;
    }
}

/* ===== 11. STATS COUNTER ===== */
@media (max-width: 768px) {
    .stats-grid,
    .stats-row,
    .stat-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    
    .stat-item,
    .stat-card {
        text-align: center !important;
        padding: 16px !important;
    }
    
    .stat-number {
        font-size: 28px !important;
    }
    
    .stat-label {
        font-size: 12px !important;
    }
}

/* ===== 12. CONTACT SECTION ===== */
@media (max-width: 768px) {
    .contact-form {
        padding: 24px 16px !important;
    }
    
    .contact-form h3 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .form-group {
        margin-bottom: 16px !important;
    }
    
    .form-row {
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .contact-info {
        padding: 24px 16px !important;
        margin-top: 24px !important;
    }
}

/* ===== 13. FOOTER ===== */
@media (max-width: 768px) {
    footer {
        padding-bottom: 80px !important; /* Space for fixed bottom bar */
    }
    
    .footer-grid,
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    
    .footer-col {
        padding: 0 16px !important;
    }
    
    .footer-col h4 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    .footer-col a {
        font-size: 14px !important;
        padding: 8px 0 !important;
        display: block;
    }
}

/* ===== 14. SPECS TABLE MOBILE ===== */
@media (max-width: 768px) {
    .specs-table {
        font-size: 13px !important;
    }
    
    .specs-table th {
        font-size: 12px !important;
        padding: 10px 8px !important;
    }
    
    .specs-table td {
        padding: 10px 8px !important;
    }
}

/* ===== 15. GALLERY MOBILE ===== */
@media (max-width: 768px) {
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 8px !important;
    }
    
    .gallery-item {
        aspect-ratio: 1 !important;
    }
}

/* ===== 16. VIDEO CARDS MOBILE ===== */
@media (max-width: 768px) {
    .video-grid,
    .video-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 16px !important;
    }
    
    .video-card {
        width: 100% !important;
    }
    
    .video-card video,
    .video-card .video-thumbnail {
        aspect-ratio: 16/9 !important;
    }
}

/* ===== 17. OVERFLOW BODY SCROLL LOCK ===== */
body.menu-open {
    overflow: hidden;
}

/* ===== 18. CTA SECTION MOBILE ===== */
@media (max-width: 768px) {
    .cta-section {
        padding: 48px 16px !important;
        text-align: center !important;
    }
    
    .cta-section h2 {
        font-size: 22px !important;
    }
    
    .cta-section p {
        font-size: 14px !important;
    }
    
    .cta-section .btn {
        width: 100% !important;
        max-width: 280px;
    }
}


/* ============================================
   MOBILE OPTIMIZATION - Ballesta Website
   ============================================ */

/* FIXED BOTTOM BAR - Mobile Only */
@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: linear-gradient(135deg, #1B4A8F 0%, #0d2a52 100%) !important;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
        z-index: 99999 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3) !important;
        justify-content: space-around !important;
        align-items: center !important;
    }

    .mobile-bottom-bar a,
    .mobile-bottom-bar button {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: #fff !important;
        text-decoration: none !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        padding: 6px 10px !important;
        border-radius: 8px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        min-width: 60px !important;
    }

    .mobile-bottom-bar a i,
    .mobile-bottom-bar button i {
        font-size: 20px !important;
        margin-bottom: 3px !important;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-bar {
        display: none !important;
    }
}

/* PRODUCT CARDS - Single Column Mobile */
@media (max-width: 768px) {
    .product-grid,
    .solutions-grid,
    .category-grid,
    .model-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 16px !important;
    }
    
    .product-card,
    .solution-card,
    .category-card,
    .model-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: none !important;
    }
    
    .product-card img,
    .solution-card img,
    .category-card img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/10 !important;
        object-fit: cover !important;
    }
}

/* TEXT TYPOGRAPHY */
@media (max-width: 768px) {
    body {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    p {
        font-size: 15px !important;
        line-height: 1.7 !important;
    }
    
    h1 { font-size: 26px !important; }
    h2 { font-size: 22px !important; }
    h3 { font-size: 18px !important; }
}

/* TOUCH FRIENDLY */
@media (max-width: 768px) {
    .btn, button, input[type="submit"] {
        min-height: 48px !important;
        padding: 14px 24px !important;
    }
    
    input, textarea, select {
        min-height: 48px !important;
        font-size: 16px !important;
    }
}

/* HERO MOBILE */
@media (max-width: 768px) {
    .hero {
        min-height: 50vh !important;
        padding: 60px 16px !important;
    }
    
    .hero h1 {
        font-size: 26px !important;
        line-height: 1.2 !important;
    }
}

/* SECTION SPACING */
@media (max-width: 768px) {
    section {
        padding: 40px 0 !important;
    }
    
    .container {
        padding: 0 16px !important;
    }
}

/* FOOTER PADDING FOR BOTTOM BAR */
@media (max-width: 768px) {
    footer {
        padding-bottom: 80px !important;
    }
}



/* ===============================================
   HAMBURGER MOBILE NAV
   =============================================== */
@media (max-width: 768px) {
  nav ul { display: none !important; }
  nav .nav-right { display: none !important; }

  .hamburger-btn {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1001;
    position: relative;
  }
  .hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    margin: 3px 0;
    transition: transform .3s, opacity .3s;
    border-radius: 2px;
  }
  .hamburger-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-btn.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
@media (min-width: 769px) {
  .hamburger-btn { display: none !important; }
  .mobile-overlay { display: none !important; }
  .mobile-menu-panel { display: none !important; }
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.4);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.mobile-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
  width: 82vw;
  max-width: 320px;
  background: #fff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 80px 20px 40px;
  box-shadow: -4px 0 24px rgba(0,0,0,.08);
}
.mobile-menu-panel.open { transform: translateX(0); }

.mobile-menu-panel .mm-item {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu-panel .mm-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s ease;
}
.mobile-menu-panel .mm-sub.open { max-height: 800px; }
.mobile-menu-panel .mm-sub .mm-item {
  padding: 10px 0 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body-mid);
  border-bottom: 1px solid #f0f0f0;
}
.mobile-menu-panel .mm-sub .mm-item:last-child { border-bottom: none; }
.mobile-menu-panel .mm-has-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.mm-arrow {
  font-size: 12px;
  color: var(--mute);
  transition: transform .3s;
}
.mm-arrow.open { transform: rotate(90deg); }

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}


/* ===============================================
   MOBILE TEXT REDUCTION & SPACING
   =============================================== */
@media (max-width: 768px) {
  /* Section descriptions hidden on mobile (users scan, don't read) */
  .sec-sub { display: none !important; }

  /* Hero desc reduced */
  .hero-desc { font-size: 14px !important; }

  /* Feature card descriptions truncated */
  .feature-card p { font-size: 13px !important; }

  /* Increase section breathing room */
  section { padding: 56px 0 !important; }

  /* Card spacing */
  .feature-card { padding: 24px 20px !important; }
  .feature-card .card-icon { font-size: 26px !important; margin-bottom: 10px !important; }
  .feature-card h3 { font-size: 16px !important; margin-bottom: 6px !important; }

  /* Tighter hero padding */
  .page-hero { padding: 80px 16px 40px !important; min-height: auto !important; }
  .page-hero h1 { font-size: 26px !important; }
}


/* ===============================================
   PREMIUM MOBILE BOTTOM BAR
   =============================================== */
@media (max-width: 768px) {
  .mobile-bottom-bar {
    background: rgba(255,255,255,.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 -1px 12px rgba(0,0,0,.06) !important;
    border-top: 1px solid var(--hairline) !important;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom)) !important;
  }

  .mobile-bottom-bar a,
  .mobile-bottom-bar button {
    color: var(--body-mid) !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    min-width: 48px !important;
    border-radius: 6px !important;
  }

  .mobile-bottom-bar a i,
  .mobile-bottom-bar button i {
    font-size: 18px !important;
    color: var(--accent-blue) !important;
    margin-bottom: 2px !important;
  }

  .mobile-bottom-bar a:active,
  .mobile-bottom-bar button:active {
    background: rgba(0,0,0,.04) !important;
  }
}


/* ===============================================
   MOBILE TABLE RESPONSIVE
   =============================================== */
@media (max-width: 768px) {
  .specs-table { font-size: 12px !important; }
  .specs-table th,
  .specs-table td { padding: 8px 6px !important; word-break: break-word; }

  /* Gallery grid tighter */
  .gallery-grid { gap: 6px !important; padding: 0 6px !important; }
}


/* ===============================================
   MOBILE FOOTER
   =============================================== */
@media (max-width: 768px) {
  .footer-grid { padding: 0 16px; }
  footer .footer-col-title { font-size: 15px !important; }

  /* Hide product/solution/project columns, keep brand + contact */
  .footer-grid > div:nth-child(2),
  .footer-grid > div:nth-child(3),
  .footer-grid > div:nth-child(4) {
    display: none !important;
  }

  /* Brand column takes full width */
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
    text-align: center;
  }

  /* Contact column takes full width */
  .footer-grid > div:last-child {
    grid-column: 1 / -1;
  }

  /* Center brand elements */
  .footer-logo { justify-content: center; }
  .footer-social { justify-content: center; }
}




/* ===============================================
   MOBILE CERT CARDS & VIDEO OVERRIDES
   =============================================== */
@media (max-width: 768px) {
  /* ISO cert cards: stack vertically */
  #certifications > div > div:nth-child(2) {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  #certifications .sec-sub { display: none !important; }
  /* Hide description text inside cert cards */
  #certifications p[style*="color:var(--body-mid)"] { display: none !important; }
  #certifications div[style*="padding:16px 20px 20px"] p { display: none !important; }
}




/* ===============================================
   MOBILE OVERFLOW SAFEGUARDS
   =============================================== */
@media (max-width: 768px) {
  /* Prevent any element from causing horizontal overflow */
  img, video, iframe, table, .container, div[style*="width"] {
    max-width: 100% !important;
    height: auto !important;
  }
  body { overflow-x: hidden; }

  /* Team grid: 2 columns on mobile, smaller avatars */
  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-top: 24px !important;
  }
  .team-card .avatar {
    width: 90px !important;
    height: 90px !important;
  }
  .team-card h4 { font-size: 13px !important; }
  .team-card .role { font-size: 11px !important; }

  /* Fix specs-table min-width overflow */
  .specs-table { min-width: auto !important; }
}














