/* ============================================
   OBERSOL — Soluciones Energéticas y Constructivas
   Stylesheet — Brand Identity Oficial
   Colores: #007b78 (Teal) · #f4b400 (Dorado) · #f9f9f6 (Fondo)
   Fuente: Quantify + Inter
   ============================================ */

@font-face {
  font-family: 'Quantify';
  src: url('/assets/fonts/Quantify.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@400;500;600;700&display=swap');

/* --- CSS Variables — Paleta Oficial Obersol --- */
:root {
  /* Colores oficiales */
  --brand-teal:    #007b78;
  --brand-gold:    #f4b400;
  --brand-bg:      #f9f9f6;
  --brand-dark:    #003d3b;     /* teal oscuro para fondos dark */
  --brand-darker:  #002928;
  --brand-darkest: #001a19;

  /* Derivados teal */
  --teal-light:    #009e9a;
  --teal-muted:    rgba(0,123,120,0.12);
  --teal-border:   rgba(0,123,120,0.2);
  --teal-glow:     0 0 40px rgba(0,123,120,0.18);

  /* Derivados gold */
  --gold-dark:     #c99000;
  --gold-muted:    rgba(244,180,0,0.15);
  --gold-border:   rgba(244,180,0,0.25);

  /* Texto */
  --text-dark:     rgb(0, 0, 0);
  --text-medium:   #444444;
  --text-muted:    #888888;
  --text-light:    rgba(255,255,255,0.85);
  --text-lighter:  rgba(255,255,255,0.55);

  /* Layout */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  40px;
  --transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  --shadow-sm:  0 4px 20px rgba(0,0,0,0.08);
  --shadow-md:  0 8px 48px rgba(0,0,0,0.12);
  --shadow-lg:  0 20px 80px rgba(0,0,0,0.18);

  /* Tipografía */
  --font-brand:  'DM Sans', sans-serif;
  --font-serif:  'DM Serif Display', serif;
  --font-body:   'DM Sans', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); line-height: 1.6; overflow-x: hidden;
  background: #ffffff; color: var(--text-medium);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; transition: var(--transition); }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; transition: var(--transition); padding: 0 40px;
}
.site-header.scrolled, .site-header.always-scrolled {
  background: rgba(255, 255, 255, 1);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.12);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px; max-width: 1440px; margin: 0 auto;
}

/* Logo */
.header-logo img.logo-img {
  height: 36px; width: auto; display: block !important;
}
.header-logo .logo-text {
  display: none !important;
}
.header-logo .logo-text span { display: none !important; }


/* Nav */
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > li { position: relative; }
.main-nav > li > a {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  color: var(--text-light); padding: 8px 14px;
  border-radius: var(--radius-sm); letter-spacing: 0.01em;
  transition: var(--transition);
}
.site-header.scrolled .main-nav > li > a, .site-header.always-scrolled .main-nav > li > a {
  color: var(--brand-darkest);
}
.site-header.scrolled .main-nav > li > a:hover, .site-header.always-scrolled .main-nav > li > a:hover {
  color: var(--brand-teal);
  background: rgba(0,123,120,0.06);
}
.main-nav > li > a:hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav-arrow { font-size: 0.6rem; opacity: 0.5; transition: var(--transition); }
.main-nav > li:hover .nav-arrow { opacity: 1; transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--brand-darkest);
  border: 1px solid rgba(0,123,120,0.25); border-radius: var(--radius-md);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: var(--transition); box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,123,120,0.1);
}
.main-nav > li:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; color: #fff; font-weight: 500; letter-spacing: 0.01em;
}
.nav-dropdown li a:hover { background: rgba(0,123,120,0.18); color: #fff; }

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(145deg, #2ecc71, #25D366, #128C7E);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5), 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none; animation: wa-pulse 2.5s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37,211,102,0.65), 0 4px 12px rgba(0,0,0,0.25);
  animation: none;
}
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 20px rgba(37,211,102,0.5), 0 0 0 10px rgba(37,211,102,0); }
}

