/* 
EXABENAVENTE.ORG - MODERN INSTITUTIONAL CSS
Luminous, Traditional, Professional
*/

:root {
    --blue-benavente: #003B71;
    --gold-lasallista: #D4AF37;
    --white: #ffffff;
    --ghost-white: #f8f9fa;
    --charcoal: #333333;
    --steel: #6c757d;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--charcoal);
    line-height: 1.6;
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--gold-lasallista);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

/* Hamburguesa (Oculta en Desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--blue-benavente);
    margin: 5px 0;
    transition: 0.3s;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
}

.logo-container img {
    height: 120px;
    /* Tamaño duplicado para mejor visibilidad */
    width: auto;
    transition: height 0.3s ease;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--blue-benavente);
    text-transform: uppercase;
    font-family: 'Playfair Display', serif;
    margin: 0;
    line-height: 1;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--blue-benavente);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--gold-lasallista);
}

/* Hero Section */
.hero {
    padding: 160px 10%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: linear-gradient(rgba(0, 59, 113, 0.7), rgba(0, 59, 113, 0.4)), url('imagenes/benavente-historia.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    /* Cambiado a scroll para control absoluto del centro */
    text-align: center;
}

.hero h2 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    text-shadow: 2px 4px 15px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 850px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.btn-primary {
    background: var(--blue-benavente);
    color: var(--white);
    padding: 12px 30px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s, background 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #002d5a;
}

/* Grid Sections */
.section-container {
    padding: 60px 5%;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 40px;
    border-left: 5px solid var(--gold-lasallista);
    padding-left: 20px;
}

.section-title h3 {
    font-size: 2rem;
    color: var(--blue-benavente);
    font-family: 'Playfair Display', serif;
}

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

.card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.card h4 {
    color: var(--blue-benavente);
    margin-bottom: 10px;
}

.card p {
    font-size: 0.9rem;
    color: var(--steel);
}

/* Form Styling */
.form-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--ghost-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Filter Buttons */
.filter-container {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 30px;
    color: var(--blue-benavente);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    /* Sin subrayado */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    border-color: var(--gold-lasallista);
    color: var(--gold-lasallista);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--blue-benavente);
    color: var(--white);
    border-color: var(--blue-benavente);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

/* Dashboard Layout (30/70) */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    padding: 30px 5%;
    align-items: start;
}

.sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.sidebar-group {
    margin-bottom: 25px;
}

.sidebar-group h4 {
    color: var(--steel);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    text-decoration: none;
    /* Sin subrayado */
    color: var(--blue-benavente);
    font-size: 0.95rem;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: var(--ghost-white);
    color: var(--gold-lasallista);
    padding-left: 18px;
}

.main-content {
    background: transparent;
}

/* Footer */
footer {
    background: var(--blue-benavente);
    color: var(--white);
    padding: 60px 5% 30px;
    margin-top: 80px;
}

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

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .logo-container img {
        height: 90px;
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 980px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    header {
        position: relative;
        padding: 12px 4%;
        flex-direction: row;
        gap: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        border-bottom: 2px solid var(--gold-lasallista);
    }

    nav.active {
        max-height: 600px;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        width: 100%;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    .logo-container {
        flex-direction: row;
        text-align: left;
    }

    .logo-container img {
        height: 60px;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    /* Hero */
    .hero {
        padding: 80px 6%;
        min-height: auto;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .hero-actions a {
        margin-left: 0 !important;
    }

    /* Sections */
    .section-container {
        padding: 40px 4%;
    }

    .section-title {
        flex-direction: column;
        gap: 8px;
    }

    .section-title h3 {
        font-size: 1.5rem;
    }

    /* Forms */
    .form-card {
        padding: 25px 20px;
    }

    /* Footer */
    footer {
        margin-top: 40px;
        padding: 40px 4% 20px;
    }

    /* Dashboard grids */
    .two-cols-grid,
    [style*="grid-template-columns: 1fr 350px"],
    [style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
    }

    .three-cols-grid,
    [style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .logo-container img {
        height: 50px;
    }

    .logo-text h1 {
        font-size: 0.95rem;
    }

    nav ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        text-align: center;
    }

    .btn-primary {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 60px 5%;
    }

    .hero h2 {
        font-size: 1.7rem;
    }

    .carousel-container {
        padding: 10px 40px;
    }

    .section-container {
        padding: 30px 4%;
    }

    .form-card {
        padding: 20px 15px;
    }
}

/* Carousel & Premium Cards */
.carousel-container {
    position: relative;
    width: 100%;
    /* Ocupa todo el ancho */
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 60px;
    /* Espacio para flechas */
}

.carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.5s ease-in-out;
    list-style: none;
    padding: 10px 0;
}

.carousel-slide {
    flex: 0 0 calc(14.28% - 13px);
    min-width: 160px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.admin-card img.profile-img,
.admin-card .user-placeholder {
    width: 80px;
    /* Tamaño estandarizado */
    height: 80px;
    border-radius: 50%;
    /* SIEMPRE CIRCULAR */
    border: 3px solid var(--gold-lasallista);
    object-fit: cover;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.admin-card .user-placeholder {
    font-size: 2.2rem;
}

.admin-card .tag {
    font-size: 0.6rem;
    /* Texto más pequeño */
    padding: 3px 8px;
    margin-bottom: 10px;
}

.admin-card h4 {
    font-size: 0.9rem;
    /* Título más compacto */
    line-height: 1.2;
}

.admin-card .profession {
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.social-links {
    gap: 8px;
    padding-top: 10px;
}

.social-links img {
    width: 18px !important;
    height: 18px !important;
}

/* Posicionar flechas fuera del track */
.btn-carousel {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
}

#prevBtn {
    left: 5px;
}

#nextBtn {
    right: 5px;
}

@media (max-width: 1200px) {
    .carousel-slide {
        flex: 0 0 calc(20% - 12px);
    }
}

/* 5 cajas */
@media (max-width: 900px) {
    .carousel-slide {
        flex: 0 0 calc(33.33% - 10px);
    }
}

/* 3 cajas */
@media (max-width: 600px) {
    .carousel-slide {
        flex: 0 0 100%;
    }
}

.social-links img {
    width: 22px !important;
    height: 22px !important;
    transition: 0.3s;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.social-links a:hover img {
    transform: scale(1.2);
}

/* Carousel Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.btn-carousel {
    background: var(--blue-benavente);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.btn-carousel:hover {
    background: var(--gold-lasallista);
    transform: scale(1.1);
}

@media (max-width: 900px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 13px);
    }
}

@media (max-width: 600px) {
    .carousel-slide {
        flex: 0 0 100%;
    }
}