/* Variables */
:root {
    --primary-color: #8c0313;
    --primary-light: #b41024;
    --primary-dark: #63020d;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease-in-out;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 20px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--primary-light);
    margin: 0 auto 1rem;
    border-radius: 2px;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(140, 3, 19, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 3, 19, 0.4);
}

/* Header & Navbar */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
}

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

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

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

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?q=80&w=2000&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(140, 3, 19, 0.7), rgba(0, 0, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

/* Especialidades Section */
.especialidades {
    padding: 5rem 0;
    background-color: var(--white);
}

.grid-especialidades {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card-especialidad {
    background-color: var(--bg-color);
    padding: 2.5rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card-especialidad:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.card-especialidad i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card-especialidad:hover i {
    transform: scale(1.1);
}

.card-especialidad h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.card-especialidad p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Profesionales Section */
.profesionales {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.grid-profesionales {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card-profesional {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.card-profesional:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.img-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

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

.card-profesional:hover .img-container img {
    transform: scale(1.05);
}

.info-profesional {
    padding: 1.5rem;
    text-align: center;
}

.info-profesional h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.info-profesional p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Modal CV Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.close-btn:hover,
.close-btn:focus {
    color: var(--primary-color);
}

.modal-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    box-shadow: var(--shadow);
}

.modal-info h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.modal-body h4 {
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-size: 1.1rem;
    border-left: 3px solid var(--primary-light);
    padding-left: 10px;
}

.modal-body ul {
    list-style: disc inside;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    padding-left: 10px;
}

.modal-body ul li {
    margin-bottom: 0.5rem;
}

/* Footer Section */
.footer {
    background-color: #1a1a1a;
    color: var(--white);
    padding: 4rem 0 0 0;
}

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

.footer-col h3 {
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-footer {
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
    margin-bottom: 1rem;
}

.logo-footer span {
    color: var(--primary-color);
}

.info-clinica p {
    color: #cccccc;
    margin-bottom: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-list li, .horarios-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    color: #cccccc;
}

.contact-list i, .horarios-list i {
    color: var(--primary-light);
    margin-right: 1rem;
    margin-top: 0.3rem;
}

.footer-bottom {
    background-color: #0f0f0f;
    text-align: center;
    padding: 1.5rem 0;
    color: #888888;
    font-size: 0.9rem;
}

/* Animations */
@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); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .grid-especialidades, .grid-profesionales {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .grid-especialidades, .grid-profesionales {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: -100%;
        width: 100%;
        background-color: var(--white);
        text-align: center;
        padding: 2rem 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        transition: var(--transition);
    }
    
    .nav-links.active {
        left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
    }
}
