/* ============================================
   ESTILOS EXCLUSIVOS PARA PÁGINA PRINCIPAL (index.html)
   Optimizado para velocidad - Video solo en desktop
   ============================================ */

/* ===== VARIABLES (heredadas del global) ===== */
:root {
    --black-rich: #010101;
    --gray-dark: #202020;
    --gray-medium: #4E4E4E;
    --gray-light: #CBCBCD;
    --white: #ffffff;
    --accent-gold: #D4AF37;
    --accent-red: #E63946;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ===== HERO SECTION OPTIMIZADA ===== */
#inicio {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* VIDEO - SOLO VISIBLE EN DESKTOP */
.video-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: brightness(35%) contrast(110%);
    object-fit: cover;
    transition: transform 0.1s linear;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(1, 1, 1, 0.8) 70%);
    z-index: -1;
}

/* ✅ VIDEO DESAPARECE EN TABLETS Y MÓVILES */
@media (max-width: 992px) {
    #bg-video {
        display: none !important;
    }
    
    .video-overlay {
        background: rgba(1, 1, 1, 0.9) !important;
    }
    
    .video-container {
        background: linear-gradient(135deg, #010101, #1a1a1a);
    }
}

/* Hero content */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    position: relative;
    z-index: 2;
}

.hero-tagline {
    color: var(--accent-gold);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 300;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-logo {
    width: auto;
    max-width: 30%;
    min-width: 250px;
    height: auto;
    max-height: 200px;
    margin-bottom: 25px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    opacity: 0;
    animation: fadeInUp 1s ease 0.7s forwards;
    object-fit: contain;
}

.hero-slogan {
    width: auto;
    max-width: 30%;
    min-width: 200px;
    height: auto;
    max-height: 150px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
    object-fit: contain;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease 1.1s forwards;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary {
    padding: 15px 35px;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-red));
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    padding: 15px 35px;
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 4px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray-light);
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
}

/* ===== BARRA DE MIEMBROS ===== */
.members-section {
    background: linear-gradient(to bottom, rgba(1,1,1,0.9), var(--black-rich));
    padding: 0;
    position: relative;
    width: 100%;
}

.members-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gray-light);
    margin-bottom: 40px;
    padding: 0 10%;
}

.members-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    margin: 15px auto 0;
}

.members-bar {
    background: var(--black-rich);
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-top: 1px solid var(--gray-dark);
    border-bottom: 1px solid var(--gray-dark);
}

.members-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, var(--black-rich), transparent);
    z-index: 2;
}

.members-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--black-rich));
    z-index: 2;
}

.members-bar-track {
    display: flex;
    width: max-content;
    animation: marquee-left 12s linear infinite;
}

.members-bar-track:hover {
    animation-play-state: paused;
}

.member-logo-item {
    height: 110px;
    width: 110px;
    margin: 0 35px;
    border-radius: 50%;
    border: 2px solid var(--gray-medium);
    filter: grayscale(100%) brightness(80%);
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    display: block;
}

.member-logo-item img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #2c2c2c;
}

.member-logo-item::before {
    content: attr(data-name);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 3;
}

.member-logo-item:hover {
    filter: grayscale(0%) brightness(100%);
    border-color: var(--accent-gold);
    transform: scale(1.15);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

.member-logo-item:hover::before {
    opacity: 1;
    bottom: -35px;
}

@keyframes marquee-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== SECCIÓN NOSOTROS ===== */
#nosotros {
    padding: 120px 10% 100px;
    background: var(--black-rich);
    position: relative;
    overflow: hidden;
}

#nosotros::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-medium), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    color: var(--white);
}

.section-header p {
    color: var(--gray-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.mision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.mision-card {
    background: rgba(32, 32, 32, 0.5);
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.mision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-red));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.mision-card:hover {
    transform: translateY(-10px);
    border-color: var(--gray-light);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.mision-card:hover::before {
    transform: scaleX(1);
}

.mision-card i {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 25px;
    display: block;
}

.mision-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mision-card p {
    color: var(--gray-light);
    font-size: 1rem;
    line-height: 1.6;
}

.btn-container {
    text-align: center;
    margin-top: 50px;
}

.btn-container.mt-40 {
    margin-top: 40px;
}

/* ===== SECCIÓN DIRECTIVOS ===== */
#directivos {
    padding: 120px 10%;
    background: linear-gradient(135deg, rgba(32, 32, 32, 0.8), rgba(1, 1, 1, 0.9));
    text-align: center;
    position: relative;
}

#directivos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.directivos-grid-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto 50px auto;
}

.directivos-grid-bottom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    max-width: 800px;
    margin: 0 auto;
}

.directivo-card {
    background: rgba(32, 32, 32, 0.5);
    border: 1px solid var(--gray-medium);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.directivo-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.directivo-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    margin: 0 auto 25px;
    overflow: hidden;
    position: relative;
}

.directivo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.directivo-card:hover .directivo-avatar img {
    transform: scale(1.05);
}

.directivo-info h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 5px;
    font-weight: 700;
}

.directivo-cargo {
    color: var(--accent-gold);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 600;
}

