/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.4);
    
    /* Colores rosado pastel para ortodoncia */
    --pastel-pink: #f8b5c1;
    --pastel-pink-light: #fce4e8;
    --pastel-pink-dark: #e8a3b0;
    --pastel-pink-accent: #f2a6b3;
    --gradient-pastel: linear-gradient(135deg, #f8b5c1 0%, #fce4e8 100%);
    --gradient-pastel-2: linear-gradient(135deg, #f2a6b3 0%, #f8b5c1 100%);
    --gradient-pastel-3: linear-gradient(135deg, #fce4e8 0%, #e8a3b0 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
  }

/* Evita que el header fijo tape el inicio de las secciones al hacer scroll */
section[id] { scroll-margin-top: 90px; }

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    z-index: 2000; /* elevar sobre controles Leaflet */
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: #52A2B4;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h2 {
    background-color: var(--pastel-pink-dark);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

/* Logo blanco cuando navbar es transparente */
.navbar:not(.scrolled) .logo h2 {
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Logo blanco cuando navbar tiene fondo */
.navbar.scrolled .logo h2 {
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.Ct {
    margin-top: 1.5rem; /* mt-6 = 1.5rem (24px) */
    background: radial-gradient( circle 437px at -14.6% -4.3%,  rgba(17,148,138,1) 3.1%, rgba(78,206,187,1) 48.1%, rgba(149,252,239,1) 100.3% ); /* bg-gradient-to-r from-accent to-gold */
    color: white; /* text-white */
    text-align: center; /* text-center */
    padding-top: 1rem;    /* py-4 = padding-y 1rem */
    padding-bottom: 1rem;
    padding-left: 1.5rem; /* px-6 = padding-x 1.5rem */
    padding-right: 1.5rem;
    border-radius: 9999px; /* rounded-full */
    font-weight: 600; /* font-semibold */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); /* shadow-lg */
    border-color: white;
  }
.Ct:hover{
    border-color: rgb(0, 0, 0);
    color: black;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 17px;
}

.nav-links a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.25s ease, background-color 0.25s ease;
    border-radius: 8px;
}

/* Enlaces blancos cuando navbar es transparente */
.navbar:not(.scrolled) .nav-links a {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Link activo: mantener color y resalte */
.nav-links a.active {
    color: #ffffff;
}

.navbar.scrolled .nav-links a.active {
    color: #ffffff;
}

/* Enlaces blancos cuando navbar tiene fondo */
.navbar.scrolled .nav-links a {
    color: white;
    text-shadow: none;
}

.nav-links a:not(.Ct)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.nav-links a:not(.Ct):hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* Botón blanco cuando navbar es transparente */
.navbar:not(.scrolled) .menu-toggle {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Botón blanco cuando navbar tiene fondo */
.navbar.scrolled .menu-toggle {
    color: white;
    text-shadow: none;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #52A2B4;
    overflow: hidden;
}

/* Contenedor de video */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 700ms ease-in-out;
}

.hero-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-video.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    animation: moveBackground 20s linear infinite;
    z-index: 2;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    max-width: 24ch;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 600ms ease both;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s both;
}

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

/* Preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    .hero::before { animation: none !important; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
}
@media (prefers-reduced-motion: reduce) {
    .scroll-indicator { animation: none; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn:focus-visible, .carousel-btn:focus-visible, .gallery-btn:focus-visible, .slider-btn:focus-visible, .nav-links a:focus-visible {
    outline: 3px solid #52A2B4;
    outline-offset: 2px;
    border-radius: 12px;
}

/* Override para el botón Ct: mantener completamente oval y sin anillo interior cuadrado */
.nav-links a.Ct { border-radius: 9999px; }
.nav-links a.Ct:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.35); border-radius: 9999px; }

