/**
 * © 2026 EUSPEL - ASOCIACIÓN SINDICAL DE LA POLICÍA VASCA
 * temarios.css - Hoja de Estilos Digital Luxury para el Portal de Temarios Oficiales
 */

:root {
    --euspel-burgundy: #830529;
    --euspel-burgundy-dark: #5c0019;
    --euspel-burgundy-light: #a31038;
    --euspel-burgundy-glow: rgba(131, 5, 41, 0.28);
    --euspel-gold: #c59b27;
    --euspel-gold-light: #e6b83b;
    --euspel-gold-glow: rgba(197, 155, 39, 0.35);
    --euspel-slate-dark: #0f172a;
    --euspel-slate-card: #1e293b;
    --euspel-text-main: #1e293b;
    --euspel-text-muted: #64748b;
    --euspel-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    --whatsapp-green: #25d366;
    --whatsapp-green-dark: #128c7e;
    --whatsapp-glow: rgba(37, 211, 102, 0.3);
    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --shadow-luxury: 0 20px 40px -15px rgba(15, 23, 42, 0.12), 0 0 1px 1px rgba(15, 23, 42, 0.05);
    --shadow-cover: 0 25px 50px -12px rgba(131, 5, 41, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--euspel-bg-gradient);
    color: var(--euspel-text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(131, 5, 41, 0.12);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.header-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
}

.brand-text-col {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--euspel-burgundy);
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.brand-tagline {
    font-size: 0.72rem;
    color: var(--euspel-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--euspel-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-link-back:hover {
    color: var(--euspel-burgundy);
    background: rgba(131, 5, 41, 0.05);
}

.lang-switch {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 3px;
    border: 1px solid #e2e8f0;
}

.lang-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--euspel-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-link.active {
    background: var(--euspel-burgundy);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(131, 5, 41, 0.2);
}

.lang-flag {
    width: 14px;
    height: 10px;
    object-fit: cover;
    border-radius: 2px;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 20px 60px;
    width: 100%;
}

/* Editorial Sello Badge */
.hero-sello-bar {
    text-align: center;
    margin-bottom: 30px;
}

.sello-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(131, 5, 41, 0.08) 0%, rgba(197, 155, 39, 0.12) 100%);
    border: 1px solid rgba(197, 155, 39, 0.35);
    color: var(--euspel-burgundy-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sello-pill i {
    color: var(--euspel-gold);
    font-size: 1rem;
}

/* Hero Grid */
.temario-hero-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-luxury);
    border: 1px solid rgba(131, 5, 41, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 380px 1fr;
    margin-bottom: 40px;
    position: relative;
}

/* Left Cover Showcase */
.temario-cover-pane {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.temario-cover-pane::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(131, 5, 41, 0.35) 0%, transparent 60%);
    pointer-events: none;
}

.cover-wrapper-3d {
    position: relative;
    max-width: 270px;
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-cover);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.cover-wrapper-3d:hover {
    transform: translateY(-6px) scale(1.02);
}

.cover-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.cover-badge-float {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    border: 1px solid rgba(197, 155, 39, 0.6);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cover-badge-float i {
    color: var(--euspel-gold);
}

.cover-sub-meta {
    margin-top: 20px;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.cover-sub-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cover-sub-meta i {
    color: var(--euspel-gold-light);
}

/* Right Content Pane */
.temario-info-pane {
    padding: 40px 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.promo-tag-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.promo-badge {
    background: rgba(131, 5, 41, 0.08);
    color: var(--euspel-burgundy);
    border: 1px solid rgba(131, 5, 41, 0.2);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-badge.free {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.promo-badge.verified {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.temario-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.85rem;
    color: var(--euspel-slate-dark);
    line-height: 1.25;
    margin-bottom: 14px;
}

.temario-summary {
    color: var(--euspel-text-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 24px;
}

/* Feature Bullets Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.feature-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
}

.feature-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(131, 5, 41, 0.08);
    color: var(--euspel-burgundy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.feature-box.gold .feature-icon-wrap {
    background: rgba(197, 155, 39, 0.15);
    color: var(--euspel-gold);
}

.feature-box.green .feature-icon-wrap {
    background: rgba(37, 211, 102, 0.15);
    color: #16a34a;
}

.feature-text-block {
    display: flex;
    flex-direction: column;
}

.feature-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--euspel-slate-dark);
}

.feature-desc {
    font-size: 0.76rem;
    color: var(--euspel-text-muted);
    line-height: 1.35;
}

/* Action Area */
.action-box {
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-download-primary {
    background: linear-gradient(135deg, var(--euspel-burgundy) 0%, var(--euspel-burgundy-dark) 100%);
    color: #ffffff;
    border: none;
    padding: 16px 28px;
    border-radius: var(--radius-lg);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px var(--euspel-burgundy-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    width: 100%;
}

.btn-download-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(131, 5, 41, 0.4);
    background: linear-gradient(135deg, var(--euspel-burgundy-light) 0%, var(--euspel-burgundy) 100%);
}

.btn-download-primary:active {
    transform: translateY(0);
}

.btn-download-primary.loading {
    pointer-events: none;
    opacity: 0.85;
}

.download-meta-note {
    font-size: 0.76rem;
    color: var(--euspel-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.download-stats-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--euspel-burgundy);
}

/* Secondary Section: WhatsApp Community & Support */
.community-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
}

.community-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 30px 32px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-luxury);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.community-card.whatsapp-card {
    border-left: 5px solid var(--whatsapp-green);
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.whatsapp-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--whatsapp-green);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -4px var(--whatsapp-glow);
}

.card-top-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--euspel-slate-dark);
    margin-bottom: 6px;
}

.card-top-content p {
    font-size: 0.88rem;
    color: var(--euspel-text-muted);
    line-height: 1.5;
}

.btn-whatsapp-join {
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-green-dark) 100%);
    color: #ffffff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 13px 22px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px -5px var(--whatsapp-glow);
    transition: all 0.25s ease;
}

.btn-whatsapp-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(37, 211, 102, 0.45);
}

