/* Sobre Nosotros enhancements */
.about .section-lead { font-size: 16px; color: #3f5877; line-height: 1.7; margin-bottom: 14px; }

/* Dropdowns open on click via .open class (no hover open) */
.about-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 8px; }
.stat-card { background:#fff; border:1px solid var(--border-color); border-radius:12px; padding:16px; text-align:center; box-shadow:0 10px 24px rgba(0,0,0,0.06); }
.stat-value { display:block; font-family:'Montserrat',sans-serif; font-size:24px; color: var(--primary-color); font-weight:700; letter-spacing:.3px; }
.stat-label { display:block; font-size:12px; color:#46627f; margin-top:4px; letter-spacing:.2px; }
.about-text.cols-2 { columns: 2; column-gap: 28px; }
.about-text.cols-2 p { break-inside: avoid; margin-bottom: 12px; }

.mv-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.mv-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 45px; margin-bottom: 50px; }
.mv-card { background:#fff; border:1px solid var(--border-color); border-radius:14px; padding:28px; box-shadow:0 12px 28px rgba(0,0,0,0.08); transition: transform .25s ease, box-shadow .25s ease; }
/* Extra air before CTA when it follows an about section */
.about + .cta { margin-top: 48px; padding-top: 6px; }
.mv-card:hover { transform: translateY(-4px); box-shadow:0 16px 32px rgba(0,0,0,0.12); }
.mv-card h3 { margin:8px 0 8px; color:#23384d; font-size:18px; }
.mv-card p { color:#46627f; font-size:15px; line-height:1.7; margin:0; }
.mv-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:linear-gradient(180deg, rgba(0,86,179,0.1), rgba(0,160,233,0.1)); color: var(--primary-color); }

@media (max-width: 992px) {
  .about-stats { grid-template-columns: 1fr; }
  .about-text.cols-2 { columns: 1; }
  .mv-grid { grid-template-columns: 1fr; }
}
.nav .dropdown { position: relative; }
.nav .has-caret { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav .has-caret::after { content: '\25BE'; font-size: 10px; color: var(--text-color); transition: transform .2s ease, color .2s ease; }
.nav .dropdown.open > .has-caret::after, .nav .dropdown:hover > .has-caret::after { transform: rotate(180deg); color: var(--primary-color); }
/* Global dropdown styles removed - using specific .nav .dropdown styles only */

/* Header */
/* logo LED strip effect (reset + new) */
.logo { position: relative !important; display: inline-block !important; filter: none !important; }
.logo:hover { filter: none !important; }
.logo-container::before, .logo-container::after { content: none !important; }

/* Thin blue LED strip at the right edge of the logo, pulsing softly */
.logo::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 12%;
  width: 4px;
  height: 76%;
  background: linear-gradient(180deg, rgba(0,160,233,0.9), rgba(0,160,233,0.45));
  box-shadow: 0 0 6px rgba(0,160,233,0.75), 0 0 14px rgba(0,160,233,0.45);
  border-radius: 3px;
  pointer-events: none;
  animation: ledPulse 2.8s ease-in-out infinite;
}

@keyframes ledPulse {
  0%, 100% {
    opacity: 0.28;
    box-shadow: 0 0 4px rgba(0,160,233,0.45), 0 0 10px rgba(0,160,233,0.30);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(0,160,233,0.85), 0 0 18px rgba(0,160,233,0.60);
  }
}

/* Header */
.header, .nav { overflow: visible; }
.header { z-index: 3000; }
.nav .dropdown > .dropdown-menu { z-index: 4000; }
.nav .dropdown { position: relative; }
.nav .dropdown > .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px; /* widen panel so jerarquía respire */
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 8px 6px;
  display: none;
  z-index: 2000; /* above page content */
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.nav .dropdown.open > .dropdown-menu { display: block; opacity: 1; transform: translateY(0); }
.nav .dropdown .dropdown-menu a { display:block; padding:10px 14px; color:#2d3e50; border-radius:8px; }
.nav .dropdown .dropdown-menu a:hover { background:#f3f7fb; color:#0f65d1; }

/* Second-level (nested) dropdowns as inline hierarchical block inside first panel */
.nav .dropdown .dropdown-menu .dropdown { position: relative; }
.nav .dropdown .dropdown-menu .dropdown > .dropdown-menu {
  position: static !important;           /* no flyout; render inline under parent */
  top: auto !important; left: auto !important;
  display: none;                          /* hidden by default */
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 6px 0 6px 12px !important;    /* indent */
  margin: 6px 0 8px 16px !important;     /* separation from parent */
  border-left: 2px solid #e6eef8 !important; /* guide line to show pertenencia */
  transform: none !important;
  opacity: 1 !important;
}
.nav .dropdown .dropdown-menu .dropdown.open > .dropdown-menu { display: block !important; }
.nav .dropdown .dropdown-menu .dropdown > .dropdown-menu a {
  font-size: 14px !important;             /* smaller text for hierarchy */
  color: #46627f !important;
  padding: 8px 12px !important;
}
.nav .dropdown .dropdown-menu .dropdown > .dropdown-menu a:hover { background:#f6faff !important; color:#0f65d1 !important; }

/* Mobile drawer adjustments */
@media (max-width: 992px) {
  .nav .dropdown > .dropdown-menu,
  .nav .dropdown .dropdown-menu .dropdown > .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 12px; /* indent nested items */
    margin: 0;
    transform: none;
    opacity: 1;
  }
  .nav .dropdown.open > .dropdown-menu,
  .nav .dropdown .dropdown-menu .dropdown.open > .dropdown-menu { display: block; }
}

/* Animación del botón hamburguesa a “X” */
@media (max-width: 992px) {
  .mobile-menu-btn { position: relative; }
  .mobile-menu-btn span { transform-origin: center; }
  .mobile-menu-btn.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
  .mobile-menu-btn.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
}

/* AGPT Z-INDEX FIX - Ensure mobile menu works on all pages */
.header, .site-header, header {
  position: relative !important;
  z-index: 10001 !important;
}

/* Mobile menu dropdown above everything */
.mobile-overlay, .simple-mobile-overlay, #ultra-mobile-overlay,
.mobile-menu, .navbar-mobile {
  position: fixed !important;
  z-index: 10002 !important;
}

/* Prevent overlays from blocking hamburger button */
.section::before, .section::after,
.hero::before, .hero::after,
.equipment-hero::before, .equipment-hero::after,
.products::before, .products::after {
  pointer-events: none !important;
}

/* Ensure nav containers don't clip mobile menu */
.nav, .nav-container, .header, .site-header {
  overflow: visible !important;
}

/* Mobile hamburger button always clickable */
.mobile-menu-btn {
  position: relative !important;
  z-index: 10003 !important;
  pointer-events: auto !important;
}

/* Mobile image fixes for nosotros.html */
@media (max-width: 768px) {
  .mv-card img {
    width: 90% !important;
    max-width: 400px !important;
  }
  
  .about .mv-card {
    max-width: 95% !important;
    padding: 20px !important;
  }
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: none;
    background-size: cover;
    position: relative;
    color: var(--light-text);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

/* Hero in video mode -> behave like main banner (full-bleed background cover) */
.hero.video-mode { background: none; height: clamp(380px, 80vh, 820px) !important; padding: 0; position: relative; display: block; }
.hero.video-mode .video-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  min-width: 100%; min-height: 100%;
  object-fit: cover; object-position: center center;
  z-index: 0;
}
.hero.video-mode .hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.15)); z-index: 1; }
/* Hide legacy content across breakpoints */
.hero.video-mode .hero-container, .hero.video-mode .scroll-indicator { display: none !important; }

@media (max-width: 992px) {
  .hero.video-mode { height: clamp(300px, 62vh, 560px) !important; }
}

.hero-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    padding: 0;
}

.hero-text-panel {
    background-color: rgba(0, 0, 0, 0.65);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-left: 5px solid var(--accent-color);
    max-width: 600px;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.certificate-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.certificate-container:hover {
    transform: scale(1.02);
}

.hero-image-container {
    max-width: 450px;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    object-fit: contain;
    max-height: 100%;
    display: block;
    margin: 0 auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--light-text);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background-color: var(--light-text);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

.arrow {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.arrow span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--light-text);
    border-right: 2px solid var(--light-text);
    transform: rotate(45deg);
    animation: arrow 1.5s infinite;
    opacity: 0;
}

.arrow span:nth-child(1) {
    animation-delay: 0s;
}

/* Global Styles */
:root {
    --primary-color: #0056b3;
    --secondary-color: #00a0e9;
    --accent-color: #ff6b00;
    --text-color: #333;
    --light-text: #fff;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --gray-bg: #f0f0f0;
    --border-color: #ddd;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}
/* Dim background when mobile menu is open */
body.menu-open::after {
    content: '';
    position: fixed; inset: 0; z-index: 900;
    background: rgba(0,0,0,0.28);
    pointer-events: none; /* do not block clicks */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--light-text);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-text);
    border: 2px solid var(--light-text);
}

