/**
 * EduPlan Dashboard Styles
 * Diseño profesional con barra superior + menú horizontal con dropdowns
 */

/* ==========================================
   1. VARIABLES CSS
   ========================================== */

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #ff6b6b;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #333;
    --text-muted: #666;
    --glass-border: rgba(255, 255, 255, 0.18);
    --navbar-bg: #ffffff;
    --navbar-text: #444;
    --topbar-bg: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Modo Oscuro */
body.dark-mode {
    --primary: #a3b1ff;
    --secondary: #c084fc;
    --bg-gradient: linear-gradient(135deg, #1a1c2c 0%, #4a192c 100%);
    --card-bg: rgba(30, 32, 44, 0.95);
    --text-main: #f8f9fa;
    --text-muted: #cbd5e0;
    --glass-border: rgba(255, 255, 255, 0.05);
    --navbar-bg: #1e2030;
    --navbar-text: #e0e0e0;
    --topbar-bg: linear-gradient(90deg, #2d3161 0%, #4a1942 100%);
}

/* ==========================================
   2. RESET Y BASE
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-gradient);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   3. CONTENEDOR PRINCIPAL
   ========================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================
   4. BARRA SUPERIOR (TOP BAR)
   ========================================== */

.ep-topbar {
    background: var(--topbar-bg);
    color: #fff;
    font-size: 0.82rem;
    padding: 6px 0;
}

.ep-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ep-topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ep-topbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ep-topbar-item svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.ep-topbar-item a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ep-topbar-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.ep-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ep-topbar .theme-toggle {
    cursor: pointer;
    font-size: 1.1rem;
    background: none;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.ep-topbar .theme-toggle:hover {
    background: rgba(255,255,255,0.15);
}

/* ==========================================
   5. BARRA DE NAVEGACIÓN PRINCIPAL
   ========================================== */

.ep-navbar {
    background: var(--navbar-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.admin-bar .ep-navbar {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .ep-navbar {
        top: 46px;
    }
}

.ep-navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

/* ---------- Logo ---------- */

.ep-navbar-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
}

.ep-navbar-logo .ep-logo-icon {
    font-size: 1.6rem;
}

.ep-navbar-logo .ep-logo-text {
    font-style: italic;
    line-height: 1.2;
}

.ep-navbar-logo .custom-logo {
    max-height: 50px;
    width: auto;
}

/* ---------- Menú horizontal ---------- */

.ep-navbar-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ep-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.ep-menu > li {
    position: relative;
}

.ep-menu > li > a {
    display: block;
    padding: 20px 16px;
    color: var(--navbar-text);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.ep-menu > li > a:hover,
.ep-menu > li.current-menu-item > a,
.ep-menu > li.current_page_item > a {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.06);
}

/* ---------- Flecha dropdown ---------- */

.ep-menu > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s;
}

/* ---------- Submenú dropdown ---------- */

.ep-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--navbar-bg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    z-index: 999;
}

.ep-menu > li:hover > .sub-menu,
.ep-menu > li.ep-sub-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ep-menu .sub-menu li a {
    display: block;
    padding: 10px 18px;
    color: var(--navbar-text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.ep-menu .sub-menu li a:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
}

/* ---------- Búsqueda ---------- */

.ep-search-toggle {
    position: relative;
    margin-left: 10px;
}

.ep-search-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--navbar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ep-search-toggle button:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
}

.ep-search-box {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--navbar-bg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    z-index: 999;
    min-width: 260px;
}

.ep-search-box.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ep-search-box input[type="search"],
.ep-search-box input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    background: var(--navbar-bg);
    color: var(--text-main);
    transition: border-color 0.2s;
}

.ep-search-box input:focus {
    border-color: var(--primary);
}

.ep-search-box .search-submit {
    display: none;
}

/* ---------- Hamburguesa ---------- */

.ep-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.ep-hamburger:hover {
    background: rgba(102, 126, 234, 0.08);
}

.ep-hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--navbar-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.ep-hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.ep-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.ep-hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ==========================================
   5b. HERO / BIENVENIDA (front-page)
   ========================================== */

.ep-hero {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    text-align: center;
}

.subtitle-platform {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.subtitle-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

#userGreeting {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

/* ==========================================
   6. BANNER ASISTENTE IA (ROJO-NARANJA)
   ========================================== */

.ai-assistant {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.ai-assistant h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.ai-assistant p {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 5px;
}

.ai-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 30px;
    border: 2px solid white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.ai-btn:hover {
    background: white;
    color: #ff6b6b;
}

/* ==========================================
   7. GRID DE HERRAMIENTAS (CARDS)
   ========================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.fav-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #ddd;
    user-select: none;
    transition: all 0.3s ease;
}

.fav-icon.active {
    color: #ff6b6b;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.card-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: center;
}

.card-description {
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95rem;
    flex-grow: 1;
}

.card-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    width: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ==========================================
   8. MODAL DEL ASISTENTE IA
   ========================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    margin: 2% auto;
    padding: 30px;
    border-radius: 20px;
    width: 95%;
    max-width: 800px;
    position: relative;
    color: var(--text-main);
}

.modal-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--text-main);
}

textarea,
#aiPrompt {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #eee;
    font-family: inherit;
    margin-top: 10px;
    background: white;
    color: #333;
    min-height: 120px;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

textarea:focus,
#aiPrompt:focus {
    border-color: var(--primary);
}

body.dark-mode textarea,
body.dark-mode #aiPrompt {
    background: rgba(20, 22, 34, 0.8);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.1);
}

#aiResult {
    margin-top: 25px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border-left: 5px solid var(--primary);
    display: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.7;
}

/* ==========================================
   9. RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .ep-topbar-left {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .ep-hamburger {
        display: flex;
    }

    .ep-navbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 10px 0;
        z-index: 999;
    }

    .ep-navbar-nav.open {
        display: flex;
    }

    .ep-navbar-inner {
        position: relative;
    }

    .ep-menu {
        flex-direction: column;
        width: 100%;
    }

    .ep-menu > li > a {
        padding: 14px 20px;
    }

    .ep-menu .sub-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        border-radius: 0;
        padding: 0;
        background: rgba(102, 126, 234, 0.04);
        transition: max-height 0.3s, visibility 0.3s, padding 0.3s;
    }

    .ep-menu > li.ep-sub-open > .sub-menu {
        visibility: visible;
        max-height: 500px;
        padding: 6px 0;
    }

    .ep-menu .sub-menu li a {
        padding-left: 36px;
    }

    .ep-search-toggle {
        margin: 10px 20px;
        width: 100%;
    }

    .ep-search-box {
        position: static;
        margin-top: 6px;
        box-shadow: none;
        padding: 0;
    }

    .ep-search-box.open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ai-assistant {
        padding: 22px 18px;
    }

    .ep-hero {
        padding: 25px 18px;
    }

    .modal-content {
        margin: 3% auto;
        padding: 22px 16px;
        width: 96%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .subtitle-platform {
        font-size: 1rem;
    }

    .subtitle-desc {
        font-size: 0.88rem;
    }

    .ep-navbar-logo .ep-logo-text {
        font-size: 1rem;
    }
}

/* ==========================================
   10. SCROLLBAR Y COMPATIBILIDAD WP
   ========================================== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

body.admin-bar .modal {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .modal {
        top: 46px;
    }
}

/* ==========================================
   11. FOOTER DONACIÓN
   ========================================== */

.ep-site-footer {
    text-align: center;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 22px 28px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* Tamano, peso, cursiva y color se controlan desde
   Personalizar -> Donacion: tipografia (CSS inline en el <head>). */
.ep-site-footer p {
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
}

.footer-nav {
    margin-bottom: 15px;
}

.footer-nav .footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav .footer-menu li {
    margin: 0;
    padding: 0;
}

.footer-nav .footer-menu li a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.footer-nav .footer-menu li a:hover {
    text-decoration: underline;
}

.ep-site-footer .ep-donate-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

.ep-site-footer .ep-donate-link:hover {
    background: rgba(102, 126, 234, 0.12);
    transform: translateY(-2px);
}



/* ==========================================
   12. MODAL QR DONACIÓN
   ========================================== */

.ep-qr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}

.ep-qr-overlay.open { display: flex; }

.ep-qr-overlay .ep-qr-bg {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ep-qr-overlay .ep-qr-modal {
    background: var(--card-bg, #fff);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 32px 24px;
}

.ep-qr-modal .ep-qr-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ep-qr-modal .ep-qr-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.ep-qr-modal .ep-qr-emoji {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.ep-qr-modal h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main, #1f2937);
    margin-bottom: 6px;
}

.ep-qr-modal .ep-qr-sub {
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
    margin-bottom: 20px;
}

.ep-qr-modal .ep-qr-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main, #1f2937);
    margin-bottom: 12px;
    letter-spacing: 0.2px;
}

.ep-site-footer .ep-donate-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 6px;
}

.ep-qr-modal .ep-qr-img {
    width: 220px;
    height: auto;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.08);
    margin: 0 auto 16px;
    display: block;
}

.ep-qr-modal .ep-qr-thanks {
    font-size: 0.82rem;
    color: #9ca3af;
    font-style: italic;
}

/* ==========================================
   13. PÁGINAS ESTÁTICAS Y HERRAMIENTAS
   ========================================== */

/* Marco estándar para páginas normales (NO usa .card a propósito) */
.ep-page {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    color: var(--text-main);
    min-height: 300px;
}

.ep-page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.ep-page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin: 0;
}

.ep-page-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-main);
}

