:root {
    /* Paleta de colores Corporativa */
    --primary-blue: #000092;
    --accent-gold: #be9616;
    --dark-bg: #0a0a0a;
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --text-main: #333333;
    --text-muted: #666666;
    
    /* Tipografía */
    --font-serif: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;

    /* Sombras y bordes */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --radius-md: 8px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px; /* Altura aproximada de la navbar fija */
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    text-align: left; /* Default */
}

p {
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--primary-blue);
}

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

/* Estilos de botones premium */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: #00007a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

/* Navbar */
.navbar {
    background-color: var(--primary-blue);
    padding: 20px 0;
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0;
}

.nav-logo span {
    color: var(--accent-gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

/* Feed estilo Facebook */
.feed-container {
    max-width: 680px;
    margin: 40px auto;
}

.fb-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 1px solid #dddfe2;
    overflow: hidden;
}

.fb-card-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
}

.fb-author-info {
    display: flex;
    flex-direction: column;
}

.fb-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1c1e21;
}

.fb-post-time {
    font-size: 0.8rem;
    color: #65676b;
}

.fb-card-content {
    padding: 4px 16px 16px;
    font-size: 1rem;
    color: #1c1e21;
}

.fb-card-image {
    width: 100%;
    height: auto;
    display: block;
    border-top: 1px solid #ebedf0;
    border-bottom: 1px solid #ebedf0;
}

.fb-card-actions {
    display: flex;
    padding: 4px 12px;
    border-top: 1px solid #ebedf0;
    justify-content: space-around;
}

.fb-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #65676b;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
    border-radius: 4px;
}

.fb-action-btn:hover {
    background: #f2f2f2;
}

.fb-action-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

@media (max-width: 480px) {
    .past-decano-badge {
        bottom: 10px !important;
        right: 10px !important;
        padding: 8px 12px !important;
        gap: 10px !important;
    }
    .past-decano-badge img {
        height: 45px !important;
    }
}

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

@media (max-width: 992px) {
    .article-hero h1 {
        font-size: 2.2rem !important;
    }
}

@media (max-width: 768px) {
    .articulos-grid, .transparencia-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-hero {
        padding: 60px 0 40px;
    }
    
    .article-hero h1 {
        font-size: 1.8rem !important;
    }
    
    .article-content {
        font-size: 1.05rem;
        padding: 30px 0;
    }

    .feed-container {
        padding: 0 10px;
    }
}

  /* Estilos Nueva Sección Gestión */
.gestion-section { 
    padding: 80px 0; 
    background: #fff; 
    overflow: hidden; 
}
.gestion-card-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}
@media (max-width: 768px) {
    .gestion-card-grid {
        grid-template-columns: 1fr;
    }
    .section-title h2 {
        font-size: 1.6rem !important;
        line-height: 1.3;
    }
}

.articulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
}

@media (max-width: 768px) {
    .articulos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Estilos Responsivos */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

/* Hero Section Styles Base */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
    padding: 0;
    position: relative;
    border-bottom: 4px solid var(--accent-gold);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 45% 55%;
    align-items: stretch;
    gap: 40px;
}

.hero-image {
    background: transparent;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.hero-image > img {
    width: auto;
    height: 92%;
    max-height: 750px;
    object-fit: contain;
    object-position: bottom center;
    margin-bottom: -5px;
    transform: scale(1.1);
    transform-origin: bottom center;
}

.hero-content {
    padding: 100px 40px 100px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.past-decano-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255,255,255,0.95);
    padding: 12px 24px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(190, 150, 22, 0.3);
    backdrop-filter: blur(5px);
    z-index: 10;
}

.badge-logo {
    height: 65px;
    width: auto;
}

.badge-text {
    text-align: left;
    line-height: 1.2;
}