.btn-secondary:hover {
    background-color: var(--light-text);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-link {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--accent-color);
}

.btn-link:hover::after {
    width: 100%;
    background-color: var(--accent-color);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

.separator {
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0 auto;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    text-align: center;
}

.logo-img {
    width: 180px;
    height: auto;
    margin: 0 auto 15px;
    animation: pulse 1.5s infinite alternate;
}

.loader p {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 10px;
    opacity: 0;
    animation: fade-in 1.5s forwards;
}

@keyframes pulse {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.05); }
}

@keyframes fade-in {
    0% { opacity: 0; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,86,179,0.32), rgba(255,255,255,0.98));
    backdrop-filter: saturate(120%) blur(4px);
    border-bottom: 1px solid rgba(0,86,179,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transition: var(--transition);
    position: sticky;
}

/* Blue overlay across whole header block */
.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,86,179,0.18), rgba(0,160,233,0.08));
    pointer-events: none;
    z-index: 0;
}

/* When mobile menu is open, make header backdrop fully solid for clarity */
body.menu-open .header { background: #ffffff; box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
body.menu-open .header::before { background: transparent; }

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    position: relative;
}

.logo {
    width: 60px;
    height: auto;
    margin-right: 15px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(0,160,233,0.35)); /* more visible glow */
    transition: filter .25s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 16px rgba(0,160,233,0.48));
}

