/* 
   Instituto Martino de la Visión - Sección Especialidades
   Design System & Premium Stylesheet
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

/* Variables de Diseño */
:root {
    --color-primary: #142B66;
    --color-primary-light: #1f3d8a;
    --color-primary-rgb: 20, 43, 102;
    --color-secondary: #3370A4;
    --color-secondary-hover: #26557c;
    --color-accent: #4682B4;
    --color-accent-light: #e6f0fa;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-bg-light: #f8fafc;
    --color-bg-white: #ffffff;
    --color-whatsapp: #25D366;
    --color-whatsapp-hover: #20ba5a;
    --color-border: #e2e8f0;
    
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 30px rgba(20, 43, 102, 0.04);
    --shadow-lg: 0 20px 40px rgba(20, 43, 102, 0.08);
    --shadow-hover: 0 30px 60px rgba(20, 43, 102, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y Estilos Globales */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    color: var(--color-primary);
    font-weight: 700;
}

p {
    font-size: 1rem;
    color: var(--color-text-light);
}

/* Header Minimalista (Igual a la landing de Profesionales) */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.logo-container img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-link-back {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-link-back:hover {
    color: var(--color-secondary);
    background-color: var(--color-bg-light);
    border-color: var(--color-border);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 9rem 5% 8rem 5%;
    background-image: linear-gradient(135deg, rgba(20, 43, 102, 0.92) 0%, rgba(20, 43, 102, 0.8) 50%, rgba(51, 112, 164, 0.4) 100%), url('../images/clinic_hero_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    color: var(--color-bg-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 600px;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

.hero-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-bg-white);
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-bg-white);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-headings);
    font-weight: 600;
    padding: 16px 32px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background-color: var(--color-whatsapp);
    color: var(--color-bg-white);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.btn-primary:hover {
    background-color: var(--color-whatsapp-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.35);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-bg-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.btn-outline {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-med-blue {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    box-shadow: var(--shadow-md);
}

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

/* Sección Especialidades (Grid) */
.specialties-section {
    padding: 7rem 5%;
    background-color: var(--color-bg-white);
}

.section-header {
    max-width: 700px;
    margin: 0 auto 4rem auto;
    text-align: center;
}

.subtitle-badge {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.section-description {
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.spec-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.spec-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent);
}

.spec-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background-color: var(--color-bg-light);
}

.spec-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.spec-card:hover .spec-image {
    transform: scale(1.06);
}

.spec-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(20, 43, 102, 0.4) 0%, rgba(20, 43, 102, 0) 100%);
    height: 40%;
}

.spec-info {
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.spec-name {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.spec-desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.spec-card .btn {
    align-self: flex-start;
    padding: 12px 24px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}

/* Sección Tecnología e Indicadores */
.tech-section {
    padding: 7rem 5%;
    background-color: var(--color-bg-light);
    position: relative;
}

.tech-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.tech-content {
    flex: 1;
}

.tech-media {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.tech-stat-card {
    background-color: var(--color-bg-white);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: var(--transition);
}

.tech-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.tech-stat-num {
    font-family: var(--font-headings);
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.tech-stat-title {
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.tech-stat-text {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Call to Action (CTA) Final */
.cta-section {
    padding: 7rem 5%;
    background-color: var(--color-bg-white);
    text-align: center;
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--color-primary);
    background-image: linear-gradient(135deg, rgba(20, 43, 102, 0.95) 0%, rgba(51, 112, 164, 0.85) 100%);
    color: var(--color-bg-white);
    padding: 5rem 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: linear-gradient(to right, var(--color-accent), var(--color-secondary), var(--color-whatsapp));
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-bg-white);
}

.cta-text {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Footer Minimalista */
.main-footer {
    background-color: #0d1e47;
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 5% 3rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-info {
    max-width: 400px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
}

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

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    fill: var(--color-accent);
}

.footer-contact-item a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact-item a:hover {
    color: var(--color-bg-white);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

/* Modales Interactivos de Especialidades */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 30, 71, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--color-bg-white);
    width: 90%;
    max-width: 700px;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 90px rgba(20, 43, 102, 0.25);
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: rgba(20, 43, 102, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: var(--transition);
    z-index: 10;
}

.modal-close-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    transform: rotate(90deg);
}

.modal-header-img {
    height: 200px;
    position: relative;
    background-color: var(--color-bg-light);
}

.modal-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(20, 43, 102, 0.3) 100%);
}

.modal-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
}

.modal-content-section {
    margin-bottom: 1.5rem;
}

.modal-content-title {
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.modal-content-text {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
}

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

.modal-list li {
    font-size: 0.95rem;
    color: var(--color-text);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
}

.modal-list li::before {
    content: "✓";
    color: var(--color-secondary);
    font-weight: 800;
}

.modal-footer {
    padding: 1.5rem 2.5rem;
    background-color: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: var(--color-whatsapp);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: var(--color-whatsapp-hover);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Keyframes de Animaciones */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 7rem 5% 5rem 5%;
        gap: 3rem;
    }
    
    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .tech-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .tech-media {
        width: 100%;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .main-header {
        padding: 1rem 5%;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .specialties-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 450px;
    }
    
    .tech-media {
        grid-template-columns: 1fr;
    }
    
    .cta-container {
        padding: 3rem 1.5rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}
