/* modern_styles.css */
:root {
    /* Paleta renovada */
    --primary-green: #2B5B3E;
    /* Verde más moderno y profundo */
    --secondary-green: #3D8055;
    --primary-gold: #D4AF37;
    /* Dorado clásico y elegante */
    --secondary-gold: #F1C40F;

    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);
    --radius: 8px;

    /* Tipografía */
    --font-primary: 'Merriweather', serif;
    /* Tradición y prestigio */
    --font-secondary: 'Montserrat', sans-serif;
    /* Modernidad y legibilidad */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-secondary);
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Evita el desfasaje lateral */
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo-text {
    font-family: var(--font-primary);
}

.logo-title {
    font-weight: 700;
}

.nav-list a,
.btn,
.badge,
.tag {
    font-family: var(--font-secondary);
    font-weight: 600;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

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

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

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

/* ================= HEADER & NAV ================= */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 1.1rem;
    line-height: 1.2;
}

.logo-subtitle {
    font-weight: 300;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

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

.nav-list>li>a {
    font-weight: 600;
    color: var(--text-dark);
    padding: 10px 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.nav-list>li>a:hover,
.nav-list>li>a.active {
    color: var(--primary-green);
}

.nav-list>li>a i {
    font-size: 0.8rem;
}

/* Dropdown & Mega Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 10px 0;
}

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

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: rgba(43, 91, 62, 0.05);
    color: var(--primary-green);
    padding-left: 25px;
}

/* Mega Menu Setup */
.mega-menu {
    display: flex;
    gap: 30px;
    padding: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 700px;
}

.dropdown:hover .mega-menu {
    transform: translateX(-50%) translateY(0);
}

.mega-menu-col h4 {
    color: var(--primary-green);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-gold);
}

.mega-menu-col a {
    padding: 8px 0;
}

.mega-menu-col a:hover {
    padding-left: 5px;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-green);
    cursor: pointer;
}

/* ================= BUTTONS ================= */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-gold);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: #C19E2B;
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--secondary-green);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.btn-outline:hover {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

.link-arrow {
    color: var(--primary-green);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.link-arrow:hover {
    gap: 10px;
}

/* ================= HERO SECTION ================= */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    /* Imagen de fondo elegante de salud */
    background-size: cover;
    background-position: center;
    color: var(--bg-white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(43, 91, 62, 0.9) 0%, rgba(43, 91, 62, 0.6) 50%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
}

.badge {
    display: inline-block;
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* ================= FEATURES ================= */
.features {
    padding: 60px 0;
    background-color: var(--bg-white);
    margin-top: -50px;
    position: relative;
    z-index: 20;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-bottom: 4px solid var(--primary-green);
}

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

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--primary-green);
}

/* ================= CARRERAS ================= */
.section {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 10px;
}

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

.carreras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.carrera-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.carrera-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.carrera-card img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    align-self: flex-start;
}

.tag-salud {
    background-color: rgba(43, 91, 62, 0.1);
    color: var(--primary-green);
}

.tag-clinica {
    background-color: rgba(212, 175, 55, 0.1);
    color: #B49020;
}

.carrera-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.carrera-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* ================= FOOTER ================= */
.footer {
    background-color: var(--primary-green);
    color: var(--bg-white);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

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

.brand-col p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

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

.social-links a:hover {
    background-color: var(--primary-gold);
    color: var(--bg-white);
}

.footer h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-gold);
}

.footer ul {
    list-style: none;
}

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

.footer ul a {
    opacity: 0.8;
    transition: var(--transition);
}

.footer ul a:hover {
    opacity: 1;
    color: var(--primary-gold);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    gap: 10px;
    opacity: 0.8;
}

.contact-info i {
    margin-top: 5px;
    color: var(--primary-gold);
}