/* Support Card */
.support-card {
    border-left: 5px solid var(--euspel-burgundy);
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.support-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--euspel-burgundy);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -4px var(--euspel-burgundy-glow);
}

.email-highlight-box {
    background: #ffffff;
    border: 1px dashed rgba(131, 5, 41, 0.3);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.email-address {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--euspel-burgundy);
    font-size: 0.92rem;
    text-decoration: none;
}

.email-address:hover {
    text-decoration: underline;
}

.btn-email-action {
    color: var(--euspel-burgundy);
    background: rgba(131, 5, 41, 0.08);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-email-action:hover {
    background: rgba(131, 5, 41, 0.15);
}

/* Post-Download Modal (Feedback de bienvenida y paso a WhatsApp) */
.success-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.success-modal-card {
    background: #ffffff;
    max-width: 500px;
    width: 100%;
    border-radius: var(--radius-xl);
    padding: 34px 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-modal-close:hover {
    background: #e2e8f0;
    color: var(--euspel-slate-dark);
}

.success-check-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px -5px rgba(34, 197, 94, 0.4);
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--euspel-slate-dark);
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--euspel-text-muted);
    margin-bottom: 22px;
    line-height: 1.5;
}

.modal-whatsapp-cta {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    text-align: left;
}

.cta-tag {
    font-size: 0.72rem;
    font-weight: 800;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.cta-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: #14532d;
    margin-bottom: 4px;
}

.cta-subtext {
    font-size: 0.8rem;
    color: #166534;
    line-height: 1.4;
    margin-bottom: 14px;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.82rem;
    margin-top: auto;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-legal-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-legal-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal-links a:hover {
    color: var(--euspel-gold-light);
}

/* Responsividad */
@media (max-width: 960px) {
    .temario-hero-card {
        grid-template-columns: 1fr;
    }

    .temario-cover-pane {
        padding: 30px 20px;
    }

    .cover-wrapper-3d {
        max-width: 210px;
    }

    .temario-info-pane {
        padding: 30px 24px;
    }

    .community-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .temario-title {
        font-size: 1.45rem;
    }

    .brand-name {
        font-size: 1rem;
    }

    .brand-tagline {
        display: none;
    }

    .nav-link-back span {
        display: none;
    }
}