/* Header CTA */
.header-cta { display: flex; align-items: center; gap: 10px; }
.header-contact { font-size: 0.78rem; color: rgba(255,255,255,0.6); text-align: right; transition: var(--transition); }
.site-header.scrolled .header-contact, .site-header.always-scrolled .header-contact { color: #666; }
.header-contact a { color: var(--brand-gold); font-weight: 600; font-size: 0.9rem; display: block; }
.site-header.scrolled .header-contact a, .site-header.always-scrolled .header-contact a { color: var(--brand-darkest); }
.header-contact a:hover { color: var(--teal-light); }

/* FREE BUDGET — primary gold CTA */
.btn-header {
  background: var(--brand-gold); color: var(--brand-darkest);
  font-family: var(--font-brand); font-weight: 700; font-size: 0.75rem;
  padding: 9px 18px; border-radius: var(--radius-sm);
  letter-spacing: 0.07em; text-transform: uppercase;
  box-shadow: 0 2px 12px rgba(244,180,0,0.25);
  transition: var(--transition); white-space: nowrap;
}
.btn-header:hover { background: #ffc200; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(244,180,0,0.4); color: var(--brand-darkest); }

/* Portal buttons */
.header-portal-links { display: flex; align-items: center; gap: 6px; }
.btn-portal-login {
  font-family: var(--font-brand); font-weight: 600; font-size: 0.72rem;
  padding: 8px 14px; border-radius: var(--radius-sm);
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85);
  transition: var(--transition); white-space: nowrap;
}
.btn-portal-login:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.5); color: #fff; transform: translateY(-1px); }
/* scrolled state — dark background so use dark-friendly styles */
.site-header.scrolled .btn-portal-login,
.site-header.always-scrolled .btn-portal-login {
  background: transparent; color: var(--brand-darkest);
  border-color: rgba(0,0,0,0.18);
}
.site-header.scrolled .btn-portal-login:hover,
.site-header.always-scrolled .btn-portal-login:hover {
  background: var(--brand-teal); color: #fff; border-color: var(--brand-teal);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  width: 44px; height: 44px;
  padding: 0;
  position: relative;
  z-index: 1200;
  flex-shrink: 0;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: absolute;
  left: 11px;
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; opacity: 1; }
.hamburger span:nth-child(3) { top: 28px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(0, 7px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(0, -7px); }
.site-header.scrolled .hamburger span,
.site-header.always-scrolled .hamburger span { background: var(--brand-darkest); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1050;   /* above header (1000), below hamburger (1100) */
  background: linear-gradient(160deg, rgba(0,26,25,0.99) 0%, rgba(0,52,51,0.98) 100%);
  flex-direction: column;
  align-items: flex-start;
  /* top padding = header height (64px) + extra breathing room */
  padding: 80px 24px 40px;
  gap: 2px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes slideInMenu {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLink {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.mobile-menu.open {
  display: flex;
  animation: slideInMenu 0.28s cubic-bezier(0.4,0,0.2,1) forwards;
}
.mobile-menu a {
  font-family: var(--font-body); font-size: 1.05rem; font-weight: 500;
  color: rgba(255,255,255,0.8);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  opacity: 0;
  animation: slideInLink 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu a:nth-child(2)  { animation-delay: 0.05s; }
.mobile-menu a:nth-child(3)  { animation-delay: 0.10s; }
.mobile-menu a:nth-child(4)  { animation-delay: 0.14s; }
.mobile-menu a:nth-child(5)  { animation-delay: 0.18s; }
.mobile-menu a:nth-child(6)  { animation-delay: 0.22s; }
.mobile-menu a:nth-child(7)  { animation-delay: 0.26s; }
.mobile-menu a:nth-child(8)  { animation-delay: 0.30s; }
.mobile-menu a:nth-child(9)  { animation-delay: 0.34s; }
.mobile-menu a:nth-child(10) { animation-delay: 0.38s; }
.mobile-menu a:nth-child(11) { animation-delay: 0.42s; }
.mobile-menu a:nth-child(12) { animation-delay: 0.46s; }
.mobile-menu a:hover,
.mobile-menu a:active { color: #fff; background: rgba(0,123,120,0.22); transform: translateX(6px); }
/* ✕ close button — now visible since menu is above header */
.mobile-menu-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: rgba(255,255,255,0.75);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu-close:hover,
.mobile-menu-close:active { color: #fff; background: rgba(255,255,255,0.1); transform: rotate(90deg); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-block;
  background: var(--brand-teal); color: #fff;
  font-family: var(--font-brand); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 14px 28px; border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0,123,120,0.3);
}
.btn-primary:hover { background: var(--teal-light); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,123,120,0.45); color: #fff; }

.btn-gold {
  display: inline-block;
  background: var(--brand-gold); color: var(--brand-darkest);
  font-family: var(--font-brand); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 14px 28px; border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(244,180,0,0.3);
}
.btn-gold:hover { background: #ffc200; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(244,180,0,0.5); color: var(--brand-darkest); }

.btn-outline {
  display: inline-block;
  border: 1.5px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.9);
  font-family: var(--font-brand); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 14px 28px; border-radius: var(--radius-sm);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.07); color: #fff; }

.btn-outline-teal {
  display: inline-block;
  border: 1.5px solid var(--brand-teal); color: var(--brand-teal);
  font-family: var(--font-brand); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 14px 28px; border-radius: var(--radius-sm);
}
.btn-outline-teal:hover { background: var(--brand-teal); color: #fff; }

/* View All / Dark outline button */
.btn-outline-dark {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--brand-teal); color: var(--brand-teal);
  background: transparent;
  font-family: var(--font-brand); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 36px; border-radius: var(--radius-sm);
  transition: background 0.3s ease, color 0.3s ease,
              transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
  position: relative; overflow: hidden;
}
.btn-outline-dark::after {
  content: '→'; margin-left: 4px;
  transition: transform 0.3s ease;
}
.btn-outline-dark:hover {
  background: var(--brand-teal); color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,123,120,0.35);
}
.btn-outline-dark:hover::after { transform: translateX(5px); }
.btn-outline-dark:active { transform: translateY(-1px); }

/* ============================================
   HERO SLIDER
   ============================================ */
.hero {
  position: relative; height: 100vh; min-height: 620px;
  overflow: hidden; background: var(--brand-darkest);
  z-index: 0;
}
.hero-slides { position: relative; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }

/* Slide states */
.hero-slide {
  position: absolute; inset: 0; display: flex;
  align-items: center; opacity: 0; pointer-events: none;
  transition: opacity 0.85s cubic-bezier(0.4,0,0.2,1),
              transform 0.85s cubic-bezier(0.4,0,0.2,1);
  transform: translateX(0);
  will-change: opacity, transform;
}
.hero-slide.active        { opacity: 1; pointer-events: all; transform: translateX(0); }
.hero-slide.slide-enter-right  { transform: translateX(60px);  opacity: 0; }
.hero-slide.slide-enter-left   { transform: translateX(-60px); opacity: 0; }
.hero-slide.slide-exit-right   { transform: translateX(-60px); opacity: 0; }
.hero-slide.slide-exit-left    { transform: translateX(60px);  opacity: 0; }

.hero-slide-bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; transition: transform 8s ease;
}
.hero-slide.active .hero-slide-bg { transform: scale(1.06); }

/* ── Arrow Buttons ── */
.hero-arrow {
  position: absolute; top: 50%; z-index: 4;
  transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease,
              transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
  outline: none;
  pointer-events: all;
}
.hero-arrow svg { width: 22px; height: 22px; transition: transform 0.3s ease; }
.hero-arrow-prev { left: 24px; }
.hero-arrow-next { right: 24px; }
.hero-arrow:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 24px rgba(244,180,0,0.4);
}
.hero-arrow:hover svg { transform: scale(1.1); }
.hero-arrow:active { transform: translateY(-50%) scale(0.95); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(0,26,25,0.92) 0%, rgba(0,26,25,0.7) 55%, rgba(0,26,25,0.35) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1440px; margin: 0 auto; padding: 0 40px; width: 100%;
  pointer-events: all;
}
/* Content animates in when slide becomes active */
.hero-slide .hero-badge,
.hero-slide .hero-title,
.hero-slide .hero-subtitle,
.hero-slide .hero-actions {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-slide.active .hero-badge   { opacity:1; transform:translateY(0); transition-delay: 0.15s; }
.hero-slide.active .hero-title   { opacity:1; transform:translateY(0); transition-delay: 0.28s; }
.hero-slide.active .hero-subtitle{ opacity:1; transform:translateY(0); transition-delay: 0.40s; }
.hero-slide.active .hero-actions { opacity:1; transform:translateY(0); transition-delay: 0.52s; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-brand); font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; padding: 6px 14px; border-radius: 20px; margin-bottom: 20px;
  background: rgba(0,123,120,0.15); border: 1px solid rgba(0,123,120,0.4);
  color: #4ecece;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-teal); animation: pulse-dot 2s infinite;
}
.hero-badge.gold {
  background: rgba(244,180,0,0.12); border-color: rgba(244,180,0,0.35); color: var(--brand-gold);
}
.hero-badge.gold::before { background: var(--brand-gold); }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.6)} }

