/* =========================================
   VARIABLES Y PALETA DE COLORES
   ========================================= */
   :root {
    --bg-dark: #2c466c;       
    --bg-light: #f5f5f7;
    --bg-white: #ffffff;      
    --text-light: #ffffff;
    --text-dark: #2c466c;     
    --text-gray: #86868b;
    --accent-blue: #b3c645;   
    --accent-hover: #9bb038;  
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(44, 70, 108, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.nav-logo {
    height: 30px; 
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-size: 0.85rem;
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
}

/* Menú Desplegable */
.dropdown {
    position: relative;
    padding-bottom: 10px; 
    margin-bottom: -10px;
}

.dropdown-menu {
    position: absolute;
    top: 100%; 
    left: -10px; 
    background: rgba(44, 70, 108, 0.95); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li { padding: 0; }

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-light);
    font-size: 0.85rem;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.8;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1); 
    opacity: 1;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary { background-color: var(--accent-blue); color: var(--bg-white); }
.btn-primary:hover { background-color: var(--accent-hover); transform: scale(1.02); }

.btn-secondary { background-color: transparent; color: var(--accent-blue); }
.btn-secondary:hover { text-decoration: underline; }

.btn-outline {
    align-self: flex-start;
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}
.btn-outline:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
}

/* =========================================
   PÁGINA PRINCIPAL (INDEX)
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
    text-align: center;
    background-color: var(--bg-dark);
    background-image: url('../img/hospital.jpg'); 
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(44, 70, 108, 0.6), rgba(44, 70, 108, 0.95));
    z-index: 1;
}

.hero-logo, .hero-content { position: relative; z-index: 2; }
.hero-logo { width: 180px; height: auto; margin-bottom: 30px; }
.hero-content { max-width: 800px; }
.hero-subtitle { color: var(--accent-blue); font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.hero-title { font-size: 4.5rem; font-weight: 700; color: var(--bg-white); line-height: 1.05; margin-bottom: 20px; }
.text-gray { color: var(--text-gray); }
.hero-description { font-size: 1.5rem; color: var(--bg-light); margin-bottom: 40px; }
.hero-cta { display: flex; gap: 20px; justify-content: center; }

/* Portal de Categorías con Imágenes */
.catalog-section { padding: 80px 20px; max-width: 1200px; margin: 0 auto; text-align: center; }
.section-header h2 { font-size: 3rem; font-weight: 700; margin-bottom: 10px; color: var(--text-dark); }
.section-header p { font-size: 1.2rem; color: var(--text-gray); margin-bottom: 60px; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background-color: var(--bg-white); border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); min-height: 300px; display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: transform 0.3s ease; }
.card:hover { transform: translateY(-5px); }
.card-dark { background-color: var(--bg-dark); color: var(--text-light); }

.card-with-img { padding: 0; overflow: hidden; }
.card-img { width: 100%; height: 180px; object-fit: cover; border-top-left-radius: 20px; border-top-right-radius: 20px; }
.card-text { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-end; text-align: left;}
.card-text h3 { font-size: 1.5rem; margin-bottom: 10px; }
.card-text p { color: var(--text-gray); }
.card-dark .card-text p { color: #b5c3d6; }

/* =========================================
   PÁGINAS DE PRODUCTOS (Quirófano, etc.)
   ========================================= */
.product-nav-section { padding: 120px 20px 40px; background-color: var(--bg-white); text-align: center; }
.page-title { font-size: 4.5rem; font-weight: 700; color: var(--text-dark); letter-spacing: -0.04em; margin-bottom: 50px; }
.product-icons-container { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; max-width: 1000px; margin: 0 auto; }
.product-icon-link { display: flex; flex-direction: column; align-items: center; gap: 12px; transition: transform 0.3s ease; }
.product-icon-link:hover { transform: translateY(-3px); }
.icon-img-placeholder { width: 70px; height: 70px; background-color: var(--bg-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-gray); font-size: 0.8rem; }
.product-icon-link span { font-size: 0.85rem; font-weight: 600; color: var(--text-dark); }

.lineup-section { background-color: var(--bg-light); padding: 80px 20px 100px; }
.lineup-header { max-width: 1200px; margin: 0 auto 40px; text-align: left; }
.lineup-header h2 { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text-dark); }
.lineup-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.product-card { background-color: var(--bg-white); border-radius: 24px; padding: 40px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.03); transition: transform 0.3s ease; }
.product-card:hover { transform: translateY(-5px); }
.product-card-img { width: 100%; height: 250px; background-color: var(--bg-light); border-radius: 16px; margin-bottom: 30px; display: flex; align-items: center; justify-content: center; color: var(--text-gray); }
.product-card h3 { font-size: 1.8rem; margin-bottom: 15px; color: var(--text-dark); }
.product-card p { color: var(--text-gray); font-size: 1.05rem; margin-bottom: 30px; flex-grow: 1; line-height: 1.5; }
.product-card .btn-primary { width: 100%; padding: 14px; }