.btn-primary {
    background: white;
    color: #1A4C8B;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: 'Quicksand', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background-color: #56B4B3 ;
    box-shadow: 0 15px 40px rgba(248, 181, 193, 0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    font-family: 'Quicksand', sans-serif;

}
/* Galería de imágenes */
.gallery-container {
    position: relative;
    width: 100%;
    height: min(400px, 55vh); /* Min para faciitar el desggose a los dispositivos moviles */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .gallery-container {
    height: clamp(240px, 50vh, 320px);
  }
}

@media (max-width: 480px) {
  .gallery-container {
    height: clamp(200px, 45vh, 280px);
  }
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.image-wrapper.active {
    opacity: 1;
}

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

/* Controles de navegación */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.gallery-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    pointer-events: all;
    opacity: 0.6;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-btn:hover {
    background: #3073B7;
    color: white;
    opacity: 0.9;
    transform: scale(1.1);
}
.gallery-btn:focus-visible, .carousel-btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(48, 115, 183, 0.35);
}

/* Indicadores */
.gallery-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

.btn-secondary:hover {
    background: #98979A;
    color: white;
    transform: translateY(-3px);
    border-color: white;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    background-image: linear-gradient(120deg, #fccb90 0%, #d57eeb 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(248, 181, 193, 0.3);
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: bold;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

/* 3D Card Effect */
.card-3d {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
}

/* Casos Clínicos */
.casos-clinicos {
    padding: 3rem 0;
    background: #F8FAFC;
    position: relative;
}

.casos-clinicos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="80" height="80" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="80" height="80" patternUnits="userSpaceOnUse"><circle cx="40" cy="40" r="2" fill="rgba(59,130,246,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
    z-index: 1;
}

.casos-clinicos .container {
    position: relative;
    z-index: 2;
}

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

.caso-card {
    background: white; /* Fondo semitransparente */
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    /* ¡Elimina opacity: 0.1! */
}
.caso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}
.caso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #D69FA2; /* Este puede seguir siendo sólido o también semitransparente */
    opacity: 0.5;
    z-index: 1;
}

.caso-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: black;
    box-shadow: 0 10px 30px rgba(248, 181, 193, 0.4);
    transition: all 0.3s ease;
}

.caso-card:hover .caso-icon {
    transform: scale(1.1) rotate(5deg);   
}

.caso-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.caso-card p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.card-link {
    color:  #3073B7;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.card-link:hover {
    gap: 1rem;
}

.card-link2 {
    color:  #000000;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    justify-content: center;
}

.card-link2:hover {
    gap: 1rem;
    text-align: center;
}

/* Servicios */
.servicios {
    padding: 3rem 0;
    background: white;
    position: relative;
}

.servicios::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="hexagons" width="100" height="100" patternUnits="userSpaceOnUse"><polygon points="50,10 80,30 80,70 50,90 20,70 20,30" fill="none" stroke="rgba(168,85,247,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23hexagons)"/></svg>');
    z-index: 1;
}

.servicios .container {
    position: relative;
    z-index: 2;
}

.servicios-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 3rem;
}

/* Cinta horizontal profesional de servicios */
.servicios-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 2rem 3.5rem; /* más espacio lateral para que asomen vecinos */
}

.servicios-grid {
    display: flex;
    gap: 2rem;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    width: max-content;
}

.servicios-grid.no-transition {
    transition: none;
}

/* Scrollbar personalizado para la cinta */
.servicios-carousel::-webkit-scrollbar {
    height: 8px;
}

.servicios-carousel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.servicios-carousel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.servicios-carousel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Contenedor de servicios con controles */
.servicios-container {
    position: relative;
}

/* Preloader */
body.loading { overflow: hidden; }
#preloader {
    position: fixed;
    inset: 0;
    background-image: linear-gradient( 174.2deg,  rgba(255,244,228,1) 7.1%, rgba(240,246,238,1) 67.4% );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; color: #fff; }
.preloader-logo { font-size: 4rem; animation: pulse 1.2s ease-in-out infinite; filter: drop-shadow(0 10px 30px rgba(0,0,0,.3)); }
.preloader-title { margin-top: .75rem; font-weight: 700; font-size: 2rem; letter-spacing: .5px; -webkit-text-stroke: 1px #000000; }
@keyframes pulse { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.08);} }

/* Servicio media skeleton */
.servicio-media { 
    width: 100%; height: 140px; border-radius: 14px; margin-bottom: 1rem; overflow: hidden; position: relative;
}
.servicio-media.skeleton::after {
    content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.05) 100%);
    animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { from{ transform: translateX(-100%);} to{ transform: translateX(100%);} }
.servicio-media img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .35s ease; }
.servicio-media.loaded img { opacity: 1; }
.servicio-media.loaded.skeleton::after { display: none; }