.hero-title {
  font-family: var(--font-brand); font-size: clamp(2.8rem,5.5vw,4.8rem);
  color: #fff; line-height: 1.08; letter-spacing: 0.02em; margin-bottom: 20px;
}
.hero-title .accent-teal { color: #4ecece; }
.hero-title .accent-gold { color: var(--brand-gold); }
.hero-subtitle { font-size: 1.05rem; color: var(--text-lighter); max-width: 520px; line-height: 1.75; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero Nav */
.hero-nav {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; z-index: 3;
  pointer-events: all;
}
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%; cursor: pointer;
  transition: var(--transition); background: rgba(255,255,255,0.35);
  border: none; padding: 0;
  pointer-events: all;
}
.hero-dot.active { background: var(--brand-gold); transform: scale(1.4); }

.hero-scroll {
  position: absolute; bottom: 36px; right: 40px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-brand); font-size: 0.6rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
}
.hero-scroll-line { width: 1px; height: 48px; background: linear-gradient(to bottom, rgba(255,255,255,0.35), transparent); }

/* ============================================
   SHARED SECTION STYLES
   ============================================ */
.container { max-width: 1440px; margin: 0 auto; padding: 0 40px; }

.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-brand); font-size: 0.65rem;
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 14px;
}
.section-label::before { content: ''; width: 20px; height: 2px; border-radius: 2px; }
.section-label.teal { color: var(--brand-teal); }
.section-label.teal::before { background: var(--brand-teal); }
.section-label.gold { color: var(--brand-gold); }
.section-label.gold::before { background: var(--brand-gold); }
.section-label.white { color: rgba(255,255,255,0.6); }
.section-label.white::before { background: rgba(255,255,255,0.4); }

.section-title {
  font-family: var(--font-brand); font-size: clamp(1.9rem,3.2vw,2.7rem);
  line-height: 1.12; letter-spacing: 0.02em;
}
.section-title em { font-family: var(--font-serif); letter-spacing: 0; font-weight: 400; font-style: italic; }

/* ============================================
   SERVICIOS SECTION (dark teal bg)
   ============================================ */
