:root {
    --bg-dark: #121212;
    --bg-card: #1c1c1c;
    --text-light: #e0e0e0;
    --accent: #d4af37;
    /* Gold */
    --accent-hover: #b8962c;
    --white: #ffffff;
    --bg-light: #f5f0eb;
    --text-dark: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: rgba(18, 18, 18, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-highlight {
    color: var(--accent) !important;
    font-weight: 600;
}

.nav-highlight:hover {
    color: #888 !important;
}

nav ul li a {
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phone {
    font-weight: 600;
}

.menu-btn {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    background-color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-dark);
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* HERO SECTION */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

section {
    scroll-snap-align: start;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    align-items: stretch;
    background: #020204;
    overflow: hidden;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.hero-content {
    padding: 6rem 10% 2rem 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image {
    width: 100%;
    height: 100%;
    background-image: url('/img/mainfoto.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 300;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-content h2 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 2rem;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 450px;
    margin-bottom: 2.5rem;
    color: #b0b0b0;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.quote {
    font-style: italic;
    font-size: 1.2rem;
    font-family: 'Times New Roman', serif;
    color: rgba(255, 255, 255, 0.7);
}

.image-placeholder {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ABOUT SECTION */
.about {
    position: relative;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    scroll-margin-top: 80px;
    /* Offset for fixed header */
}

.about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    background-image: url('/img/about-me.jpeg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left bottom;
    /* Sticky to the very left */
}

.about-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 35% 1fr;
    align-items: center;
    width: 100%;
}

.about-text {
    padding: 100px 10% 80px 2%;
    /* Top padding helps with head space too */
}

.about-image {
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
}

.about-text h3 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.credentials {
    list-style: none;
}

.credentials li {
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* RECORDS / REGISTROS */
.records-section {
    padding: 5rem 5%;
    text-align: center;
    background: linear-gradient(to bottom, #121212 0%, #1a1510 100%);
}

.records-section h3 {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.records-section p {
    color: #a0a0a0;
    margin-bottom: 3rem;
}

.slider-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.logos-track {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.logos-track img {
    max-height: 60px;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logos-track img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ARTICLES / CONTENIDO */
.articles-section {
    padding: 5rem 5%;
    background-color: var(--bg-dark);
}

.articles-section h3 {
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 3rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.article-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(212, 175, 55, 0.3);
}

.article-card .date {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-card .title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.article-card .subtitle {
    font-size: 1rem;
    color: #a0a0a0;
    margin-bottom: 1rem;
}

.article-card .brief {
    color: #b0b0b0;
    margin-bottom: 2rem;
    flex-grow: 1;
    text-align: justify;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

/* ARTICLE PAGE DETAILS */
.article-page {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.article-page .main-header {
    background-color: var(--bg-dark);
}

.article-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 5%;
}

.article-content-wrapper {
    background: var(--white);
    padding: 4rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

.article-content-wrapper h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.article-meta {
    color: #666;
    margin-bottom: 3rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: justify;
}

.article-body p {
    margin-bottom: 1.5rem;
}

footer {
    text-align: center;
    padding: 3rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 0.9rem;
    background-color: var(--bg-dark);
    margin-top: 4rem;
}

/* ADMIN PANEL */
.admin-container {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.admin-panel-section {
    margin-bottom: 3rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: #111;
    border: 1px solid #333;
    color: white;
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 8px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

#loginError {
    color: #ff4444;
    margin-top: 1rem;
}

/* MODAL CONTACTO */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.8rem;
    color: var(--accent);
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-content .form-group label {
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-content .form-group input,
.modal-content .form-group textarea {
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 1rem;
    font-size: 1rem;
    color: white;
    width: 100%;
}

.modal-content .form-group input:focus,
.modal-content .form-group textarea:focus {
    border-color: var(--accent);
}

/* TESTIMONIALS SECTION */
.testimonials-section {
    padding: 8rem 5%;
    background-color: var(--bg-dark);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: #ffffff;
    /* Fondo blanco */
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    /* Todo centralizado */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
}

.testimonial-card p {
    font-style: italic;
    color: #444444;
    /* Letras de descripción en gris oscuro/grafito */
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.testimonial-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centralizar nombre y puesto */
}

.testimonial-user strong {
    color: var(--accent);
    /* Mantener color oro */
    font-size: 1.2rem;
    font-weight: 700;
}

.testimonial-user span {
    color: #888;
    /* Mantener color del puesto */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* REVEAL ANIMATION */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .hero-image {
        display: block;
        width: 100%;
        height: 350px;
        order: -1;
        background-size: contain;
        background-position: center bottom;
        margin-top: 80px;
    }

    .hero-content {
        padding: 2rem 5% 4rem 5%;
        text-align: center;
        align-items: center;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .about {
        min-height: auto;
    }

    .about::before {
        display: none;
        /* Hide background image on mobile */
    }

    .about-grid {
        grid-template-columns: 1fr;
        padding: 0 0 4rem 0;
        gap: 2rem;
    }

    .about-image {
        display: block;
        width: 100%;
        height: 500px;
        background-image: url('/img/about-me.jpeg');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center top;
        border-radius: 0;
    }

    .about-text {
        padding: 0 5%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 1rem 5%;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #0a0a0a;
        z-index: 1001;
        transition: 0.5s;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    .menu-btn {
        display: block;
        font-size: 1.5rem;
        color: white;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1002;
    }

    .header-contact .phone {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.4rem;
    }

    .event-modal-gallery {
        grid-template-columns: 1fr 1fr;
    }
}

/* Social Icons */
.footer-socials { display:flex; gap:1.2rem; justify-content:center; align-items:center; margin-bottom:1.5rem; }
.social-icon {
    display:inline-flex; align-items:center; justify-content:center;
    width:40px; height:40px; border-radius:50%;
    border:1px solid rgba(255,255,255,0.15); color:white;
    transition:all 0.3s ease;
}
.social-icon svg { width:20px; height:20px; }
.social-icon:hover { color:var(--accent); border-color:var(--accent); transform:translateY(-3px); background:rgba(212,175,55,0.1); }


/* ===== EVENTS SECTION ===== */
.events-section {
    padding: 6rem 5%;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1510 50%, #121212 100%);
    position: relative;
    overflow: hidden;
}

.events-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.events-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.events-header h3 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.events-header p {
    color: #a0a0a0;
    font-size: 1.1rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Event Card */
.event-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
}

.event-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-card-image img {
    transform: scale(1.08);
}

.event-card-no-image {
    background: linear-gradient(135deg, #2a2520, #1a1510);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-card-no-image span {
    font-size: 3rem;
    opacity: 0.4;
}

.event-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.event-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.12);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.event-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.event-card-desc {
    font-size: 0.95rem;
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.event-card-date {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    opacity: 0.85;
}

.event-card .btn-secondary {
    align-self: flex-start;
}

/* Event Modal */
.event-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.event-modal-content::-webkit-scrollbar {
    width: 6px;
}

.event-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.event-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.event-modal-body {
    padding-top: 0.5rem;
}

.event-modal-date {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.event-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.event-modal-description {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    white-space: pre-wrap;
}

.event-modal-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: "🔍";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

/* Gallery fullscreen */
.gallery-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInQuick 0.3s ease;
}

@keyframes fadeInQuick {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-fullscreen img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.2);
}

.gallery-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.gallery-close:hover {
    color: var(--accent);
}

/* Events responsive - tablet */
@media (max-width: 992px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}