/* Controles de navegación profesionales */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.carousel-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #3073B7;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    position: relative;
    overflow: hidden;
}

.carousel-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.carousel-btn:hover::before {
    opacity: 1;
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}


/* Indicadores de posición */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
    padding: 1rem 0;
}
.carousel-indicators .indicator-dot[aria-selected="true"], .gallery-indicators .indicator[aria-selected="true"] {
    box-shadow: 0 0 0 3px rgba(82, 162, 180, 0.35);
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.indicator-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: #52A2B4;
    transform: scale(1.2);
}

.indicator-dot.active::before {
    border-color: rgba(102, 126, 234, 0.3);
}

.indicator-dot:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: scale(1.1);
}


.servicios-video {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.servicios-video:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.servicios-video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:  #52A2B4;
    opacity: 0.1;
    z-index: 1;
}

.servicios-video-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--dark-color);
}

.servicios-video h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: black;
    opacity: 0.8;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    text-align: center;
}

.servicios-video p {
    margin-bottom: 2rem;
    opacity: 0.8;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
}

.video-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.video-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
}

.video-placeholder i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.video-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.video-placeholder:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

/* Video automático */
.video-container {
    width: 100%;
    height: 220px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.video-container:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.auto-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.video-container:hover .video-overlay {
    opacity: 1;
}

.video-overlay i {
    transition: all 0.3s ease;
}

.video-container:hover .video-overlay i {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.servicio-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    width: 300px; /* base desktop */
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.servicio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: white; /* cambiar linea de la parte superior de las cartas de servicios */
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.servicio-item:hover::before {
    transform: scaleX(1);
}

.servicio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.servicio-item:nth-child(1) { background: #52A2B4; color: white; }
.servicio-item:nth-child(2) { background: #3073B7; color: white; }
.servicio-item:nth-child(3) { background: #1A4C8B; color: white; }
.servicio-item:nth-child(4) { background: #D69FA2; color: white; }
.servicio-item:nth-child(5) { background: #98979A; color: white; }
.servicio-item:nth-child(6) { background: #29CEB3; color: white; }
.servicio-item.s-7 { background: #AEE7F0 !important; color: rgb(0, 0, 0); }
.servicio-item.s-8 { background: #B8EBD0 !important; color: #0f172a !important; }

.servicio-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}
.servicio-icon .icon1 { /* Para cambiar cosas en los iconos */
    width: 4.4rem;
    height: 4.4rem;
    display: inline-block;
    background-color: transparent;
    border-color: black;
    position: relative;
    top: 10px;
    
}

/* Ajustar altura mínima */
.servicio-item {
    min-height: 320px;
}

/* Responsive para altura en móviles */
@media (max-width: 480px) {
    .servicio-item {
        min-height: 280px;
    }
}

/* ==================== MODAL DE SERVICIOS ==================== */
.service-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.service-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.service-modal.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: var(--dark-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-content {
    padding: 2.5rem;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f8b5c1 0%, #fce4e8 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.modal-header h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.modal-body p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-features {
    list-style: none;
    padding: 0;
}

.modal-features li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-color);
    line-height: 1.5;
}

.modal-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #52A2B4;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-footer {
    margin-top: 2rem;
    text-align: center;
}

.modal-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
}

/* Responsive para modal en móviles */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-icon {
        width: 60px;
        height: 60px;
    }

    .modal-icon-img {
        width: 40px;
        height: 40px;
    }
}

.servicio-icon .icon2 { /* Para cambiar cosas en los iconos */
    width: 4rem;
    height: 4rem;
    display: inline-block;
    background-color: transparent;
    border-color: black;
    position: relative;
    top: 10px;
    
}

.servicio-item.active:hover .servicio-icon {
    transform: scale(1.15) rotateY(360deg);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.servicio-item h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.servicio-item p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carrusel centrado - efecto giratorio y resalte del elemento activo */
.servicios-carousel {
    perspective: 1200px;
}
.servicios-grid {
    align-items: center;
}
.servicio-item { 
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease; 
    opacity: 0.6;
    transform-origin: center;
    z-index: 1;
}

/* Responsive para asegurar vecinos visibles */
@media (max-width: 1024px) {
    .servicios-carousel { padding: 2rem 3rem; }
}
@media (max-width: 820px) {
    .servicios-carousel { padding: 1.5rem 2.5rem; }
    .servicios-grid { gap: 1.25rem; }
    .servicio-item { width: 280px; }
}
@media (max-width: 640px) {
    .servicios-carousel { padding: 1.25rem 2rem; }
    .servicios-grid { gap: 1rem; }
    .servicio-item { width: 260px; }
}
@media (max-width: 400px) {
    .servicios-carousel { padding: 1rem 1.5rem; }
    .servicios-grid { gap: 0.75rem; }
    .servicio-item { width: 230px; }
}
.servicio-item.active { 
    transform: translateY(-8px) scale(1.06) rotateY(0deg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    opacity: 1;
    z-index: 3;
}
.servicio-item.prev {
    transform: rotateY(22deg) translateX(-20px) scale(0.96);
    opacity: 0.75;
    z-index: 2;
}
.servicio-item.next {
    transform: rotateY(-22deg) translateX(20px) scale(0.96);
    opacity: 0.75;
    z-index: 2;
}
@media (max-width: 640px) {
    .servicio-item.active { transform: translateY(-4px) scale(1.02); }
    .servicio-item.prev { transform: rotateY(10deg) translateX(-8px) scale(0.985); }
    .servicio-item.next { transform: rotateY(-10deg) translateX(8px) scale(0.985); }
}

/* Dots más claros en móvil */
@media (max-width: 480px) {
    .indicator-dot { width: 12px; height: 12px; background: rgba(0,0,0,.15); }
    .indicator-dot.active { background: #52A2B4; transform: scale(1.15); }
}

/* Controles táctiles más grandes en móvil */
@media (max-width: 480px) {
    .carousel-btn { width: 56px; height: 56px; font-size: 1.1rem; }
}

/* Reducir movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    .servicio-item, .carousel-btn, .indicator-dot, .video-container { transition: none !important; }
    .servicio-item, .servicio-item.active, .servicio-item.prev, .servicio-item.next { transform: none !important; }
}

/* Cartas: colores pastel por servicio (override) */
.servicio-item.s-1 { background: linear-gradient(135deg, #fde2e4 0%, #fff5f6 100%) !important; color: #0f172a; }
.servicio-item.s-2 { background: linear-gradient(135deg, #e2f0ff 0%, #f5faff 100%) !important; color: #0f172a; }
.servicio-item.s-3 { background: linear-gradient(135deg, #e7f8f3 0%, #f3fffb 100%) !important; color: #0f172a; }
.servicio-item.s-4 { background: linear-gradient(135deg, #fff3cd 0%, #fff9e6 100%) !important; color: #0f172a; }
.servicio-item.s-5 { background: linear-gradient(135deg, #ede7f6 0%, #f6f2ff 100%) !important; color: #0f172a; }
.servicio-item.s-6 { background: linear-gradient(135deg, #fce4ec 0%, #fff1f6 100%) !important; color: #0f172a; }

.servicio-item.s-1 .servicio-icon,
.servicio-item.s-2 .servicio-icon,
.servicio-item.s-3 .servicio-icon,
.servicio-item.s-4 .servicio-icon,
.servicio-item.s-5 .servicio-icon,
.servicio-item.s-6 .servicio-icon { color: #0f172a; }

/* Solo la carta activa tiene hover extra */
.servicio-item.active:hover {
    transform: translateY(-12px) scale(1.08) rotateY(0deg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
}

/* Ocultar cartas no visibles sin romper el flujo */
.servicio-item.hidden { opacity: 0; pointer-events: none; }
/* Ocultar clones cuando no son vecinos ni activos (evita percibir duplicados) */
.servicio-item[data-clone="true"]:not(.prev):not(.active):not(.next) { opacity: 0; visibility: hidden; pointer-events: none; }

/* Uniformidad visual extra */
.servicio-item h3 { line-height: 1.2; min-height: 1.8rem; }
.servicio-item p { line-height: 1.5; }

/* Instalaciones */
.instalaciones {
    padding: 6rem 0;
    background: var(--light-color);
}

.instalaciones-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.instalaciones-text h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.instalaciones-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.features-list i {
    background:  #3073B7;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.features-list li:hover i {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: scale(1.1);
}

/* Animación de gradiente para los iconos */
.features-list i {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.instalaciones-image .image-wrapper {
    width: 100%;
    height: 550px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    box-shadow: var(--shadow);
}

/* Testimonios */
.testimonios {
    padding: 3rem 0;
    background: white;
    position: relative;
}

.testimonios-slider {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2rem 0;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    --end-spacer: 0px; /* valor por defecto, JS lo ajusta */
}

/* Espaciador al final para que la última tarjeta pueda alinear al inicio */
.testimonios-slider::after {
    content: "";
    flex: 0 0 var(--end-spacer);
}

.testimonios-slider::-webkit-scrollbar {
    display: none;
}

.testimonio-card {
    min-width: 380px;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    width: 500px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.testimonio-card.active {
    border-color: palevioletred;
    box-shadow: 0 20px 60px rgba(248, 181, 193, 0.3);
}

.quote-icon {
    font-size: 3rem;
    color: #98979A;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.testimonio-text {
    font-size: 0.8rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-color);
    flex: 1;
    min-height: 1px;
}

.testimonio-autor {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.autor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-image: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    overflow: hidden; /* Recorta la imagen dentro del círculo */
}

.autor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.testimonio-autor h4 {
    margin-bottom: 0.3rem;
    color: var(--dark-color);
}

.rating {
    color: #fbbf24;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: #D69FA2;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(248, 181, 193, 0.3);
}

.slider-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Ubicación */
.ubicacion {
    padding: 6rem 0;
    background: var(--light-color);
}

.ubicacion-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.ubicacion-info {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.ubicacion-info h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.ubicacion-info > p {
    color: var(--text-color);
    margin-bottom: 2rem;
}

.ubicacion-detalles {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detalle-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.detalle-item i {
    font-size: 2rem;
    color: var(--pastel-pink-dark);
    min-width: 40px;
}
.detalle-item i {
    background:  #D69FA2;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.detalle-item li:hover i {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: scale(1.1);
}

.detalle-item h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.detalle-item p {
    color: var(--text-color);
}

.leaflet-map {
    width: 100%;
    height: 582.34px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Estilos para el mapa de Leaflet */
.leaflet-container {
    border-radius: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Control botón Google Maps */
.gmaps-control {
    margin: 0 0 12px 12px;
    z-index: 500; /* sobre el mapa */

}
/* Eliminar borde/caja por defecto del contenedor Leaflet */
.gmaps-control.leaflet-bar {
    border: none;
    box-shadow: none;
    background: transparent;
    position: relative;
    right: 25px;
}
.gmaps-control .gmaps-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
    min-height: 40px;
    border: none;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.gmaps-control .gmaps-btn:hover {
    transform: translateY(-1px);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}
.gmaps-control .gmaps-btn i {
    font-size: 1rem;
}
.gmaps-control .gmaps-btn span {
    font-size: 0.9rem;
    white-space: nowrap;
}
/* Móvil: compactar y mostrar solo ícono */
@media (max-width: 480px) {
    .gmaps-control .gmaps-btn { padding: 10px; border-radius: 50%; }
    .gmaps-control .gmaps-btn span { display: none; }
}

/* Personalización de controles del mapa */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Estilo personalizado para el marcador */
.custom-marker {
    background: #2E6FA3;
    border: 3px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Contacto */
.contacto {
    padding: 3rem 0;
    background: white;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-submit:hover {
    background-image: radial-gradient( circle 311px at 8.6% 27.9%,  rgba(62,147,252,0.57) 12.9%, rgba(239,183,192,0.44) 91.2% );
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(248, 181, 193, 0.4);
}

.social-link:hover {
    transform: translateY(-3px);
}

/* Colores específicos para cada red social */
.social-link:nth-child(1):hover { /* nth-child sirve para seleccionar el numero que deseamos dentro de un container */
    background: #1877f2; /* Facebook azul */
}

.social-link:nth-child(2):hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); /* Instagram gradiente */
}

.social-link:nth-child(3):hover {
    background: #25d366; /* WhatsApp verde */
}

.social-link:nth-child(4):hover {
    background: #0077b5; /* LinkedIn azul */
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.icon1 {
    background-color: black;
    height: 50px;
    width: 50px;
}


/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 6000; /* por encima de cualquier overlay */
        flex-direction: column;
        background: #52A2B4;
        width: 60%;
        max-width: 360px;
        padding: 90px 1.25rem 2rem 1.25rem; /* espacio para la barra superior */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .nav-links.active { left: 0; }
    
    .menu-toggle { display: block; }

    /* Mejora de usabilidad de enlaces */
    .nav-links li { width: 100%; }
    .nav-links a:not(.Ct) { display: block; padding: 0.9rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.15); }
    .nav-links a:not(.Ct)::after { display: none; }
    .nav-links a.active:not(.Ct) { background: rgba(255,255,255,0.12); color: #fff; }
    .nav-links a.Ct { display: inline-flex; width: auto; margin: 0.5rem auto 0; padding: 1rem 1.5rem; border: 0; border-radius: 9999px; }

    /* Hero: evitar ancho fijo y mejorar lectura en móvil */
    .hero-content { padding: 1.5rem; }
    /* Ajuste de altura del hero en móviles para evitar saltos por la barra del navegador */
    .hero {
        height: 100vh;   /* fallback */
        height: 100svh;  /* viewport seguro en móviles */
        min-height: 520px;
    }
    /* iOS fallback para llenar la pantalla disponible */
    @supports (-webkit-touch-callout: none) {
        .hero { height: -webkit-fill-available; }
    }

    /* Encadre específico por imagen en móviles (<=768px) */
    .hero-video.hero-1 img { object-position: center 30%; }
    .hero-video.hero-2 img { object-position: center 40%; }

    .hero-title { /* para 768px */
        font-size: clamp(1.8rem, 4.7vw, 2.3rem);
        width: auto;
        max-width: 100%;
        min-width: 0;
        line-height: 1.12;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        text-wrap: balance;
        overflow-wrap: anywhere;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 3.8vw, 1.25rem);
        line-height: 1.35;
        text-align: center;
        max-width: 36ch;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Inst/Ubicación: una columna y ancho completo */
    .instalaciones-content,
    .ubicacion-content,
    .servicios-content {
        gap: 3rem;
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .instalaciones-image .image-wrapper { height: 300px; }
    .gallery-container { width: 100%; }
    .image-wrapper img { width: 100%; height: 100%; transform: none; }
    
    .leaflet-map { width: 100%; height: 380px; }
    
    .servicios-carousel { padding: 1.5rem; }
    
    .servicios-grid { gap: 1.5rem; }
    
    .servicio-item { width: 280px; min-height: 300px; }
    
    .carousel-controls { padding: 0 0.5rem; }
    
    .carousel-btn { width: 50px; height: 50px; font-size: 1.2rem; }
    
    .servicios-video { min-height: 350px; margin-top: 2rem; }
    
    .video-container { height: 180px; }
}

/* Overlay para menú móvil — deshabilitado para evitar bloqueo de clics */
.nav-overlay { position: fixed; inset: 0; background: transparent; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; z-index: -1; }
.nav-overlay.active { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

/* Bloqueo de scroll cuando el menú está abierto */
body.nav-open { overflow: hidden; }

@media (max-width: 480px) {
    .servicios-carousel {
        padding: 1rem;
    }
    
    .hero-title { /* para 480px */
        font-size: clamp(1.9rem, 9.5vw, 2.5rem);
        max-width: 100%;
        min-width: 0;
        line-height: 1.12;
    }
    .hero-subtitle {
        font-size: clamp(0.95rem, 4.2vw, 1.15rem);
        line-height: 1.4;
        max-width: 34ch;
    }
    
    .servicios-grid {
        gap: 1rem;
    }
    
    .servicio-item{
        width: 250px;
        min-height: 280px;
        padding: 2rem 1.5rem;
        background-color: black;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .carousel-controls {
        padding: 0 0.25rem;
    }
    
    .video-container {
        height: 150px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .testimonio-card {
        min-width: 300px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Video responsive */
    .hero-video img {
        object-position: center 25%; /* base móvil */
    }
    /* Afinar aún más por imagen en pantallas muy estrechas (<=480px) */
    .hero-video.hero-1 img { object-position: center 28%; }
    .hero-video.hero-2 img { object-position: center 38%; }
    
    /* En móviles, reducir la opacidad del overlay para mejor visibilidad */
    .hero-overlay {
        background: rgba(0, 0, 0, 0.6);
    }
}