.services-section { background: #ffffff; padding: 110px 0; }

.services-intro {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center; margin-bottom: 80px;
}
.services-intro-text .section-title { color: var(--brand-darkest); }
.services-intro-text p { color: var(--text-medium); margin-top: 18px; font-size: 0.975rem; line-height: 1.8; }
.services-intro-text .btn-primary { margin-top: 32px; }

.services-features { display: flex; flex-direction: column; gap: 16px; }
.service-feature {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px;
  background: #fcfcfc; border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-md); transition: var(--transition);
}
.service-feature:hover { background: rgba(0,123,120,0.1); border-color: rgba(0,123,120,0.35); box-shadow: var(--teal-glow); }
.service-feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: rgba(0,123,120,0.12);
}
.service-feature-text h4 { font-family: var(--font-brand); color: var(--brand-darkest); font-size: 0.9rem; letter-spacing: 0.04em; margin-bottom: 4px; }
.service-feature-text p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* Services cards grid */
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 60px; }
.service-card {
  background: #ffffff; border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--teal-glow), 0 24px 60px rgba(0,0,0,0.3); border-color: rgba(0,123,120,0.4); }
.service-card-img { height: 200px; overflow: hidden; background: #002220; display:flex; align-items:center; justify-content:center; font-size:3.5rem; position: relative; }
.service-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.service-card:hover .service-card-img img { transform: scale(1.08); }
/* Hover overlay: full teal gradient + "Ver más" label */
.service-card-img::before {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(135deg, rgba(0,123,120,0.82) 0%, rgba(0,41,40,0.72) 100%);
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.4,0,0.2,1);
}
.service-card:hover .service-card-img::before { opacity: 1; }

.service-card-img::after {
  content: 'Ver más →';
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-brand); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; font-weight: 600;
  opacity: 0; transform: translateY(10px);
  transition: all 0.45s cubic-bezier(0.4,0,0.2,1);
}
.service-card:hover .service-card-img::after {
  opacity: 1; transform: translateY(0);
}
.service-card-body { padding: 24px; }
.service-card-body h3 { font-family: var(--font-brand); color: var(--brand-darkest); font-size: 1rem; letter-spacing: 0.04em; margin-bottom: 8px; }
.service-card-body p  { font-size: 0.85rem; color: var(--text-medium); line-height: 1.7; margin-bottom: 16px; }
.service-card-link { font-family: var(--font-brand); font-size: 0.7rem; color: #4ecece; letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; transition: var(--transition); }
.service-card-link::after { content: '→'; transition: var(--transition); }
.service-card-link:hover { color: var(--brand-teal); }
.service-card-link:hover::after { transform: translateX(4px); }

/* ============================================
   STATS BAND
   ============================================ */
.stats-band { background: var(--brand-teal); padding: 64px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-item { padding: 40px 28px; text-align: center; border-right: 1px solid rgba(255,255,255,0.15); }
.stat-item:last-child { border-right: none; }
.stat-number { font-family: var(--font-brand); font-size: 2.8rem; color: #fff; line-height: 1; margin-bottom: 8px; letter-spacing: 0.02em; }
.stat-number span { color: var(--brand-gold); }
.stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }

/* ============================================
   PROYECTOS
   ============================================ */
.projects-section { background: #ffffff; padding: 110px 0; }
.projects-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; }
.projects-header .section-title { color: var(--brand-darkest); }
.project-filters { display: flex; gap: 8px; }
.filter-btn {
  font-family: var(--font-brand); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 8px 18px; border-radius: 20px;
  color: var(--text-muted); border: 1px solid rgba(0,0,0,0.1);
  transition: var(--transition); cursor: pointer; background: transparent;
}
.filter-btn.active, .filter-btn:hover { color: var(--brand-teal); border-color: var(--brand-teal); background: rgba(0,123,120,0.05); }
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

/* ── Homepage Projects Preview ── */
.projects-preview { padding: 100px 0; background: var(--brand-bg); }
.projects-preview-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 50px; gap: 20px; flex-wrap: wrap;
}
.projects-preview-header .section-title { margin-bottom: 0; }
.btn-projects-top { display: none; }           /* desktop: hide top button */
.projects-preview-cta {
  text-align: center; margin-top: 48px;
}

.project-card-sm {
  border-radius: var(--radius-md); overflow: hidden;
  position: relative; aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.4s ease;
}
.project-card-sm img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card-sm:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
.project-card-sm:hover img { transform: scale(1.07); }
.project-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 18px 16px;
  background: linear-gradient(to top, rgba(0,26,25,0.92) 0%, transparent 100%);
}
.project-info span {
  display: block;
  font-family: var(--font-brand); font-size: 0.6rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-gold); margin-bottom: 4px;
}
.project-info h4 {
  font-family: var(--font-brand); color: #fff;
  font-size: 0.95rem; line-height: 1.3; margin: 0;
}
.project-card {
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  background: #ffffff; border: 1px solid rgba(0,0,0,0.08);
  transition: var(--transition); aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,0,0,0.45); border-color: rgba(0,123,120,0.35); }