/* soft halo behind logo */
.logo-container::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: radial-gradient(circle at 50% 50%, rgba(0,160,233,0.38), rgba(0,160,233,0.0) 60%);
    filter: blur(6px);
    z-index: 0;
    pointer-events: none;
}

/* pulsing edge lights on the logo (left/right) */
.logo-container::before {
    content: '';
    position: absolute;
    left: -6px; /* left edge */
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 36px;
    background: radial-gradient(circle at 0% 50%, rgba(0,160,233,0.55), rgba(0,160,233,0) 70%);
    filter: blur(4px);
    opacity: 0.35;
    animation: logoGlowPulse 3.2s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}
.logo-container .logo::after { /* right edge, using wrapper around img impossible, so simulate with another absolute spot */
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 38px;
    background: radial-gradient(circle at 100% 50%, rgba(0,160,233,0.55), rgba(0,160,233,0) 70%);
    filter: blur(4px);
    opacity: 0.35;
    animation: logoGlowPulse 3.2s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes logoGlowPulse {
    0%, 100% { opacity: 0.20; }
    50% { opacity: 0.65; }
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.logo-text p {
    font-size: 14px;
    color: var(--text-color);
    margin: 0;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-list li {
    margin-left: 30px;
}

.nav-list a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-list a:hover {
    color: var(--primary-color);
}

.nav-list a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Mobile Navigation Behavior */
@media (max-width: 992px) {
  .mobile-menu-btn { display: flex; z-index: 1200; width: 34px; height: 22px; gap: 5px; }
  .nav { position: relative; }
  /* Mobile drawer */
  .nav-list {
    position: fixed; top: var(--header-height, 80px); right: 0; bottom: 0; left: auto;
    width: min(86vw, 360px);
    height: calc(100vh - var(--header-height, 80px));
    display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    background: linear-gradient(180deg, #eaf4ff 0%, #f2f8ff 55%, #ffffff 100%);
    padding: 10px 0; border-left: 1px solid rgba(0,86,179,0.12);
    box-shadow: -24px 0 48px rgba(0,86,179,0.18);
    border-radius: 12px 0 0 0; overflow: auto;
    opacity: 0; pointer-events: none; transform: translateX(100%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
    z-index: 1100; backdrop-filter: saturate(120%) blur(6px);
  }
  .nav-list li { margin: 0; border-bottom: 1px solid rgba(0,86,179,0.08); position: relative; }
  .nav-list li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .2s ease; }
  .nav-list li:last-child { border-bottom: 0; }
  .nav-list { font-family: 'Montserrat', sans-serif; }
  .nav-list a { padding: 12px 14px; width: 100%; font-size: 16px; text-align: left; color: #1e3550; letter-spacing: .2px; border-radius: 8px; }
  .nav-list a:hover { background: linear-gradient(90deg, #eef6ff 0%, #ffffff 70%); }
  .nav-list a.active { color: var(--primary-color); font-weight: 600; }
  .nav-list.active { opacity: 1; pointer-events: auto; transform: translateX(0); }
  /* Mobile dropdown look */
  .nav .dropdown .dropdown-menu { background: linear-gradient(180deg, #f7fbff, #ffffff); border: 1px solid rgba(0,86,179,0.14); border-radius: 12px; margin: 6px 12px 12px; padding: 6px; box-shadow: 0 12px 24px rgba(0,86,179,0.12); }
  .nav .dropdown .dropdown-menu a { padding: 10px 12px 10px 16px; font-size: 15px; }
  /* Mobile nested menu inline */
  .nav .dropdown .dropdown-menu .dropdown > .dropdown-menu { position: static !important; background: transparent !important; border: 0 !important; box-shadow: none !important; margin: 4px 0 4px 16px !important; padding: 4px 0 !important; border-left: 2px solid #e6eef8 !important; }
  .nav .dropdown .dropdown-menu .dropdown > .dropdown-menu a { font-size: 13px !important; color: #46627f !important; padding: 6px 8px !important; }
  .nav .dropdown .has-caret { justify-content: space-between; font-weight: 600; color: #1e3550; padding: 12px 14px; }
  .nav .dropdown .has-caret::after { margin-left: 8px; transition: transform .2s ease; }
  .nav .dropdown.open > .has-caret::after { transform: rotate(180deg); }
  /* Compact brand text to avoid crowding */
  .logo-text h1 { font-size: 18px; }
  .logo-text p { font-size: 12px; opacity: .85; }
}

/* Animación del botón hamburguesa a “X” */
@media (max-width: 992px) {
  .mobile-menu-btn { position: relative; }
  .mobile-menu-btn span { transform-origin: center; }
  .mobile-menu-btn.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
  .mobile-menu-btn.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: none;
    background-size: cover;
    position: relative;
    color: var(--light-text);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

/* Hero in video mode -> behave like main banner (full-bleed background cover) */
.hero.video-mode { background: none; height: clamp(380px, 80vh, 820px) !important; padding: 0; position: relative; display: block; }
.hero.video-mode .video-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  min-width: 100%; min-height: 100%;
  object-fit: cover; object-position: center center;
  z-index: 0;
}
.hero.video-mode .hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.15)); z-index: 1; }
/* Hide legacy content across breakpoints */
.hero.video-mode .hero-container, .hero.video-mode .scroll-indicator { display: none !important; }

@media (max-width: 992px) {
  .hero.video-mode { height: clamp(300px, 62vh, 560px) !important; }
}

.hero-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    padding: 0;
}

.hero-text-panel {
    background-color: rgba(0, 0, 0, 0.65);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-left: 5px solid var(--accent-color);
    max-width: 600px;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.certificate-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.certificate-container:hover {
    transform: scale(1.02);
}

.hero-image-container {
    max-width: 450px;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    object-fit: contain;
    max-height: 100%;
    display: block;
    margin: 0 auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--light-text);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background-color: var(--light-text);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

.arrow {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.arrow span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--light-text);
    border-right: 2px solid var(--light-text);
    transform: rotate(45deg);
    animation: arrow 1.5s infinite;
    opacity: 0;
}

.arrow span:nth-child(1) {
    animation-delay: 0s;
}

.arrow span:nth-child(2) {
    animation-delay: 0.2s;
}

.arrow span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes arrow {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* About Section */
.about {
    padding: 100px 0;
    position: relative;
    background-color: var(--light-bg);
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background-color: rgba(0, 86, 179, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.about::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 107, 0, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.8;
    position: relative;
}

.about-text a {
    font-weight: 500;
}

.highlight-link {
    position: relative;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s;
}

.highlight-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.highlight-link:hover {
    color: var(--accent-color);
}

.highlight-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.about-features {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    color: var(--accent-color);
    font-size: 18px;
}

.feature-item span {
    font-weight: 500;
    font-size: 17px;
}

.about-image-container {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.about-full-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
    object-fit: contain;
    display: block;
}

.about-image {
    flex: 1;
    position: relative;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.about-image:hover {
    transform: perspective(1000px) rotateY(0);
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 500px;
}

.about-responsive-img {
    display: block;
    margin: 0 auto;
    width: 100% !important;
    height: auto !important;
    object-position: center;
    object-fit: contain !important;
    max-height: none !important;
}

.website-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 10px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.website-badge:hover {
    transform: scale(1.05);
}

.website-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.website-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 86, 179, 0.8);
    padding: 10px;
    text-align: center;
}

.website-overlay p {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 14px;
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        width: 100%;
    }
    
    .about-image-container {
        width: 100%;
        margin-top: 30px;
    }
    
    .about-full-img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    
    .website-badge {
        width: 150px;
        height: 150px;
        bottom: -20px;
        right: -20px;
    }
}

@media (max-width: 768px) {
    .about-features {
        gap: 10px;
    }
    
    .about-image-container {
        width: 100%;
        margin: 20px 0;
        padding: 0;
    }
    
    .about-full-img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        display: block;
        margin: 0;
        padding: 0;
    }
    
    .about-image {
        height: auto;
        margin: 0 auto;
        width: 100%;
        max-width: 350px;
    }
    
    .about-image img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        border-radius: 8px;
        display: block;
    }
    
    .about-responsive-img {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: auto !important;
    }
    
    .website-badge {
        width: 120px;
        height: 120px;
        bottom: -15px;
        right: -15px;
    }
    
    .website-overlay p {
        font-size: 12px;
    }
}

/* Products Section */
.products {
    padding: 40px 0 80px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

.product-info p {
    margin-bottom: 20px;
    font-size: 15px;
}

/* Advantages Section */
.advantages {
    padding: 80px 0 40px;
    background-color: var(--light-bg);
    position: relative;
    overflow: hidden;
}

/* Extra spacing helper when section is followed by footer */
.advantages.has-footer-gap {
    padding-bottom: 96px; /* more air to separate from footer */
    margin-bottom: 16px;
}

.advantages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 107, 0, 0.05), transparent 70%),
                radial-gradient(circle at bottom left, rgba(0, 86, 179, 0.05), transparent 70%);
    z-index: 0;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--gray-text);
    font-size: 18px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.advantage-card {
    background-color: var(--light-text);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    height: 100%;
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.advantage-image {
    height: 200px;
    overflow: hidden;
}

.advantage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.advantage-card:hover .advantage-image img {
    transform: scale(1.1);
}

.advantage-card h3 {
    padding: 20px 20px 10px;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
}

.advantage-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.advantage-card:hover h3::after {
    width: 80px;
}

.advantage-card p {
    padding: 10px 20px 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-text);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 86, 179, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.advantage-card:hover .card-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    color: white;
}

.advantage-card:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    margin-bottom: 15px;
    color: var(--accent-color);
}

.overlay-content h4 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

@media (max-width: 992px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: var(--light-text);
}

.cta h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}

.cta p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}

.contact-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

.contact-item p {
    margin-bottom: 5px;
}

.contact-item a {
    color: var(--text-color);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

/* Contact Form Styles */
.contact-form {
    background-color: var(--light-text);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

.form-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.success-message, 
.error-message {
    display: none;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
}

.success-message {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.success-message i,
.error-message i {
    font-size: 24px;
    margin-bottom: 10px;
}

.success-message p,
.error-message p {
    margin: 0;
    font-size: 16px;
}

/* Human Verification Styles */
.human-verification {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0056b3;
}

.verification-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.verification-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 4px;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.verification-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.verification-container input:checked ~ .checkmark {
    background-color: #0056b3;
    border-color: #0056b3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.verification-container input:checked ~ .checkmark:after {
    display: block;
}

.verification-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.verification-text {
    font-weight: 500;
    color: #333;
    margin-left: 10px;
}

.shield-icon {
    margin-left: 15px;
    color: #0056b3;
    font-size: 20px;
}

.recaptcha-note {
    font-size: 12px;
    color: #777;
    text-align: center;
    margin-top: 10px;
}

/* Ajuste para la imagen en la sección Sobre Nosotros */
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.about-text {
    flex: 5;
    max-width: 85%;
}

.about-image {
    flex: 1;
    max-width: 15%;
    max-height: 150px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    margin-top: 20px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        max-width: 100%;
    }
    
    .about-image {
        max-width: 80%;
        margin: 20px auto;
    }
}

.service-image img {
    max-width: 220px;
}

/* Competitive Advantages Section */
.competitive-advantages {
    background-color: #ffffff;
    padding: 60px 0 30px;
}

.competitive-advantages .container { 
    max-width: 1200px; 
}

.comp-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.08);
    padding: 24px;
}

.comp-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .4px;
    color: var(--primary-color);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.comp-list {
    list-style: disc inside;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    line-height: 1.7;
}

.comp-list li::marker { 
    color: var(--accent-color); 
}

.comp-list li { 
    color: #333; 
}

.comp-media { 
    text-align: center; 
}

.comp-image {
    width: 100%;
    max-width: 460px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    object-fit: cover;
    transition: transform .35s ease, box-shadow .35s ease;
    will-change: transform;
}

.comp-media:hover .comp-image {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0,0,0,0.16);
}

