/*
Theme Name: Paideia
Theme URI: https://paideiatraining.com
Template: astra
Author: Paideia
Description: Custom child theme for Paideia Academy, focusing on Classical Excellence and modern performance.
Version: 1.0.0
*/

:root {
    /* Typography */
    --paideia-font-serif: 'Playfair Display', serif;
    --paideia-font-sans: 'Lato', sans-serif;
}

/* Global Typography */
body {
    font-family: var(--paideia-font-sans);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--paideia-font-serif);
    font-weight: 700;
    line-height: 1.2;
}

/* Base Link Styles */
a {
    text-decoration: none;
}

/* Primary Button Style (Class used by Astra/Elementor) */
.paideia-button,
.wp-block-button__link {
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-family: var(--paideia-font-sans) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Header & Brand Identity Fixes */
.ast-site-identity {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hide site title only when a custom logo is present */
.site-logo-img+.ast-site-title-wrap .site-title {
    display: none !important;
}

/* If Astra uses a different structure, hide all titles in branding if there is a logo */
.has-custom-logo .site-title,
.has-custom-logo .site-description {
    display: none !important;
}

/* Ensure the logo has a consistent size */
.custom-logo-link img {
    max-width: 180px;
    height: auto;
}

@media (max-width: 768px) {
    .custom-logo-link img {
        max-width: 140px;
    }
}

/* ==========================================================================
   WOOCOMMERCE MY ACCOUNT - PREMIUM SAAS DASHBOARD (PAIDEIA Edition)
   ========================================================================== */

:root {
    --paideia-teal: #2D7A7B;    /* Color Institucional (Mi Cuenta) */
    --paideia-slate: #2E5266;   /* Azul Pizarra (Escuela de Ciencias) */
    --paideia-clay: #C8673B;    /* Terracota (Escuela de Teología) */
    --paideia-bg: #F2EDE8;      /* Crema Suave de fondo */
    --paideia-dark: #1E1E1E;    /* Carbón para Títulos */
    --dash-sidebar-w: 260px;
}

/* Fondo General para la página de Mi Cuenta */
body.woocommerce-account {
    background-color: var(--paideia-bg) !important;
}

/* Estructura Flexbox para el Dashboard */
.woocommerce-account .woocommerce {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Navegación Lateral (Sidebar) */
.woocommerce-account .woocommerce-MyAccount-navigation {
    width: var(--dash-sidebar-w) !important;
    background: white !important;
    border-radius: 20px !important;
    padding: 30px 15px !important;
    box-shadow: 0 10px 30px rgba(45, 122, 123, 0.08) !important;
    border: none !important;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #6B6B6B;
    font-weight: 500;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Iconos de Navegación */
.woocommerce-MyAccount-navigation ul li a::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 15px;
    font-size: 18px;
    width: 25px;
    text-align: center;
}

/* Asignación de iconos por pestaña */
.woocommerce-MyAccount-navigation-link--dashboard a::before { content: "\f015"; } /* Home Icon */
.woocommerce-MyAccount-navigation-link--cursos a::before { content: "\f19d"; }
.woocommerce-MyAccount-navigation-link--orders a::before { content: "\f07a"; }
.woocommerce-MyAccount-navigation-link--edit-account a::before { content: "\f013"; }
.woocommerce-MyAccount-navigation-link--customer-logout a::before { content: "\f2f5"; }

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--paideia-teal) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(45, 122, 123, 0.3);
}

.woocommerce-MyAccount-navigation ul li a:hover:not(.is-active) {
    background: #2D7A7B10;
    color: var(--paideia-teal);
}

/* Área de Contenido Principal */
.woocommerce-MyAccount-content {
    flex: 1;
}

.woocommerce-MyAccount-content > div, 
.woocommerce-MyAccount-content > p,
#ld-profile {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.02);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.03);
}

/* Botones y LearnDash */
.woocommerce-Button, .woocommerce-button, .ld-button {
    background-color: var(--paideia-slate) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 14px 28px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    border: none !important;
}

.woocommerce-Button:hover {
    background-color: var(--paideia-teal) !important;
    transform: translateY(-2px);
}

/* LearnDash Profile */
.ld-profile-header {
    background: linear-gradient(135deg, var(--paideia-teal), var(--paideia-slate)) !important;
    border-radius: 16px !important;
    padding: 30px !important;
}

.ld-progress-background {
    background-color: var(--paideia-clay) !important;
}

/* Responsive My Account */
/* ==========================================================================
   HERO / WELCOME HEADER (Simple & Elegant Reversion)
   ========================================================================== */

.woocommerce-account h1.entry-title,
.woocommerce-account .entry-header {
    background: transparent !important;
    padding: 40px 0 10px 0 !important;
    text-align: center !important;
    border: none !important;
    width: 100% !important;
    display: block !important;
}

.woocommerce-account h1.entry-title,
.woocommerce-account .entry-title {
    font-family: var(--paideia-font-serif) !important;
    font-style: italic !important;
    font-size: 32px !important;
    color: var(--paideia-teal) !important;
    font-weight: 500 !important;
    margin: 0 auto !important;
}

/* Saludo de WooCommerce Sencillo */
.woocommerce-MyAccount-content p:first-of-type,
.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
    background: transparent !important;
    color: #555 !important;
    padding: 0 0 20px 0 !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 16px !important;
    margin-bottom: 20px !important;
    text-align: left !important;
}

.woocommerce-MyAccount-content p:first-of-type strong {
    color: var(--paideia-dark) !important;
    font-weight: 700 !important;
}

.woocommerce-MyAccount-content p:first-of-type a {
    color: var(--paideia-teal) !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   LEARNING DASHBOARD (PAIDEIA Edition)
   ========================================================================== */

.paideia-learning-dashboard .learndash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.paideia-learning-dashboard .stat-card {
    background: #F8F9FA;
    padding: 25px 15px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.paideia-learning-dashboard .stat-card:hover { transform: translateY(-5px); }

.paideia-learning-dashboard .stat-number {
    font-family: var(--paideia-font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--paideia-teal);
    display: block;
}

.paideia-learning-dashboard .stat-label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.paideia-learning-dashboard .courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.paideia-learning-dashboard .course-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.paideia-learning-dashboard .course-image {
    height: 160px;
    overflow: hidden;
}

.paideia-learning-dashboard .course-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.paideia-learning-dashboard .course-content {
    padding: 20px;
}

.paideia-learning-dashboard .course-content h4 {
    margin: 0 0 15px 0;
    font-size: 17px;
    color: var(--paideia-dark);
}

.paideia-learning-dashboard .progress-bar {
    width: 100%;
    height: 8px;
    background: #EEE;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.paideia-learning-dashboard .progress-fill {
    height: 100%;
    background: var(--paideia-teal);
    border-radius: 10px;
}

.paideia-learning-dashboard .progress-text {
    font-size: 12px;
    color: #999;
}