.convenio-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    border-bottom: 3px solid var(--primary-gold);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100% !important;
        z-index: 2000;
        height: 80px;
        box-sizing: border-box;
    }

    .nav-container {
        height: 100%;
        padding: 0 15px;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 0;
        box-shadow: none;
        display: none;
        overflow-y: auto;
        z-index: 1999;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 20px;
    }

    .nav-list>li {
        width: 100%;
    }

    .nav-list>li>a {
        padding: 15px 0;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static !important;
        box-shadow: none;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: none;
        background: #f8f9fa;
        width: 100% !important;
        padding: 10px 15px;
        border-radius: 0;
        left: 0 !important;
        margin: 0;
    }

    .mega-menu {
        flex-direction: column;
        min-width: 0 !important;
        width: 100% !important;
        transform: none !important;
        gap: 10px;
        padding: 15px !important;
    }

    .mega-menu-col {
        width: 100%;
        padding: 0;
    }

    .dropdown.active>.dropdown-menu,
    .dropdown.active>.mega-menu {
        display: block !important;
    }

    /* Eliminar por completo efectos hover en mobile */
    .dropdown:hover .dropdown-menu,
    .dropdown:hover .mega-menu {
        display: none !important;
        transform: none !important;
    }

    .dropdown.active:hover .dropdown-menu,
    .dropdown.active:hover .mega-menu {
        display: block !important;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .hero {
        height: auto;
        min-height: 600px;
        padding: 100px 0 60px 0;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .features {
        margin-top: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
    }

    /* Cuadrícula de carreras en mobile */
    .carreras-grid {
        grid-template-columns: 1fr;
    }

    .carrera-card[style*="flex-direction: row"] {
        flex-direction: column !important;
        text-align: center;
    }

    .carrera-card[style*="flex-direction: row"] img {
        width: 100% !important;
        height: 200px !important;
    }

    /* Asegurar que ninguna sección exceda el ancho */
    section,
    .container,
    .hero,
    .features {
        max-width: 100% !important;
        overflow: hidden;
    }
}

/* Ajustes adicionales para Requisitos en Mobile */
@media (max-width: 600px) {
    .requisitos-box ul {
        grid-template-columns: 1fr !important;
    }

    .requisitos-box {
        padding: 20px !important;
    }
}

/* ================= COMPONENTES MIGRADOS ================= */
.contnota {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.fotonota {
    margin-bottom: 20px;
}

.celda {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    width: calc(33.333% - 14px);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.celda:hover {
    transform: translateY(-5px);
}

.celda img {
    border-radius: 4px;
    margin-bottom: 10px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.celda p {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
}

@media (max-width: 992px) {
    .celda {
        width: calc(50% - 14px);
    }
}

@media (max-width: 576px) {
    .celda {
        width: 100%;
    }
}

.ccarr {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.ccarr li {
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-green);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.ccarr li a {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    display: block;
}

.ccarr li:hover {
    background: #fff;
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

/* Plan de Estudios Section */
.plan-estudios {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.plan-estudios h2 {
    color: var(--primary-green);
    margin-bottom: 30px;
    font-size: 2rem;
    text-align: center;
}

.anio-block {
    margin-bottom: 40px;
}

.anio-title {
    background: var(--primary-green);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 1.2rem;
    display: inline-block;
    margin-bottom: 0;
}

.anio-list {
    list-style: none;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-top: 3px solid var(--primary-gold);
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.anio-list li {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.anio-list li::before {
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary-gold);
}

/* Botones y Utilidades Adicionales */
.btn-gold {
    background-color: var(--primary-gold);
    color: var(--bg-white);
    border-color: var(--primary-gold);
}

.btn-gold:hover {
    background-color: #B49020;
    border-color: #B49020;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary-green);
}

.hero-badge-container {
    margin-bottom: 20px;
}

.hero-buttons {
    margin-top: 40px;
}

/* Visor de imágenes */
.image-viewer img {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.image-viewer img:hover {
    transform: scale(1.02);
}

.horario-card {
    background: #fff;
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
}

.breadcrumb a:hover {
    color: var(--primary-gold);
    text-decoration: underline;
}

/* Convenio Logo */
.convenio-box.siprosa {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.convenio-box.siprosa:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-gold);
}

/* ================= XL SCREENS (1440px+) ================= */
@media (min-width: 1440px) {
    .container {
        max-width: 1350px;
    }

    .hero {
        height: 85vh;
        min-height: 700px;
    }

    .hero-content {
        max-width: 850px;
    }

    .hero h1 {
        font-size: 4.8rem;
    }

    .hero p {
        font-size: 1.4rem;
        max-width: 750px;
    }

    .section-header h2 {
        font-size: 3.2rem;
    }

    .section {
        padding: 120px 0;
    }

    .feature-card {
        padding: 40px;
    }
}