@media (max-width: 992px) {
    .competitive-advantages { 
        padding: 48px 0 24px; 
    }
    .comp-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; 
        padding: 20px; 
    }
    .comp-media { 
        order: -1; 
    }
    .comp-text h2 { 
        font-size: 22px; 
    }
    .comp-image { 
        max-width: 420px; 
    }
}

/* Certifications Strip (bigger) */
.certifications-strip {
    background: linear-gradient(180deg, #f3f8fd 0%, #eef4f9 100%);
    padding: 34px 0; 
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.certifications-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 64px; 
    flex-wrap: wrap;
}

.certification-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.certification-image {
    height: 72px; 
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .certifications-container { gap: 36px; }
    .certification-image { height: 56px; }
}

/* Brands Section (bigger) */
.brands-section {
    background: #fff;
    padding: 18px 0 48px; 
    border-bottom: 1px solid var(--border-color);
}

.brands-title {
    text-align: center;
    font-size: 28px; 
    font-weight: 600;
    color: #6d8fb9;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: .2px;
    margin-bottom: 12px;
}

.brand-marquee {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 16px 0; 
    --marquee-speed: 36s;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0, rgba(0,0,0,1) 70px, rgba(0,0,0,1) calc(100% - 70px), rgba(0,0,0,0) 100%);
            mask-image: linear-gradient(to right, rgba(0,0,0,0) 0, rgba(0,0,0,1) 70px, rgba(0,0,0,1) calc(100% - 70px), rgba(0,0,0,0) 100%);
}

