@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Montserrat:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-red: #a40133;
    --primary-yellow: #f9b905;
    --primary-gold: #f9b905;
    --details-blue: #65899e;
    --slate-blue: #5b7f95;
    --slate-blue-rgb: 91, 127, 149;
    --text-main: #2b2b2b;
    --text-muted: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-base: #fcfbfa;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --border-glass: rgba(164, 1, 51, 0.06);
    --border-glass-hover: rgba(164, 1, 51, 0.15);
    --shadow-premium: 0 20px 40px rgba(164, 1, 51, 0.03);
    --shadow-premium-hover: 0 35px 70px rgba(164, 1, 51, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Merriweather', serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-red);
    text-transform: uppercase;
}

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

/* Header & Navigation */
header {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--primary-red);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.5s var(--ease-premium), background-color 0.3s;
}

header.scroll-down {
    transform: translateY(-100%);
}

header.scroll-up {
    transform: translateY(0);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    height: 60px;
    width: auto;
}

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

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--bg-white);
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 4rem;
    list-style: none;
}

.nav-links li a {
    font-weight: 500;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition);
    color: var(--bg-white);
}

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

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

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

.nav-links li a::after,
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-gold);
    transition: width 0.35s var(--ease-premium);
}

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

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

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(197, 147, 68, 0.65), rgba(33, 30, 26, 0.8)), url('../img/rectorado.JPG') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 2rem;
    position: relative;
    max-width: 100%;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero h1 {
    color: white;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    background-color: var(--primary-yellow);
    color: var(--text-main);
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    border-radius: 15px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-red);
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(164, 1, 51, 0.18);
}

/* Section Common */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
}

section {
    padding: 5rem 2rem 0 2rem;
}

.main-container section:last-child {
    padding-bottom: 5rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-yellow);
    border-radius: 2px;
}

/* About Section */
.about-intro {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 3rem;
    font-size: 1.5rem;
    color: var(--text-muted);

}

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

.about-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.about-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(164, 1, 51, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-red);
    font-size: 2rem;
}

.about-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 0.8rem;
}

.about-card-divider {
    width: 40px;
    height: 3px;
    background-color: var(--primary-yellow);
    border: none;
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.about-card-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: justify;
}

/* Sección Servicios a Pantalla Completa (Horizontal Scroll Showcase) */
.services-scroll-container {
    height: 400vh;
    /* 4 slides = 400vh */
    position: relative;
    padding: 0 !important;
    /* Quitar padding para pantalla completa */
    background-color: var(--bg-base);
}

.services-sticky-viewport {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Contenedor del Titular de Servicios */
.services-header-container {
    padding-top: 4.5rem;
    padding-bottom: 1rem;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
    background-color: var(--bg-base);
}

.services-header-container h2.section-title {
    margin-bottom: 0;
    padding-bottom: 0.8rem;
    font-size: 2.8rem;
}

.services-horizontal-track {
    display: flex;
    flex: 1;
    width: 400%;
    /* 4 slides * 100% */
    will-change: transform;
    transition: transform 0.08s var(--ease-premium);
}

.service-slide {
    width: 25%;
    /* 1 slide = 25% of track (which is 100% of viewport) */
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
    /* Recorta el desbordamiento por zoom de la imagen */
}

/* Lado Izquierdo: Imagen */
.slide-split-image {
    flex: 1.1;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.slide-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(28, 26, 26, 0.15) 0%, rgba(28, 26, 26, 0) 100%);
    z-index: 2;
}

/* Lado Derecho: Contenido */
.slide-split-content {
    flex: 1;
    height: 100%;
    background: var(--bg-white);
    padding: 5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
    border-left: 1px solid var(--border-glass);
}

/* Número Gigante Outline */
.slide-number {
    position: absolute;
    top: 5rem;
    right: 5.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 9rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(164, 1, 51, 0.04);
    pointer-events: none;
    user-select: none;
}

.slide-category {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-blue);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 1.2rem;
}

.slide-split-content h3 {
    font-size: 3.4rem;
    color: var(--primary-red);
    margin-bottom: 1.8rem;
    letter-spacing: -1.2px;
}

.slide-split-content p {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 3.5rem;
    text-align: justify;
}

/* Indicadores de diapositivas flotantes */
.services-indicators {
    position: absolute;
    bottom: 4rem;
    right: 5.5rem;
    display: flex;
    gap: 1.2rem;
    z-index: 100;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(164, 1, 51, 0.15);
    transition: all 0.4s var(--ease-premium);
    cursor: pointer;
}

