/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* ===== RESPONSIVE IMAGES ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== MAIN LAYOUT ===== */
.main-content {
  min-height: 60vh;
  padding: 20px 0;
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}





/* ===== PREMIUM SECTION - ESTILO MEJORADO ===== */
.premium-section {
    padding: 100px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-suptitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-purple);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 25px;
    text-transform: uppercase;
    line-height: 1.1;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: var(--accent-amber);
    margin: 0 auto 25px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    line-height: 1.7;
    font-weight: 400;
}

.premium-grid-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.premium-card-modern {
    position: relative;
    background: white;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.premium-card-large-modern {
    min-height: 600px;
    grid-column: span 1;
}

.premium-card-full-modern {
    min-height: 500px;
    grid-column: 1 / -1;
}

.premium-card-modern:nth-child(1) {
    border-right: 2px solid var(--gray-200);
    border-bottom: 2px solid var(--gray-200);
}

.premium-card-modern:nth-child(2) {
    border-bottom: 2px solid var(--gray-200);
}

.premium-image-modern {
    position: relative;
    width: 100%;
    height: 55%;
    overflow: hidden;
    flex-shrink: 0;
}

.premium-img-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.premium-card-modern:hover .premium-img-modern {
    transform: scale(1.08);
}

.premium-content-modern {
    padding: 50px 40px;
    height: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.card-category {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-purple);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
}

.card-title-modern {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 20px;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.card-divider {
    width: 80px;
    height: 3px;
    background: var(--accent-amber);
    margin: 0 0 25px 0;
}

.card-description-modern {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 30px;
    flex-grow: 1;
    font-weight: 400;
}

.card-button-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-purple);
    color: white;
    text-decoration: none;
    padding: 16px 35px;
    border: 2px solid var(--primary-purple);
    border-radius: 0;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    margin-top: auto;
}

.card-button-modern:hover {
    background: transparent;
    color: var(--primary-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 33, 168, 0.3);
}

/* Estilo especial para la tarjeta full width */
.premium-card-full-modern .premium-image-modern {
    height: 60%;
}

.premium-card-full-modern .premium-content-modern {
    height: 40%;
    text-align: center;
    padding: 40px 60px;
}

.premium-card-full-modern .card-divider {
    margin: 0 auto 25px;
}

.premium-card-full-modern .card-button-modern {
    margin: 20px auto 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1440px) {
    .premium-grid-modern {
        max-width: 1200px;
        margin: 0 20px;
    }
}

@media (max-width: 1024px) {
    .premium-grid-modern {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .premium-card-large-modern {
        min-height: 550px;
        grid-column: 1;
    }
    
    .premium-card-full-modern {
        min-height: 450px;
    }
    
    .premium-card-modern:nth-child(1),
    .premium-card-modern:nth-child(2) {
        border-right: none;
        border-bottom: 2px solid var(--gray-200);
    }
    
    .premium-content-modern {
        padding: 40px 30px;
    }
    
    .premium-card-full-modern .premium-content-modern {
        padding: 35px 40px;
    }
}

@media (max-width: 768px) {
    .premium-section {
        padding: 80px 0;
    }
    
    .section-header {
        margin-bottom: 60px;
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .premium-card-large-modern {
        min-height: 500px;
    }
    
    .premium-card-full-modern {
        min-height: 400px;
    }
    
    .premium-content-modern {
        padding: 35px 25px;
    }
    
    .card-title-modern {
        font-size: 1.8rem;
    }
    
    .card-description-modern {
        font-size: 1rem;
    }
    
    .premium-card-full-modern .premium-content-modern {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .premium-section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-suptitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .premium-card-large-modern {
        min-height: 450px;
    }
    
    .premium-card-full-modern {
        min-height: 350px;
    }
    
    .premium-content-modern {
        padding: 30px 20px;
    }
    
    .card-title-modern {
        font-size: 1.5rem;
    }
    
    .card-description-modern {
        font-size: 0.95rem;
    }
    
    .card-button-modern {
        padding: 14px 25px;
        font-size: 0.9rem;
    }
}

/* ===== ESTILOS PARA VIDEO ===== */
.premium-video-modern {
    position: relative;
    width: 100%;
    height: 60%;
    overflow: hidden;
    flex-shrink: 0;
    background: #000; /* Fondo negro por si falla todo */
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    min-width: 100%;
    min-height: 100%;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

/* Estado cuando el video falla o no carga */
.video-wrapper.video-error .video-iframe {
    opacity: 0;
}

.video-wrapper.video-error .video-fallback {
    opacity: 1;
}

/* Estado de carga */
.video-wrapper.video-loading .video-iframe {
    opacity: 0;
}

.video-wrapper.video-loading .video-fallback {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 2; /* Por encima del video y fallback */
    pointer-events: none; /* Permite interacción con el video */
}

/* Loading indicator */
.video-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper.video-loading .video-loading-indicator {
    opacity: 1;
}

/* ===== RESPONSIVE PARA VIDEO ===== */
@media (max-width: 1024px) {
    .premium-video-modern {
        height: 55%;
    }
}

@media (max-width: 768px) {
    .premium-video-modern {
        height: 50%;
    }
    
    /* En móviles, priorizar la imagen para mejor performance */
    .video-iframe {
        display: block;
    }
}

@media (max-width: 480px) {
    .premium-video-modern {
        height: 45%;
    }
}

/* Para tablets y móviles en portrait, considerar desactivar autoplay */
@media (max-width: 768px) and (orientation: portrait) {
    .video-iframe {
        /* Podríamos pausar el video en móviles para ahorrar datos */
        pointer-events: auto;
    }
}