.directivo-departamento {
    color: var(--gray-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.directivo-frase {
    color: var(--gray-light);
    font-style: italic;
    padding-top: 20px;
    border-top: 1px solid var(--gray-medium);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== SECCIÓN BLOG ===== */
#blog {
    padding: 100px 10%;
    background: linear-gradient(to bottom, var(--black-rich), rgba(32, 32, 32, 0.8));
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.article-card {
    background: rgba(32, 32, 32, 0.5);
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    border-color: var(--gray-light);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.article-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: var(--gray-dark);
    transition: var(--transition);
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--gray-medium);
}

.article-category {
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.article-content h3 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--gray-light);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.read-more {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: auto;
}

.read-more:hover {
    color: var(--white);
    gap: 12px;
}

.loading-noticias {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--gray-light);
}

.loading-noticias i {
    margin-right: 10px;
    color: var(--accent-gold);
}

/* ===== SECCIÓN CONTACTO ===== */
#contacto {
    padding: 100px 10%;
    background: var(--black-rich);
    border-top: 1px solid var(--gray-dark);
}

.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.contacto-info h3 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--white);
    letter-spacing: 2px;
}

.contacto-info p {
    color: var(--gray-light);
    margin-bottom: 30px;
    line-height: 1.7;
}

.contacto-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    color: var(--gray-light);
}

.contacto-item i {
    font-size: 1.3rem;
    color: var(--accent-gold);
    margin-right: 15px;
    margin-top: 5px;
}

.contacto-details h4 {
    color: var(--white);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.contacto-details a {
    color: var(--gray-light);
    text-decoration: none;
    transition: var(--transition);
}

.contacto-details a:hover {
    color: var(--accent-gold);
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-light);
}

.form-group input,
.form-group textarea,
.form-group select {
    background: rgba(32, 32, 32, 0.5);
    border: 1px solid var(--gray-medium);
    padding: 15px;
    color: var(--white);
    font-family: 'Lato', sans-serif;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.form-group.success input,
.form-group.success textarea {
    border-color: #4CAF50;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--accent-red);
}

.error-message {
    color: var(--accent-red);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.btn-enviar {
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-red));
    color: var(--white);
    border: none;
    padding: 18px 35px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 10px;
}

.btn-enviar:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-enviar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #4CAF50;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    margin-top: 20px;
    display: none;
}

.success-message.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.error-message-container {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    margin-top: 20px;
    display: none;
}

.error-message-container.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .hero-logo { max-width: 70%; max-height: 180px; }
    .hero-slogan { max-width: 60%; max-height: 130px; }
    .members-bar { height: 160px; }
    .member-logo-item { height: 100px; width: 100px; margin: 0 30px; }
}

@media (max-width: 992px) {
    .hero-logo { max-width: 70%; max-height: 180px; }
    .hero-slogan { max-width: 60%; max-height: 130px; }
    .section-header h2 { font-size: 2.4rem; }
    .contacto-wrapper { grid-template-columns: 1fr; gap: 50px; }
    .form-row { grid-template-columns: 1fr; gap: 25px; }
    .directivos-grid-top { gap: 30px; }
    .directivos-grid-bottom { max-width: 600px; gap: 30px; }
    .scroll-indicator { bottom: 40px !important; }
}

@media (max-width: 768px) {
    .members-section { display: none !important; }
    #inicio { height: 100vh; min-height: 600px; justify-content: center; }
    .hero-content { padding-top: 80px; padding-bottom: 80px; }
    .scroll-indicator { bottom: 40px !important; }
    .hero-logo { max-width: 65%; max-height: 150px; min-width: 200px; }
    .hero-slogan { max-width: 55%; max-height: 110px; min-width: 180px; }
    .section-header h2 { font-size: 2rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; width: 100%; max-width: 300px; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }
    .directivos-grid-top { grid-template-columns: 1fr; gap: 30px; margin-bottom: 30px; }
    .directivos-grid-bottom { grid-template-columns: 1fr; max-width: 100%; gap: 30px; }
    .directivo-avatar { width: 120px; height: 120px; }
}

@media (max-width: 576px) {
    #inicio { height: 100vh; min-height: 500px; justify-content: center; }
    .hero-tagline { font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 15px; }
    .hero-logo { max-width: 80%; max-height: 120px; min-width: 180px; margin-bottom: 20px; }
    .hero-slogan { max-width: 70%; max-height: 90px; min-width: 150px; margin-bottom: 30px; }
    .hero-cta { width: 100%; max-width: 280px; }
    .mision-grid { grid-template-columns: 1fr; }
    section { padding: 80px 5%; }
    .section-header h2 { font-size: 1.8rem; }
    .directivo-card { padding: 30px 20px; }
    .directivo-avatar { width: 100px; height: 100px; }
    .directivo-info h3 { font-size: 1.3rem; }
    .article-image { height: 180px; }
}

@media (max-width: 400px) {
    .hero-logo { max-width: 85%; max-height: 100px; min-width: 150px; }
    .hero-slogan { max-width: 75%; max-height: 75px; min-width: 120px; }
    .btn-primary, .btn-secondary { padding: 12px 25px; font-size: 0.9rem; }
    .hero-content { padding-top: 50px; }
    .members-section { display: none !important; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(32, 32, 32, 0.6); }
::-webkit-scrollbar-thumb { background: linear-gradient(45deg, var(--accent-gold), var(--accent-red)); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(45deg, var(--accent-red), var(--accent-gold)); }