.brand-marquee::before,
.brand-marquee::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 70px; 
    pointer-events: none;
    z-index: 2;
}
.brand-marquee::before { left: 0; background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 100%); }
.brand-marquee::after { right: 0; background: linear-gradient(to left, #fff 0%, rgba(255,255,255,0) 100%); }

.brand-track {
    display: inline-flex;
    align-items: center;
    gap: 100px; 
    white-space: nowrap;
    will-change: transform;
    animation: brandsScroll var(--marquee-speed) linear infinite;
}

.brand-marquee:hover .brand-track { animation-play-state: paused; }

.brand-logo {
    height: 100px; 
    width: auto;
    object-fit: contain;
    opacity: 1;
    transition: transform 300ms ease, filter 300ms ease;
    filter: saturate(1) contrast(1.05);
}

.brand-logo:hover { transform: scale(1.05); filter: saturate(1.05) contrast(1.06); }

@keyframes brandsScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

@media (max-width: 768px) {
    .brand-logo { height: 64px; }
    .brand-track { gap: 48px; }
    .brand-marquee { --marquee-speed: 26s; }
}

@media (prefers-reduced-motion: reduce) {
    .brand-marquee { --marquee-speed: 0.001s; }
    .brand-track { animation-iteration-count: 1; }
}

/* Footer Section */
.footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    width: 120px;
    margin-bottom: 15px;
}

.footer-logo p {
    font-size: 14px;
    opacity: 0.8;
}

.footer h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--light-text);
    position: relative;
    padding-bottom: 10px;
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    color: var(--light-text);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--accent-color);
    opacity: 1;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-social p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