/* Tipografia editorial: SOLO en paginas con marco.
   En modo sin marco el plugin manda y el tema no interviene. */
.ep-page:not(.ep-page--bare) .ep-page-content h2 { font-size: 1.4rem; margin: 28px 0 12px; color: var(--text-main); }
.ep-page:not(.ep-page--bare) .ep-page-content h3 { font-size: 1.15rem; margin: 22px 0 10px; color: var(--text-main); }
.ep-page:not(.ep-page--bare) .ep-page-content p  { margin-bottom: 16px; }
.ep-page:not(.ep-page--bare) .ep-page-content ul,
.ep-page:not(.ep-page--bare) .ep-page-content ol { margin: 0 0 16px 22px; }
.ep-page:not(.ep-page--bare) .ep-page-content li { margin-bottom: 6px; }
.ep-page:not(.ep-page--bare) .ep-page-content a  { color: var(--primary); font-weight: 600; }
.ep-page:not(.ep-page--bare) .ep-page-content a:hover { text-decoration: underline; }
.ep-page:not(.ep-page--bare) .ep-page-content img { max-width: 100%; height: auto; border-radius: 12px; }
.ep-page:not(.ep-page--bare) .ep-page-content table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.ep-page:not(.ep-page--bare) .ep-page-content th,
.ep-page:not(.ep-page--bare) .ep-page-content td { border: 1px solid var(--glass-border); padding: 8px 10px; text-align: left; }

