/* Le Solee Club Plugin Styles */

.le-solee-access-denied {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.le-solee-access-denied h2 {
    color: #d63638;
    margin-bottom: 20px;
    font-size: 24px;
}

.le-solee-access-denied p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #333;
}

/* Estilos para mensajes de acceso concedido */
.le-solee-access-granted {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.le-solee-access-granted p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #155724;
}

.le-solee-access-granted a {
    color: #0073aa;
    text-decoration: none;
}

.le-solee-access-granted a:hover {
    text-decoration: underline;
}

/* Estilos para el formulario de login */
#le-solee-loginform {
    max-width: 300px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#le-solee-loginform p {
    margin-bottom: 15px;
    text-align: left;
}

#le-solee-loginform label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#le-solee-loginform input[type="text"],
#le-solee-loginform input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

#le-solee-loginform input[type="submit"] {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

#le-solee-loginform input[type="submit"]:hover {
    background: #005a87;
}

#le-solee-loginform .forgetmenot {
    font-size: 12px;
}

#le-solee-loginform .forgetmenot input {
    width: auto;
    margin-right: 5px;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .le-solee-access-denied {
        margin: 20px;
        padding: 20px;
    }
    
    #le-solee-loginform {
        margin: 20px 0;
    }
}

/* ================================
   ESTILOS ESPECÍFICOS PARA PÁGINA DE CURSOS
   ================================ */

/* Solo aplicar en páginas que contengan nuestro shortcode */
.le-solee-courses-page {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Ocultar título solo en la página de cursos */
.le-solee-courses-page ~ * .entry-title,
.page:has(.le-solee-courses-page) .entry-title,
body:has(.le-solee-courses-page) .entry-header {
    display: none !important;
}

/* Hero Section - SIEMPRE ancho completo con margin-top fijo */
.le-solee-hero-section {
    width: 100vw;
    height: 50vh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    margin-left: calc(-50vw + 50%);
    margin-top: 40px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Eliminar clase dinámica ya que no la usaremos */
.le-solee-hero-dynamic {
    margin-top: 40px;
}

/* Ajuste solo para la barra de administración */
body.admin-bar .le-solee-hero-section {
    margin-top: 72px; /* 40px + 32px de admin bar */
}

@media screen and (max-width: 782px) {
    body.admin-bar .le-solee-hero-section {
        margin-top: 86px; /* 40px + 46px de admin bar mobile */
    }
}

/* Remover la versión contenida ya que siempre usaremos ancho completo */
.le-solee-hero-section-contained {
    display: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Contenido del hero */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 40px 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

/* Ajustes automáticos según el contexto */
body.admin-bar .le-solee-hero-section {
    /* Compensar barra de administración si está presente */
    margin-top: 32px;
}

/* Para temas con headers fijos comunes */
.site-header + * .le-solee-hero-section,
.header + * .le-solee-hero-section,
.masthead + * .le-solee-hero-section {
    margin-top: 0;
}

/* Mejora para temas populares */
.twentytwentyfive .le-solee-hero-section,
.twentytwentyfour .le-solee-hero-section,
.astra-theme .le-solee-hero-section,
.generatepress .le-solee-hero-section {
    margin-left: 0;
    width: 100%;
}

/* Contenido adicional para pruebas */
.le-solee-courses-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 60px 20px 20px;
    background: #f8f9fa;
}

/* Grid de cursos - Centrado pero con ancho máximo */
.le-solee-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px auto 0;
    max-width: 1200px;
    justify-items: start;
}

.le-solee-course-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    border: 1px solid #f0f0f0;
    width: 100%;
    max-width: 350px;
    justify-self: start;
}

.le-solee-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Efectos de loading */
.le-solee-courses-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.le-solee-courses-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.course-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-image:hover img {
    transform: scale(1.05);
}

.course-content {
    padding: 25px;
}

.course-categories {
    margin-bottom: 15px;
}

.course-category {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.3;
}

.course-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.course-title a:hover {
    color: #3498db;
}

.course-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.course-date {
    color: #999;
    font-size: 13px;
    font-weight: 500;
}

.course-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.course-link:hover {
    color: #2980b9;
}

.le-solee-courses-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.le-solee-courses-restricted {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    text-align: center;
}

.le-solee-courses-restricted h3 {
    color: #856404;
    margin-bottom: 15px;
}

.le-solee-courses-restricted p {
    color: #856404;
    margin-bottom: 15px;
}

/* Filtro de categorías - También ancho completo */
.le-solee-courses-filter {
    margin: 0 auto 40px;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    max-width: 1200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.le-solee-courses-filter .filter-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: #fff;
    color: #6c757d;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-btn:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    text-decoration: none;
}

.filter-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.filter-btn .count {
    margin-left: 6px;
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 10px;
}

.filter-btn:hover .count,
.filter-btn.active .count {
    background: rgba(255,255,255,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .le-solee-courses-container {
        padding: 40px 15px 20px;
    }
    
    .le-solee-courses-filter {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .filter-title {
        font-size: 16px;
    }
    
    .le-solee-courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .le-solee-course-card {
        max-width: 100%;
    }
    
    .course-content {
        padding: 20px;
    }
    
    .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .le-solee-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-image {
        height: 180px;
    }
    
    .course-title {
        font-size: 18px;
    }
}