.yire-link {
    color: var(--accent-color);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.yire-link:hover {
    color: #ff8c40;
}

.yire-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #ff8c40;
    transition: width 0.3s ease;
}

.yire-link:hover::after {
    width: 100%;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-float i {
    color: #FFF !important;
    font-size: 30px;
    line-height: 1;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
    
    .whatsapp-float i {
        font-size: 25px;
    }
}

/* Gallery Section */
.gallery {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 86, 179, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-info {
    text-align: center;
    color: var(--light-text);
    padding: 20px;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-info {
    transform: translateY(0);
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Error Styles */
.form-group.error input,
.form-group.error textarea {
    border-color: #ff3860;
}

.error-message {
    color: #ff3860;
    font-size: 14px;
    margin-top: 5px;
}

.success-message {
    background-color: #23d160;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

/* Video Overlay Styles */
.video-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-overlay iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 86, 179, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: var(--primary-dark, #004a99);
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

@media screen and (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }
    .about-text,
    .about-image {
        flex: none;
        width: 100%;
    }
    .about-image {
        margin-top: 30px;
    }
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-list.active {
        display: flex;
    }
}

@media (max-width: 992px) {
    .header .container {
        padding: 10px 15px;
    }
    
    .logo {
        width: 50px;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .logo-text p {
        font-size: 12px;
    }
    
    .nav-list li {
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }
    
    .header .container {
        padding: 10px 15px;
        width: 100%;
    }
    
    .logo-container {
        z-index: 1001;
    }
    
    .logo {
        width: 45px;
    }
    
    .logo-text h1 {
        font-size: 18px;
    }
    
    .nav {
        position: relative;
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--light-text);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding-top: 80px;
    }
    
    .nav-list.active {
        right: 0;
    }
    
    .nav-list li {
        margin: 15px 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .header {
        height: 70px;
        display: flex;
        align-items: center;
    }
    
    .nav-list a {
        font-size: 18px;
    }
    
    .hero {
        padding-top: 30px;
        padding-bottom: 200px;
        height: auto;
        min-height: 100vh;
    }
    
    .hero-content {
        padding-top: 20px;
    }
}

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 80px;
        padding-bottom: 0;
    }
    
    .hero-content {
        margin-bottom: 40px;
    }
    
    .hero-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-image-container {
        max-width: 350px;
    }
    
    .hero-text-panel {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .hero-image-container {
        max-width: 350px;
        width: 100%;
        margin: 0 auto;
        padding-top: 30px;
        position: relative;
    }
    
    .hero-text-panel {
        padding: 25px;
    }
}

/* New Service Section Styles */
.service-highlight {
    padding: 40px 0;
    background-color: var(--light-bg);
}

.service-card {
    background-color: var(--light-text);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 32px;
    border: 1px solid var(--border-color);
    border-left: 4px solid rgba(0, 86, 179, 0.2);
}

.service-content {
    display: block;
    margin-top: 16px;
    overflow: hidden;
}
/* Force vertical stack when .vertical is present (text first, media below) */
.service-content.vertical {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
/* Enfriadores: ensure media below text and full width in vertical mode */
#enfriadores .service-content.vertical .service-text { order: 1; }
#enfriadores .service-content.vertical .service-media { order: 2; float: none; width: 100%; }

.service-text {
    float: left;
    width: 60%;
    display: block;
    box-sizing: border-box;
    padding-right: 16px;
}

.service-text p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-bottom: 28px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
}

.feature-item i {
    color: var(--primary-color);
    opacity: 0.9;
    font-size: 18px;
}

.service-media {
    float: right;
    width: 35%;
    display: block;
    box-sizing: border-box;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.service-image img {
    width: 100%;
    max-width: 220px;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 0 auto;
}

/* Allow overlay controls over the image */
.service-image {
    position: relative;
    display: inline-block;
    height: 100%;
    width: 100%;
}

/* Floating action button to play video (opens GLightbox) */
.play-fab {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.play-fab i { font-size: 18px; }
.play-fab:hover {
    background: var(--primary-dark, #004a99);
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

.service-video video {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}

/* GLightbox Thumbnail for Service Video */
.service-video-thumb {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.service-video-thumb img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    filter: saturate(0.95) contrast(1);
    transition: transform 0.35s ease, filter 0.35s ease;
}

.service-video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.35));
    pointer-events: none;
}

.service-video-thumb:hover img {
    transform: scale(1.03);
    filter: saturate(1) contrast(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay i {
    color: var(--primary-color);
    font-size: 18px;
    margin-left: 2px;
}

.service-video-thumb:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.05);
    background: rgba(255,255,255,1);
}

/* More sober icons only in this section */
.service-features .feature-item i {
    color: var(--primary-color);
    font-size: 20px;
}

@media (max-width: 768px) {
    .service-content {
        overflow: visible;
    }
    
    .service-text {
        float: none;
        width: 100%;
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .service-media {
        float: none;
        width: 100%;
    }
    
    .service-features {
        flex-direction: column;
    }
    
    .feature-item {
        flex: 1 1 100%;
    }
    
    .service-highlight {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 25px;
    }
}

/* About sizing overrides (place at end for precedence) */
.about .about-text { flex: 0 0 75%; max-width: 75%; }
.about .about-image-container { flex: 0 0 25%; max-width: 25%; }
.about .about-full-img { width: 100%; height: auto; max-height: 320px; object-fit: contain; }
.about .about-content { justify-content: center; align-items: center; gap: 40px; }
.about .about-text { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    background: #fff; 
    border: 1px solid var(--border-color);
    border-left: 6px solid var(--accent-color);
    border-radius: 12px;
    padding: 24px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.about .about-image-container { display: flex; justify-content: center; align-items: center; }

/* Force two-column layout for tablets and up */
@media (min-width: 769px) {
  .about .about-content { flex-direction: row !important; }
}

@media (max-width: 768px) {
  .about .about-text, .about .about-image-container { flex: 0 0 100%; max-width: 100%; }
  .about .about-full-img { max-height: none; }
  .about .about-text { padding: 20px; border-left-width: 5px; }
}

/* About image framing and badge */
.about .about-visual {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}
.about .about-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.95);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Competitive advantages: check icons instead of bullets */
.comp-list { list-style: none; }
.comp-list li { position: relative; padding-left: 26px; }
.comp-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--accent-color);
}

/* Enfriadores: Ice band behind the entire video block (high specificity) */
#enfriadores .service-card .service-media {
  position: relative !important;
  padding: 40px 20px !important;
  margin: 20px 0 !important;
  min-height: 320px;
  overflow: visible;
  text-align: center;
}
#enfriadores .service-card .service-media::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(173,216,230,0.8) 0%, rgba(173,216,230,0) 12%),
    radial-gradient(circle at 85% 15%, rgba(176,224,230,0.7) 0%, rgba(176,224,230,0) 10%),
    radial-gradient(circle at 25% 75%, rgba(135,206,235,0.6) 0%, rgba(135,206,235,0) 15%),
    radial-gradient(circle at 75% 85%, rgba(173,216,230,0.5) 0%, rgba(173,216,230,0) 12%),
    radial-gradient(circle at 45% 35%, rgba(176,224,230,0.4) 0%, rgba(176,224,230,0) 8%),
    radial-gradient(circle at 65% 65%, rgba(135,206,235,0.3) 0%, rgba(135,206,235,0) 14%),
    repeating-linear-gradient(45deg, rgba(240,248,255,0.3) 0px, rgba(240,248,255,0) 4px, rgba(173,216,230,0.15) 8px, rgba(173,216,230,0) 12px),
    repeating-linear-gradient(-45deg, rgba(176,224,230,0.2) 0px, rgba(176,224,230,0) 6px, rgba(135,206,235,0.1) 12px, rgba(135,206,235,0) 16px),
    linear-gradient(180deg, #e6f7ff 0%, #cceeff 30%, #b3e0ff 70%, #ffffff 100%);
  border: 2px solid rgba(135,206,235,0.4);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(135,206,235,0.3), inset 0 2px 0 rgba(240,248,255,0.9), 0 15px 60px rgba(173,216,230,0.4);
  z-index: 0;
  pointer-events: none;
  /* DEBUG: visible outline to confirm selector + load; remove after confirming */
  outline: 2px dashed rgba(0,86,179,0.55);
  background-color: rgba(0,160,233,0.08);
}
#enfriadores .service-card .service-media .media-frame { position: relative; z-index: 1; }
#enfriadores .service-card .service-media .media-body video {
  width: 10%;
  max-width: 220px;
  height: auto;
}
@media (max-width: 992px) {
  #enfriadores .service-card .service-media .media-body video { width: 100%; max-width: 100%; }
}

/* Enfriadores: enforce sizing by ID to avoid any cascade issues */
#enfriadores #enfriadores-video {
  width: 50% !important;   /* half the container width */
  max-width: 480px !important;
  height: auto !important;
  display: inline-block;
}
@media (max-width: 992px) {
  #enfriadores #enfriadores-video { width: 100% !important; max-width: 100% !important; }
}

/* =============================
   SISTEMAS BORIE OVERVIEW (HOME)
   Section: #sb-overview with polaroid images
   ============================= */
.sb-overview {
  padding: 80px 0;
  background: #fff;
}

.sb-overview .showcase-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* center pillar + right images */
  gap: 36px;
  align-items: center;
}

.sb-overview .show-center .pillar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--accent-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.sb-overview .pillar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  color: var(--primary-color);
  margin: 0 0 6px 0;
  text-align: center;
}