.badge-title {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-subtitle {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 30px;
    text-align: justify;
}

.nav-brand-logo {
    height: 60px;
    width: auto;
    max-height: 60px;
    object-fit: contain;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--primary-blue);
        flex-direction: column;
        padding: 100px 40px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        gap: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-brand-logo {
        height: 45px;
    }

    .hero-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .hero-content {
        padding: 40px 20px !important;
        text-align: center !important;
        width: 100% !important;
        order: 2 !important;
    }

    .hero-image {
        min-height: auto !important;
        height: auto !important;
        order: 1 !important;
        padding-top: 40px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .past-decano-badge {
        position: relative !important;
        bottom: 0 !important;
        right: 0 !important;
        margin: 5px auto 30px auto !important;
        width: max-content !important;
        padding: 10px 15px !important;
        gap: 12px !important;
        max-width: 90% !important;
        border-radius: 12px !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
        order: 3 !important;
    }

    .badge-logo {
        height: 48px !important;
    }
    
    .badge-text {
        text-align: left !important;
    }

    .badge-title {
        font-size: 0.55rem !important;
        letter-spacing: 0 !important;
    }

    .badge-subtitle {
        font-size: 1rem !important;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem !important;
    }

    .hero-content p {
        text-align: center !important;
        font-size: 1rem !important;
    }

    .hero-image > img {
        max-width: 260px !important;
        height: auto !important;
        width: 100% !important;
        margin: 0 auto !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .nav-logo h1 {
        font-size: 1.2rem !important;
    }
    
    .nav-text span {
        font-size: 0.65rem !important;
    }
}

/* =========================================
   SWIPER MAIN SLIDER STYLES
   ========================================= */
.main-slider {
    width: 100%;
    height: 75vh;
    min-height: 500px;
    position: relative;
    /* Evitar que se monte bajo la navbar que mide 85px */
    margin-top: -85px; 
}

.main-slider .swiper-slide {
    background-size: cover;
    background-position: center center;
    display: flex;
    justify-content: center;
    position: relative;
    padding-top: 85px; /* Offset interno para navbar */
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 146, 0.88) 0%, rgba(0, 0, 146, 0.45) 100%);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.slide-subtitle {
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.slide-title {
    font-size: 4rem;
    font-family: var(--font-serif);
    line-height: 1.1;
    margin-bottom: 25px;
    color: #fff !important;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.slide-text {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.slide-content .btn {
    animation: fadeInUp 1s ease 0.9s forwards;
    opacity: 0;
}

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

/* Custom Swiper Controls */
.swiper-button-next, .swiper-button-prev {
    color: var(--accent-gold) !important;
    transition: transform 0.3s;
}

.swiper-button-next:hover { transform: translateX(5px); }
.swiper-button-prev:hover { transform: translateX(-5px); }

.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.5;
    width: 10px !important;
    height: 10px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--accent-gold) !important;
    opacity: 1 !important;
    width: 25px !important;
    border-radius: 5px !important;
}

@media (max-width: 768px) {
    .main-slider {
        height: 550px;
    }
    .slide-title {
        font-size: 2.5rem;
    }
    .slide-text {
        font-size: 1.05rem;
    }
    .slide-overlay {
        background: linear-gradient(to right, rgba(0, 0, 146, 0.92), rgba(0, 0, 146, 0.75));
    }
    .slide-content {
        align-items: center !important;
        text-align: center !important;
    }
    .slide-text {
        text-align: center !important;
    }
}

/* =========================================
   CONTACT SECTION STYLES
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.social-circle {
    width: 45px; 
    height: 45px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #f0f4f8; 
    border-radius: 50%; 
    color: var(--primary-blue); 
    font-size: 1.2rem; 
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-circle:hover {
    background: var(--accent-gold) !important;
    color: #fff !important;
    transform: translateY(-3px);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 3px rgba(220,180,95,0.2);
}

.px-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; margin-bottom: 20px;}
.px-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; margin-bottom: 20px;}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        padding: 40px 20px;
        align-items: center;
    }
    .hero-title {
        font-size: 2.8rem !important;
    }
    .hero-image {
        min-height: 450px;
    }
    .past-decano-badge {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: max-content;
        bottom: 15px;
    }
    /* Centrar información de contacto en móviles */
    .contact-info {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    .contact-info ul {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .contact-info li {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-bottom: 25px !important;
    }
    .contact-info i {
        margin-right: 0 !important;
        margin-bottom: 10px !important;
    }
    .contact-info h4 {
        text-align: center !important;
    }
    .contact-info p {
        text-align: center !important;
    }
    .contact-info div[style*="display: flex"],
    .contact-info div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    /* Centrar Sígueme en Redes y sus iconos */
    #contacto h3:last-of-type,
    #contacto .social-links,
    #contacto div[style*="display: flex"]:has(.social-circle) {
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
        width: 100% !important;
    }
    
    /* Asegurar que el título de redes esté solo y centrado */
    #contacto h3:last-of-type {
        margin-top: 30px !important;
        margin-bottom: 20px !important;
        display: block !important;
    }
}
@media (max-width: 768px) {
    .contact-form-container {
        padding: 25px !important;
    }
    .contact-form-row {
        grid-template-columns: 1fr !important;
    }
    .hero-title {
        font-size: 2.2rem !important;
    }
    /* Forzar justificación de biografía en celulares pequeños */
    .hero-bio {
        text-align: justify !important;
        hyphens: none !important;
        word-break: normal;
    }
    /* Asegurar que el badge esté centrado y no se desplace */
    .past-decano-badge {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 320px !important;
        margin: 0 auto;
        bottom: 20px !important;
    }
}