.project-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.2) 60%, transparent 100%);
}
.project-card-thumb { position: absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:4rem; transition: var(--transition); }
.project-card:hover .project-card-thumb { transform: scale(1.1); }
.project-card::before {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(160deg, rgba(244,180,0,0.18) 0%, rgba(0,26,25,0.78) 100%);
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.4,0,0.2,1);
  border-radius: var(--radius-lg);
}
.project-card:hover::before { opacity: 1; }

/* Gold "Ver Proyecto" pill that slides up on hover */
.project-card::after {
  content: 'Ver Proyecto';
  position: absolute; bottom: 72px; left: 50%; z-index: 6;
  transform: translateX(-50%) translateY(14px);
  background: var(--brand-gold); color: var(--brand-darkest);
  font-family: var(--font-brand); font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 20px;
  opacity: 0; transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
}
.project-card:hover::after {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.project-card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 22px; }
.project-cat { font-family: var(--font-brand); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #4ecece; margin-bottom: 6px; }
.project-name { font-family: var(--font-brand); color: var(--brand-darkest); font-size: 0.9rem; line-height: 1.3; letter-spacing: 0.02em; }

/* ============================================
   CONSTRUCCIÓN Y REFORMAS (light bg)
   ============================================ */
.build-section { background: var(--brand-bg); padding: 110px 0; }
.build-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; margin-bottom: 72px; }
.build-intro-text .section-title { color: var(--text-dark); }
.build-intro-text p { color: var(--text-medium); margin-top: 18px; font-size: 0.975rem; line-height: 1.8; }
.build-intro-text .btn-primary { margin-top: 32px; }
.build-visual {
  background: linear-gradient(135deg, #e8e5de, #d4d0c8);
  border-radius: var(--radius-lg); min-height: 380px;
  display: flex; align-items: center; justify-content: center; font-size: 5rem;
}
.build-services-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.build-card {
  background: #fff; border-radius: var(--radius-lg); padding: 28px 22px;
  border: 1px solid rgba(0,0,0,0.07); transition: var(--transition); box-shadow: var(--shadow-sm);
}
.build-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--teal-border); }
.build-card-icon { font-size: 2rem; margin-bottom: 14px; }
.build-card h3 { font-family: var(--font-brand); color: var(--text-dark); font-size: 0.9rem; letter-spacing: 0.04em; margin-bottom: 8px; }
.build-card p  { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================
   SOBRE NOSOTROS
   ============================================ */
.about-section { background: #ffffff; padding: 110px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-text .section-title { color: var(--brand-darkest); }
.about-text p { color: var(--text-medium); margin-top: 16px; font-size: 0.975rem; line-height: 1.8; }
.about-text .btn-gold { margin-top: 32px; display: inline-block; }
.about-pillars { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.about-pillar {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px;
  background: #fcfcfc; border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-md);
}
.about-pillar-icon { font-size: 1.4rem; }
.about-pillar h4 { font-family: var(--font-brand); font-size: 0.82rem; letter-spacing: 0.06em; color: #4ecece; margin-bottom: 3px; }
.about-pillar p  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }
.about-visual {
  border-radius: var(--radius-lg); overflow: hidden; min-height: 460px;
  background: linear-gradient(135deg, #f0f4f4, #e0e8e8);
  display: flex; align-items: center; justify-content: center; font-size: 6rem;
  border: 1px solid rgba(0,0,0,0.05);
}

/* ============================================
   CTA FINAL
   ============================================ */
.cta-section {
  background: var(--brand-teal); padding: 100px 0; text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: 'OBERSOL'; font-family: var(--font-brand);
  font-size: 18vw; color: rgba(255,255,255,0.05);
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  white-space: nowrap; pointer-events: none; letter-spacing: 0.05em;
}
.cta-section .section-title { color: #fff; position: relative; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.75); max-width: 480px; margin: 0 auto 40px; position: relative; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-info { margin-top: 52px; display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; position: relative; }
.cta-info-item { text-align: center; }
.cta-info-item .label { font-family: var(--font-brand); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.cta-info-item .value { font-family: var(--font-brand); color: #fff; font-size: 0.95rem; letter-spacing: 0.04em; }
.cta-info-item a.value { color: var(--brand-gold); }
.cta-info-item a.value:hover { color: #fff; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: rgb(29, 29, 41); padding: 80px 0 0; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.footer-logo-wrap { margin-bottom: 12px; }
.footer-logo-wrap img { height: 32px; width: auto; }
.footer-logo-text { font-family: var(--font-brand); font-size: 1.6rem; color: #fff; letter-spacing: 0.06em; }
.footer-logo-text span { color: var(--brand-gold); }
.footer-tagline { font-family: var(--font-brand); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: #4ecece; margin-bottom: 14px; }
.footer-brand p { font-size: 0.875rem; color: rgb(152, 152, 160); line-height: 1.7; }
.footer-social { display: flex; gap: 8px; margin-top: 22px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px; background: rgba(0,123,120,0.1);
  border: 1px solid rgba(0,123,120,0.2); display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: rgba(255,255,255,0.45); font-weight: 600; transition: var(--transition);
}
.footer-social a:hover { background: rgba(0,123,120,0.25); border-color: var(--brand-teal); color: #fff; }
.footer-col h5 { font-family: var(--font-brand); font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 0.875rem; color: rgb(152, 152, 160); transition: var(--transition); }
.footer-col ul li a:hover { color: #fff; padding-left: 4px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; font-size: 0.8rem; color: rgb(152, 152, 160); }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: rgba(255,255,255,0.25); transition: var(--transition); }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.65); }

/* ============================================
   RESPONSIVE
   ============================================ */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
  .container { padding: 0 28px; }

  /* Sections: reduce vertical padding */
  .services-section,
  .projects-section,
  .build-section,
  .about-section { padding: 80px 0; }

  /* Intro grids: stack vertically */
  .services-intro,
  .build-intro,
  .about-grid { grid-template-columns: 1fr; gap: 48px; }

  /* Cards: 2-col */
  .services-grid       { grid-template-columns: repeat(2,1fr); gap: 20px; }
  .build-services-grid { grid-template-columns: repeat(2,1fr); gap: 16px; }
  .projects-grid       { grid-template-columns: repeat(2,1fr); gap: 16px; }
  .projects-preview .projects-grid { grid-template-columns: repeat(2,1fr); gap: 16px; }
  .projects-preview-header { gap: 16px; }
  .btn-projects-top { display: inline-flex; }   /* show inline on tablet+ */

  /* Stats: 2×2 */
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .stat-item:nth-child(odd)  { border-right: 1px solid rgba(255,255,255,0.15); }
  .stat-item:last-child { border-bottom: none; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }

  /* Projects header: stack on smaller tablets */
  .projects-header { flex-direction: column; align-items: flex-start; gap: 20px; }

  /* Build visual height fix */
  .build-visual { min-height: 300px; }

  /* About visual height fix */
  .about-visual { min-height: 360px; }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {
  /* Header */
  .site-header { padding: 0 16px; }
  .header-inner { height: 64px; }
  .main-nav, .header-contact, .header-cta { display: none; }
  /* Show hamburger — proper 44×44 tap target, white bars always */
  .hamburger { display: flex !important; }
  .hamburger span { background: #fff !important; }

  /* Container */
  .container { padding: 0 16px; }

  /* Sections: tighten padding */
  .services-section,
  .projects-section,
  .build-section,
  .about-section { padding: 60px 0; }
  .stats-band { padding: 48px 0; }
  .cta-section { padding: 72px 0; }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero-content { padding: 0 16px; }
  .hero-title { font-size: clamp(2rem, 8vw, 2.6rem); }
  .hero-subtitle { font-size: 0.92rem; margin-bottom: 28px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline,
  .hero-actions .btn-gold { width: 100%; text-align: center; padding: 13px 20px; }
  .hero-arrow { width: 38px; height: 38px; }
  .hero-arrow svg { width: 18px; height: 18px; }
  .hero-arrow-prev { left: 12px; }
  .hero-arrow-next { right: 12px; }
  .hero-scroll { display: none; }
  .hero-nav { bottom: 24px; }

  /* Section typography */
  .section-title { font-size: clamp(1.6rem, 6vw, 2rem); }

  /* Services intro stacked */
  .services-intro { gap: 36px; margin-bottom: 48px; }
  .services-intro-text .btn-primary { margin-top: 20px; }

  /* Service cards: 1-col */
  .services-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; }
  .service-card-img { height: 180px; }

  /* Stats: 2×2 on mobile too */
  .stats-grid { grid-template-columns: repeat(2,1fr); border-radius: var(--radius-md); }
  .stat-number { font-size: 2rem; }
  .stat-item { padding: 28px 16px; }

  /* Projects */
  .projects-section { padding: 60px 0; }
  .projects-header { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
  .project-filters { flex-wrap: wrap; gap: 6px; }
  .filter-btn { font-size: 0.65rem; padding: 6px 14px; }
  /* 1-col projects on mobile */
  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  /* Fix aspect-ratio on 1-col — make cards shorter */
  .project-card { aspect-ratio: 16/9; }

  /* Projects Preview (homepage) */
  .projects-preview { padding: 60px 0; }
  .projects-preview-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .btn-projects-top { display: none !important; }    /* show CTA at bottom on mobile */
  .projects-preview .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  .project-card-sm { aspect-ratio: 16/9; }
  .projects-preview-cta { margin-top: 32px; }
  .btn-outline-dark { font-size: 0.78rem; padding: 12px 28px; }

  /* Build section */
  .build-intro { gap: 36px; margin-bottom: 40px; }
  .build-intro-text .btn-primary { margin-top: 20px; }
  .build-visual { min-height: 220px; border-radius: var(--radius-md); }
  .build-services-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .build-card { padding: 20px 16px; border-radius: var(--radius-md); }

  /* About */
  .about-grid { gap: 36px; }
  .about-visual { min-height: 260px; border-radius: var(--radius-md); }
  .about-pillars { gap: 10px; margin-top: 20px; }
  .about-pillar { padding: 14px; }
  .about-text .btn-gold { margin-top: 24px; }

  /* CTA */
  .cta-section .section-title { font-size: clamp(1.6rem, 6vw, 2rem); }
  .cta-actions { flex-direction: column; align-items: center; gap: 10px; }
  .cta-actions .btn-gold,
  .cta-actions .btn-outline { width: 100%; max-width: 320px; text-align: center; }
  .cta-info { gap: 20px; flex-direction: column; align-items: center; }

  /* Footer */
  .site-footer { padding: 56px 0 0; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; padding-bottom: 36px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 14px; }
}

/* --- Small mobile (≤480px) --- */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  /* Stats: stack fully on very small screens */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .stat-item:last-child { border-bottom: none; }

  /* Build cards: 1-col on tiny screens */
  .build-services-grid { grid-template-columns: 1fr; }

  /* Hero buttons: full width */
  .hero-title { font-size: clamp(1.75rem, 9vw, 2.2rem); }

  /* Project card aspect-ratio reset on tiny screens */
  .project-card { aspect-ratio: 4/3; }

  /* Prevent footer links overflow */
  .footer-bottom-links { gap: 10px; }
  .footer-col ul li a { font-size: 0.85rem; }

  /* Portal button responsive */
  /* portal links hidden on mobile via 768px rule */
}

/* ============================================
   GLOBAL MOBILE FIXES — Added for responsiveness
   ============================================ */

/* WhatsApp button smaller on mobile */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 52px; height: 52px;
    bottom: 20px; right: 16px;
  }
  .whatsapp-float svg { width: 26px; height: 26px; }
}

/* Projects page — fix inline grid on mobile */
@media (max-width: 768px) {
  .projects-page-grid,
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* About page responsive */
@media (max-width: 768px) {
  .about-page-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* Portal — admin panel responsive */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr !important; }
  .admin-sidebar { display: none; }
  .admin-main { padding: 16px !important; }
  .admin-topbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px !important; }
  .stats-row { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr !important; }
  .admin-topbar h1 { font-size: 1.2rem; }
}

/* Estudio solar — card tighter on small screens */
@media (max-width: 400px) {
  .card { padding: 28px 16px !important; }
  .option-grid.cols-3 { grid-template-columns: 1fr 1fr !important; }
  .step-title { font-size: 1.3rem !important; }
}

/* General image safety */
img { max-width: 100%; height: auto; }

/* Prevent horizontal scroll from overflowing elements */
body { overflow-x: hidden; }

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE FIXES
   ============================================ */
@media (max-width: 768px) {

  /* Header always visible on mobile */
  .site-header,
  .site-header.at-top {
    background: rgba(0, 26, 25, 0.97) !important;
    backdrop-filter: blur(12px);
  }

  /* Hamburger color always white on mobile */
  .hamburger span { background: #fff !important; }

  /* Hero product image hidden on mobile */
  .hero-product-wrap { display: none; }

  /* Hero inner content full width */
  .hero-inner { grid-template-columns: 1fr !important; }

  /* Services intro stacked */
  .services-intro { grid-template-columns: 1fr !important; }

  /* About grid stacked */
  .about-grid { grid-template-columns: 1fr !important; }

  /* Build intro stacked */
  .build-intro { grid-template-columns: 1fr !important; }

  /* Testimonials 1-col */
  .testimonials-grid { grid-template-columns: 1fr !important; }

  /* Blog sidebar hidden on mobile */
  .blog-sidebar { display: none; }
  .blog-wrap { grid-template-columns: 1fr !important; }

  /* Portal dashboard stats 2-col */
  .stats-grid { grid-template-columns: repeat(2,1fr) !important; }

  /* Tables scroll horizontally */
  .table-wrap, .admin-table-wrap, .quotes-table-wrap { overflow-x: auto; }

  /* Buttons full width in forms */
  .btn-submit, .btn-primary[type="submit"] { width: 100%; }

  /* Mobile menu items bigger tap targets — handled in base .mobile-menu a rule */
}

@media (max-width: 480px) {
  /* Stats 1-col on tiny screens */
  .stats-grid { grid-template-columns: 1fr !important; }

  /* Admin portal stats 1-col */
  .ratings-stats { grid-template-columns: 1fr !important; }

  /* Portal dashboard stat cards 1-col */
  .stat-card { flex-direction: row; }
}

/* ============================================
   RESPONSIVE GRID UTILITIES — v6 Mobile Pass
   Replaces inline grid styles that can't be
   targeted by regular media queries.
   ============================================ */

/* Base classes (desktop-first) */
.grid-2   { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-4   { display: grid; grid-template-columns: repeat(4, 1fr); }
.grid-hero{ display: grid; grid-template-columns: 1fr 1fr; align-items: center; }

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .grid-3  { grid-template-columns: repeat(2, 1fr); }
  .grid-4  { grid-template-columns: repeat(2, 1fr); }
  .grid-hero { gap: 48px !important; }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-hero { grid-template-columns: 1fr; }
  .grid-hero { gap: 32px !important; }

  /* Section padding: override all inline 100px → 64px */
  section[style*="padding:100px"] { padding-top: 64px !important; padding-bottom: 64px !important; }
  section[style*="padding: 100px"] { padding-top: 64px !important; padding-bottom: 64px !important; }

  /* Floating stat badges — pull them in from the absolute bleed */
  .stat-badge-abs {
    position: static !important;
    display: inline-block !important;
    margin: 16px 0 0 0 !important;
    transform: none !important;
  }

  /* Hero-section image wrapper: ensure it renders above text on mobile */
  .hero-img-wrap { order: -1; }

  /* About hero: remove large gap */
  .about-hero-img { margin-bottom: 0; }

  /* Reviews cards: touch of breathing room */
  .review-card-inline { margin-bottom: 0; }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  section[style*="padding:100px"] { padding-top: 48px !important; padding-bottom: 48px !important; }
  section[style*="padding: 100px"] { padding-top: 48px !important; padding-bottom: 48px !important; }

  /* Stats counter: slightly smaller numbers */
  .stat-counter { font-size: 2.2rem !important; }
}

/* ============================================
   ADDITIONAL MOBILE POLISH
   ============================================ */
@media (max-width: 768px) {
  /* Section headings */
  .section-title { font-size: clamp(1.5rem, 5.5vw, 2rem) !important; }

  /* Floating stat badges — pull back into flow on mobile */
  .stat-badge-abs {
    position: static !important;
    display: inline-block !important;
    margin: 20px auto 0 !important;
    transform: none !important;
  }

  /* Contact grid gap */
  .contact-grid { gap: 32px !important; }

  /* Cookie banner: stack vertically */
  #cookie-banner > div { flex-direction: column !important; gap: 16px !important; }
  #cookie-banner > div > div:last-child { width: 100%; }
  #cookie-banner > div > div:last-child button { flex: 1; }

  /* Footer logo */
  .footer-logo-wrap img { height: 32px; }

  /* Stat counter inline grid: 2×2 on mobile */
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Prevent negative-margin badges from overflowing */
  [style*="margin-bottom:-24"] { margin-bottom: 0 !important; }
  [style*="margin-bottom: -24"] { margin-bottom: 0 !important; }
}

@media (max-width: 480px) {
  /* Keep stats 2-col even on small phones */
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Hide second portal button on very small screens */
  .btn-portal-login:last-child { display: none; }

  /* Tighten hero navigation arrows */
  .hero-arrow { width: 32px !important; height: 32px !important; }

  /* Inline-style section padding reduction */
  section[style*="padding:100px"] { padding-top: 48px !important; padding-bottom: 48px !important; }

  /* Blog filters: wrap */
  .blog-filter-bar { flex-wrap: wrap !important; gap: 6px !important; }
}

/* Prevent any horizontal bleed */
.container, section, main, .site-footer { max-width: 100vw; overflow-x: hidden; }

/* ============================================
   iPHONE / iOS SAFARI SPECIFIC FIXES
   ============================================ */

/* 1. HERO HEIGHT — fix 100vh Safari address-bar bug
      100dvh = dynamic viewport height (shrinks when bar hides)
      Falls back to 100svh then 100vh for older iOS             */
.hero {
  height: 100dvh;
  min-height: 100svh;
}
@supports not (height: 100dvh) {
  .hero { height: 100svh; min-height: 600px; }
}

/* 2. SAFE AREA — home indicator + notch padding
      Affects iPhone X and all Face ID / Dynamic Island iPhones  */
.site-header {
  padding-top: env(safe-area-inset-top);
}
.site-footer {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
/* WhatsApp button above home indicator */
.whatsapp-float {
  bottom: calc(28px + env(safe-area-inset-bottom));
}
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
  /* Cookie banner above home indicator */
  #cookie-banner {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* 3. iOS INPUT ZOOM FIX
      iOS Safari zooms in on any input/select with font-size < 16px
      Force 16px on focus/interaction on mobile                  */
@media (max-width: 768px) {
  input, select, textarea,
  .form-input,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  input[type="url"] {
    font-size: 16px !important;
  }
}

/* 4. iOS BODY SCROLL LOCK — overflow:hidden alone doesn't work on Safari
      JS adds .menu-open to <body>; this CSS handles the lock     */
body.menu-open {
  position: fixed;
  width: 100%;
  overflow-y: scroll; /* keep scrollbar space to prevent jump */
}

/* 5. SERVICE CARD IMAGE HEIGHTS — reduce on mobile
      280px/240px is too tall when cards are 1-col on small iPhones */
@media (max-width: 768px) {
  /* index.php service cards */
  [style*="height:280px"],
  [style*="height: 280px"] {
    height: 200px !important;
  }
  /* about.php service cards */
  [style*="height:240px"],
  [style*="height: 240px"] {
    height: 180px !important;
  }
  /* project image heights on about page */
  [style*="height:220px"],
  [style*="height: 220px"] {
    height: 170px !important;
  }
}

/* 6. -webkit-touch-callout: none on links that shouldn't show iOS popup */
.btn-primary, .btn-gold, .btn-header, .btn-outline {
  -webkit-touch-callout: none;
}

/* 7. Landscape iPhone — ensure header doesn't eat too much space */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 100svh; }
  .mobile-menu { padding-top: 60px; }
  .site-header { padding-top: 0; }
  .header-inner { height: 52px; }
}