/* =========================================
   MANTENIMIENTO (DuranmedCare+)
   ========================================= */
.maintenance { background-color: var(--bg-white); padding: 100px 20px; text-align: center; }
.maintenance-content { max-width: 1000px; margin: 0 auto; }
.maintenance h2 { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 15px; color: var(--text-dark); }
.maintenance-lead { font-size: 1.3rem; color: var(--text-gray); margin-bottom: 60px; }

.care-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-bottom: 50px; }
.care-card { background-color: var(--bg-light); border-radius: 20px; padding: 35px 25px; text-align: center; transition: transform 0.3s ease; }
.care-card:hover { transform: translateY(-5px); }

.care-img { width: 100%; height: 220px; object-fit: cover; border-radius: 14px; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

.care-card h3 { font-size: 1.6rem; color: var(--text-dark); margin-bottom: 15px; font-weight: 600; }
.care-card p { font-size: 1rem; color: var(--text-gray); line-height: 1.6; text-align: justify; }

/* =========================================
   CONTACTO Y FORMULARIO
   ========================================= */
.contact-section { background-color: var(--bg-white); padding: 80px 20px; border-top: 1px solid #e5e5e7; }
.contact-container { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: flex-start; }
.contact-map-wrapper h2, .contact-form-wrapper h2 { font-size: 2rem; font-weight: 400; color: var(--text-dark); margin-bottom: 25px; }
.map-frame { width: 100%; border-radius: 12px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.map-frame iframe { width: 100%; height: 300px; border: none; display: block; }
.map-text { font-size: 0.95rem; color: var(--text-gray); line-height: 1.5; }

.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 1rem; background-color: var(--bg-light); color: var(--text-dark); font-family: inherit; transition: border-color 0.3s, box-shadow 0.3s; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--text-gray); box-shadow: 0 0 0 3px rgba(134, 134, 139, 0.1); }

/* =========================================
   VENTANA MODAL FLOTANTE (COTIZACIÓN)
   ========================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background-color: var(--bg-white); border-radius: 20px; padding: 40px; width: 90%; max-width: 400px; position: relative; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.2); transform: translateY(30px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 15px; right: 20px; background: transparent; border: none; font-size: 1.8rem; cursor: pointer; color: var(--text-gray); transition: color 0.3s; }
.modal-close:hover { color: var(--text-dark); }
.modal-content h2 { font-size: 1.5rem; margin-bottom: 5px; color: var(--text-dark); }
#modalProductName { color: var(--accent-blue); font-weight: 600; font-size: 1rem; margin-bottom: 25px; }

.modal-form { display: flex; flex-direction: column; gap: 15px; }
.modal-form input { width: 100%; padding: 14px; border: 1px solid #d2d2d7; border-radius: 12px; font-size: 1rem; background-color: var(--bg-light); color: var(--text-dark); outline: none; }
.modal-form .btn-primary { margin-top: 10px; width: 100%; }

/* =========================================
   FOOTER
   ========================================= */
footer { background-color: var(--bg-light); padding: 40px 20px; border-top: 1px solid #d2d2d7; font-size: 0.85rem; color: var(--text-gray); }
.footer-content { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.footer-links a { margin-left: 20px; }

/* =========================================
   ANIMACIONES Y RESPONSIVO (MÓVILES)
   ========================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    /* Aseguramos que Contacto y Mantenimiento se apilen bien en celular */
    .contact-container, .care-features { grid-template-columns: 1fr; gap: 40px; }
    .hero-title { font-size: 3rem; }
    .page-title { font-size: 3.5rem; }
}

/* =========================================
   ANIMACIONES ESTILO APPLE STORE
   ========================================= */

/* Curva de aceleración matemática (rápido al inicio, muy suave al final) */
:root {
    --apple-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estado inicial oculto (desplazado 40px hacia abajo y transparente) */
.apple-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s var(--apple-ease), transform 1.2s var(--apple-ease);
    will-change: opacity, transform; /* Optimización para que la tarjeta gráfica lo procese */
}

/* Estado visible (se activa con JavaScript) */
.apple-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones específicas del Hero (para que no esperen al scroll) */
.hero-logo { transition-delay: 0.1s; }
.hero-subtitle { transition-delay: 0.2s; }
.hero-title { transition-delay: 0.3s; }
.hero-description { transition-delay: 0.4s; }
.hero-cta { transition-delay: 0.5s; }

/* Efecto hover premium en tarjetas (Levantamiento + Zoom sutil de imagen) */
.card, .product-card, .care-card {
    transition: transform 0.6s var(--apple-ease), box-shadow 0.6s var(--apple-ease) !important;
}

.card:hover, .product-card:hover, .care-card:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

/* Las imágenes dentro de las tarjetas hacen un zoom muy suave al hacer hover */
.card-img, .product-card-img, .care-img {
    transition: transform 0.8s var(--apple-ease);
}

.card:hover .card-img, 
.product-card:hover .product-card-img, 
.care-card:hover .care-img {
    transform: scale(1.04);
}

/* Efecto suave para la barra de navegación al bajar */
.navbar {
    transition: background-color 0.6s var(--apple-ease), padding 0.6s var(--apple-ease);
}

.navbar.nav-scrolled {
    background-color: rgba(44, 70, 108, 0.98);
    padding: 10px 20px; /* Se encoge ligeramente al hacer scroll */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* =========================================
   FOOTER (CORREGIDO Y ALINEADO)
   ========================================= */
   footer { 
    background-color: var(--bg-light); 
    padding: 30px 20px; 
    border-top: 1px solid #d2d2d7; 
    font-size: 0.85rem; 
    color: var(--text-gray); 
}

.footer-content { 
    max-width: 1000px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap;
    gap: 20px;
}

/* Asegura que el copyright y los links tengan un ancho base equilibrado */
.footer-copy {
    margin: 0;
    flex: 1;
    min-width: 250px;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    min-width: 250px;
}

.footer-links a { 
    margin-left: 20px; 
}

/* =========================================
   ESTILOS CONTROLADOS PARA ICONOS SVG
   ========================================= */
   .footer-socials {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
}

.social-icon {
    display: inline-block;
    width: 22px;  /* Forzamos el ancho del contenedor */
    height: 22px; /* Forzamos el alto del contenedor */
    color: var(--text-gray); /* Color gris Apple por defecto */
    transition: color 0.3s var(--apple-ease), transform 0.3s var(--apple-ease);
}

.svg-icon {
    width: 100%;
    height: 100%;
    fill: currentColor; /* Esto obliga al SVG a usar el color de la variable */
    display: block;
}

/* Efecto hover */
.social-icon:hover {
    color: var(--text-dark); /* Cambia al azul oscuro al pasar el mouse */
    transform: scale(1.1);
}