/* La imagen si conviene limitarla siempre, para que nada desborde */
.ep-page--bare .ep-page-content > img,
.ep-tool-wrap > img { max-width: 100%; height: auto; }

.ep-page-links { margin-top: 20px; font-size: 0.9rem; color: var(--text-muted); }

/* Modo "sin marco": el plugin dibuja su propia interfaz */
.ep-page--bare,
.ep-tool-wrap {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0;
    min-height: 0;
}

.ep-page--bare .ep-page-content,
.ep-tool-wrap {
    font-size: inherit;
    line-height: inherit;
}

/* ------------------------------------------
   Contraste en modo "sin marco"
   SOLO afecta a los hijos DIRECTOS del contenedor, es decir el texto
   que escribes en el editor de WordPress y que queda sobre el degradado.
   Nunca entra en los <div> que renderiza un plugin, así que sus paneles
   blancos conservan su propio color de texto.
   ------------------------------------------ */

.ep-page--bare .ep-page-content > h1,
.ep-page--bare .ep-page-content > h2,
.ep-page--bare .ep-page-content > h3,
.ep-page--bare .ep-page-content > h4,
.ep-page--bare .ep-page-content > h5,
.ep-page--bare .ep-page-content > h6,
.ep-page--bare .ep-page-content > p,
.ep-page--bare .ep-page-content > ul,
.ep-page--bare .ep-page-content > ol,
.ep-page--bare .ep-page-content > ul li,
.ep-page--bare .ep-page-content > ol li,
.ep-page--bare .ep-page-content > blockquote,
.ep-tool-wrap > h1,
.ep-tool-wrap > h2,
.ep-tool-wrap > h3,
.ep-tool-wrap > h4,
.ep-tool-wrap > h5,
.ep-tool-wrap > h6,
.ep-tool-wrap > p,
.ep-tool-wrap > ul,
.ep-tool-wrap > ol,
.ep-tool-wrap > ul li,
.ep-tool-wrap > ol li,
.ep-tool-wrap > blockquote {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.ep-page--bare .ep-page-content > p a,
.ep-page--bare .ep-page-content > ul a,
.ep-page--bare .ep-page-content > ol a,
.ep-tool-wrap > p a,
.ep-tool-wrap > ul a,
.ep-tool-wrap > ol a {
    color: #ffe9a8;
    text-decoration: underline;
}

.ep-page--bare .ep-page-content > p a:hover,
.ep-tool-wrap > p a:hover {
    color: #ffffff;
}

/* Escape manual: si un bloque propio queda ilegible, añádele .ep-on-light */
.ep-page--bare .ep-on-light,
.ep-page--bare .ep-on-light *,
.ep-tool-wrap .ep-on-light,
.ep-tool-wrap .ep-on-light * {
    color: var(--text-main) !important;
    text-shadow: none !important;
}

/* Refuerzo: ningún contenedor del tema debe dibujar borde alrededor del plugin */
.ep-tool-wrap > *,
.ep-page--bare > .ep-page-content > * {
    border-color: inherit;
}

@media (max-width: 768px) {
    .ep-page { padding: 24px 18px; border-radius: 16px; }
    .ep-page-title { font-size: 1.4rem; }
}

/* ==========================================
   14. INICIO: CABECERA COMPACTA Y BLOQUE DEL EJEMPLO
   ========================================== */

/* --- Cabecera compacta -------------------------------------------- */
.ep-hero.ep-hero-c {
    padding: 26px 32px;
    text-align: center;
}

/* Tamano, peso, cursiva y color se controlan desde
   Personalizar -> Inicio: tipografia (CSS inline en el <head>). */
.ep-hero-c .h-plat {
    color: var(--text-main);
    margin: 0 0 6px;
    line-height: 1.3;
}

.ep-hero-c .h-desc {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.ep-hero-c .h-saludo {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
    color: var(--primary);
    line-height: 1.3;
}

.ep-hero-c .h-saludo span {
    display: block;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.45;
}

/* --- Bloque de la unidad de ejemplo ------------------------------- */
.ep-ejemplo {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(255, 107, 107, 0.28);
    padding: 28px 32px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.ep-ejemplo-txt { flex: 1 1 340px; min-width: 0; }

.ep-ejemplo .ep-ejemplo-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.92;
    margin: 0 0 9px;
}

.ep-ejemplo h3 {
    font-size: 1.42rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 9px;
    line-height: 1.25;
}

.ep-ejemplo p {
    margin: 0 0 15px;
    color: rgba(255, 255, 255, 0.93);
    font-size: 0.97rem;
    line-height: 1.55;
}

.ep-ejemplo-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.ep-ejemplo-chips span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #7C2D12;
    background: #fff;
    border-radius: 999px;
    padding: 5px 13px;
}

.ep-ejemplo-btn {
    flex: 0 0 auto;
    display: inline-block;
    background: #fff;
    color: #C2410C !important;
    font-weight: 700;
    font-size: 1.02rem;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
}

.ep-ejemplo-btn:hover { background: #FFF7ED; transform: translateY(-2px); }
.ep-ejemplo-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* --- Asistente IA en estilo vidrio -------------------------------- */
.ai-assistant.vidrio {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.ai-assistant.vidrio h3,
.ai-assistant.vidrio p { color: #fff; }

body.dark-mode .ai-assistant.vidrio {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 700px) {
    .ep-hero.ep-hero-c { padding: 22px 20px; }
    .ep-ejemplo { padding: 24px 22px; gap: 20px; }
    .ep-ejemplo-btn { width: 100%; text-align: center; }
}