.sb-overview .pillar-sub {
  font-size: 16px;
  color: #46627f;
  text-align: center;
  margin-bottom: 16px;
}

.sb-overview .industry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}

.sb-overview .ind-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 6px;
  border: 1px solid #eef3f8;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  color: #27455f;
  font-size: 13px;
}

.sb-overview .ind-item i { color: var(--primary-color); }

/* Right side: stacked polaroids */
.sb-overview .show-right { display: flex; justify-content: center; }
.sb-overview .polaroid-stack {
  position: relative;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sb-overview .polaroid {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-overview .polaroid.top { transform: rotate(-3deg); z-index: 2; }
.sb-overview .polaroid.back { transform: rotate(2.5deg); z-index: 1; filter: saturate(0.95) contrast(0.98); }

.sb-overview .polaroid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

/* Ensure visibility on larger screens */
@media (min-width: 993px) {
  .sb-overview .polaroid-stack { min-height: 420px; }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .sb-overview { padding: 60px 0; }
  .sb-overview .showcase-grid { grid-template-columns: 1fr; gap: 20px; }
  .sb-overview .industry-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sb-overview .polaroid-stack { width: min(320px, 100%); aspect-ratio: 4/5; margin: 0 auto; }
}

/* Spacing tweak: reduce air between SB overview and Enfriadores */
.sb-overview { padding-bottom: 48px; }
.sb-overview + .service-highlight { padding-top: 24px; }