.indicator-dot.active {
    background-color: var(--primary-red);
    transform: scale(1.4);
}

/* Adaptabilidad para pantallas de escritorio escaladas o portátiles */
@media (max-width: 1440px) and (min-width: 992px),
(max-height: 850px) and (min-width: 992px) {
    .services-header-container {
        padding-top: 2.5rem;
        padding-bottom: 0.5rem;
    }

    .services-header-container h2.section-title {
        font-size: 2.2rem;
    }

    .slide-split-content {
        padding: 3rem 2.8rem;
    }

    .slide-split-content h3 {
        font-size: 2.5rem;
        margin-bottom: 1.2rem;
        letter-spacing: -0.8px;
    }

    .slide-split-content p {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 2rem;
    }

    .slide-number {
        font-size: 6.5rem;
        top: 2rem;
        right: 2.8rem;
    }

    .services-indicators {
        bottom: 2rem;
        right: 2.8rem;
    }
}

/* Mobile Responsiveness for Services Slider */
@media (max-width: 991px) {
    .services-scroll-container {
        height: auto !important;
        /* Reset to vertical scroll */
        padding: 5rem 1.5rem 0 1.5rem !important;
    }

    .services-sticky-viewport {
        position: relative !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .services-header-container {
        padding-top: 0;
        padding-bottom: 2rem;
        background-color: transparent;
    }

    .services-header-container h2.section-title {
        font-size: 2.5rem;
        padding-bottom: 1.2rem;
        margin-bottom: 2rem;
    }

    .services-horizontal-track {
        flex-direction: column;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        gap: 3.5rem;
    }

    .service-slide {
        width: 100% !important;
        height: auto !important;
        flex-direction: column;
        border-radius: 28px;
        overflow: hidden;
        box-shadow: var(--shadow-premium);
        border: 1px solid var(--border-glass);
    }

    .slide-split-image {
        width: 100%;
        height: 280px;
        flex: none;
    }

    .slide-split-content {
        width: 100%;
        padding: 3.5rem 2rem;
        flex: none;
        border-left: none;
    }

    .slide-number {
        top: 2rem;
        right: 2.8rem;
        font-size: 5rem;
    }

    .slide-split-content h3 {
        font-size: 2.2rem;
        margin-bottom: 1.2rem;
    }

    .slide-split-content p {
        font-size: 1.05rem;
        margin-bottom: 2.2rem;
    }

    .services-indicators {
        display: none !important;
    }
}

/* Animations triggered by Javascript & IntersectionObserver */
.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s var(--ease-premium), transform 1.2s var(--ease-premium);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Directory */
.contact-container {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.contact-intro {
    text-align: center;
    font-size: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
    color: var(--text-muted);
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.5rem 1.8rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.contact-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--details-blue);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-card:hover::before {
    background: linear-gradient(180deg, var(--primary-red), var(--primary-gold));
}

.contact-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.contact-role {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--details-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.contact-divider {
    border: none;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    width: 100%;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.contact-detail i {
    color: var(--primary-yellow);
    width: 16px;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--primary-red);
    color: white;
    margin-top: 4rem;
    padding-top: 4rem;
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: left;
    margin-bottom: 3rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 90px;
    width: auto;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--bg-white);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--primary-yellow);
    transform: translateX(5px);
}

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

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

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

.footer-bottom {
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--primary-yellow);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUpIndicator 1s ease-out 1s forwards;
    pointer-events: none;
    z-index: 10;
}

.scroll-indicator span {
    color: white;
}

.scroll-indicator-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid white;
    border-radius: 11px;
    position: relative;
}

.scroll-indicator-wheel {
    width: 4px;
    height: 7px;
    background-color: var(--primary-yellow);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.8s infinite ease-in-out;
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    50% {
        top: 16px;
        opacity: 0.2;
    }

    100% {
        top: 6px;
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpIndicator {
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    section {
        padding: 4rem 1.2rem 0 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2.5rem;
    }

    .about-intro {
        font-size: 1.15rem;
        margin-bottom: 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        padding: 0 0.5rem;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-red);
        padding: 2rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: -1;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        text-align: center;
        margin: 0.25rem 0;
    }

    .contact-container {
        padding: 2rem 1.5rem;
    }

    .btn-primary {
        align-self: center;
    }

    .nav-logo {
        height: 50px;
    }
}