/* ============================================
 *  COMPONENTS.CSS - Componentes reutilizables
 *  ============================================ */

/* Navigation */
.navbar {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(249,249,247,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 16px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-logo-img path[style*="stroke:#000000"] {
    stroke: var(--text) !important;
}

.nav-logo-img path[style*="fill:#000000"] {
    fill: var(--text) !important;
}

.logo {
    font-family: var(--display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
}

.logo em {
    font-style: italic;
    color: var(--green);
}

.beta-pill {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--green-pale);
    color: var(--green-dim);
    border: 1px solid rgba(61,153,112,0.25);
    border-radius: 20px;
    padding: 2px 7px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--text);
    text-decoration: none;
}

/* Hero Section */
.hero {
    padding: 56px 0 48px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -80px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(61,153,112,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--green);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--green);
}

.hero h1 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(30px, 5.5vw, 54px);
    line-height: 1.10;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 18px;
    max-width: 580px;
}

.hero h1 em {
    font-style: italic;
    color: var(--green);
}

.hero-sub {
    font-size: 15px;
    color: var(--text-soft);
    max-width: 480px;
    line-height: 1.75;
    margin-bottom: 28px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tag {
    font-family: var(--mono);
    font-size: 11px;
    padding: 5px 11px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    letter-spacing: 0.04em;
    box-shadow: var(--shadow-sm);
}

.hero-tag.accent {
    background: var(--green-pale);
    border-color: rgba(61,153,112,0.3);
    color: var(--green-dim);
}

/* Beta Banner */
.beta-banner {
    background: linear-gradient(135deg, var(--green-pale) 0%, #f0faf5 100%);
    border: 1px solid rgba(61,153,112,0.20);
    border-radius: var(--radius);
    padding: 12px 18px;
    margin: 0 0 32px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.beta-banner-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.beta-banner-text {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.55;
}

.beta-banner-text strong {
    color: var(--green-dim);
    font-weight: 600;
}

/* ADS */
.ad-slot {
    background: var(--bg2);
    border: 1px dashed var(--border-mid);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    overflow: hidden;
}

.ad-slot--banner {
    min-height: 90px;
    margin: 24px 0;
}

.ad-slot--rect {
    min-height: 250px;
    min-width: 300px;
}

/* Sections */
#generador {
padding: 40px 0 48px;
}

.section-heading {
    font-family: var(--display);
    font-weight: 600;
    font-size: 24px;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.section-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

/* Form Card */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

label {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--text-muted);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-weight: 500;
}

select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    padding: 10px 36px 10px 12px;
    width: 100%;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-mist);
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    font-size: 11px;
    pointer-events: none;
}

/* Range Sliders */
.range-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

input[type="range"] {
    flex: 1;
    height: 3px;
    background: var(--bg3);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--green);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 0 0 1px var(--green), var(--shadow-sm);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green);
    border: 3px solid white;
    box-shadow: 0 0 0 1px var(--green);
    cursor: pointer;
}

.range-val {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--green);
    min-width: 58px;
    text-align: right;
    font-weight: 500;
}

/* Chips (radio buttons) */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-group input[type="radio"] {
    display: none;
}

.chip-group label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    background: var(--bg);
    transition: all 0.12s;
    user-select: none;
    font-weight: 500;
}

.chip-group input[type="radio"]:checked + label {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-pale);
}

/* Button */
.btn-row {
    margin-top: 24px;
}

.btn-generate {
    width: 100%;
    padding: 15px 24px;
    background: var(--green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(61,153,112,0.30);
}

.btn-generate:hover {
    background: var(--green-dim);
    box-shadow: 0 4px 16px rgba(61,153,112,0.35);
}

.btn-generate:active {
    transform: scale(0.99);
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Excluded Bar */
.excluidos-bar {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--green-pale);
    border: 1px solid rgba(61,153,112,0.20);
    border-radius: var(--radius-sm);
}

.excluidos-bar.visible {
    display: flex;
}

.excluidos-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-right: 4px;
    flex-shrink: 0;
}

.excluido-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 1px solid rgba(61,153,112,0.25);
    border-radius: 20px;
    padding: 2px 10px;
    color: var(--green-dim);
    font-family: var(--mono);
    font-size: 10px;
}

.excluido-chip button {
    background: none;
    border: none;
    color: var(--green-dim);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
}

.excluido-chip button:hover {
    opacity: 1;
}

/* Loader */
#loader {
display: none;
text-align: center;
padding: 48px 0;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#loader p {
font-family: var(--mono);
font-size: 12px;
color: var(--text-muted);
letter-spacing: 0.06em;
}

/* Error Box */
.error-box {
    background: rgba(228,86,73,0.06);
    border: 1px solid rgba(228,86,73,0.20);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--syntax-red);
    margin-top: 14px;
    display: none;
}

/* Results */
#resultado {
display: none;
padding: 48px 0;
border-top: 1px solid var(--border);
}

.result-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.result-template {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--green);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Day Cards */
.dia-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}

.dia-card:hover {
    box-shadow: var(--shadow);
}

.dia-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s, background 0.15s;
    gap: 12px;
}

.dia-header:hover {
    background: var(--bg);
}

.dia-header[aria-expanded="true"] {
    border-bottom-color: var(--border);
    background: var(--bg);
}

.dia-num {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--green);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    flex-shrink: 0;
    font-weight: 500;
    background: var(--green-pale);
    border-radius: 20px;
    padding: 3px 9px;
}

.dia-grupos {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    flex: 1;
    color: var(--text);
}

.dia-tiempo {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dia-chevron {
    color: var(--text-dim);
    font-size: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.dia-header[aria-expanded="true"] .dia-chevron {
    transform: rotate(180deg);
}

.dia-body {
    display: none;
}

.dia-body.open {
    display: block;
}

/* Exercise Table */
.ej-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ej-table th {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 500;
    text-align: left;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.ej-table td {
    padding: 10px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--bg2);
    color: var(--text);
}

.ej-table tr:last-child td {
    border-bottom: none;
}

.ej-table tr:hover td {
    background: var(--bg);
}

.ej-name {
    font-weight: 500;
    line-height: 1.3;
}

.ej-grupo {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.02em;
}

/* Tags */
.tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 500;
}

.tag-cp {
    background: rgba(61,153,112,0.10);
    border: 1px solid rgba(61,153,112,0.25);
    color: var(--green-dim);
}

.tag-cs {
    background: rgba(64,120,242,0.08);
    border: 1px solid rgba(64,120,242,0.18);
    color: var(--syntax-blue);
}

.tag-nuevo {
    background: rgba(209,154,102,0.10);
    border: 1px solid rgba(209,154,102,0.25);
    color: var(--syntax-orange);
}

/* Supersets */
.ss-block td {
    background: rgba(61,153,112,0.035) !important;
}

.ss-block:hover td {
    background: rgba(61,153,112,0.065) !important;
}

.ss-label-row td {
    padding: 8px 16px 4px !important;
    border-bottom: none !important;
}

.ss-label-text {
    font-family: var(--mono);
    font-size: 9.5px;
    color: var(--green-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ss-label-text::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--green);
    border-radius: 2px;
    opacity: 0.7;
}

.ss-row-a td:first-child {
    border-left: 3px solid var(--green);
}

.ss-row-b td:first-child {
    border-left: 3px solid var(--green);
    border-top: 1px dashed var(--border) !important;
}

.ss-row-a td {
    border-bottom: none !important;
}

/* Suplir Button */
.td-action {
    width: 80px;
    text-align: right;
}

.btn-suplir {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.04em;
    padding: 4px 9px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-suplir:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-pale);
}

.btn-suplir:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.row-supliendo td {
    opacity: 0.30;
}

/* Info Section */
#como-funciona {
padding: 48px 0;
border-top: 1px solid var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.info-card {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s, transform 0.15s;
}

.info-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.info-icon {
    font-size: 22px;
    margin-bottom: 12px;
}

.info-title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.info-text {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.65;
}

.info-term {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--green);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 16px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copy {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.footer-links {
    display: flex;
    gap: 18px;
    list-style: none;
}

.footer-links a {
    font-size: 12px;
    color: var(--text-dim);
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--text-soft);
}
/* ============================================
 * BLOG SPECIFIC STYLES - Adaptados de propuesta
 * ============================================ */

.text-center { text-align: center; }
.margin-top-lg { margin-top: 32px; }

/* Blog Hero */
.blog-hero {
    padding: 80px 0 64px;
    background: var(--surface); /* Fondo blanco según diseño */
}

.blog-hero-title {
    font-family: var(--display);
    font-weight: 400; /* Más ligero según diseño */
    font-size: clamp(32px, 6vw, 58px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 24px;
}

.blog-hero-title em {
    font-style: italic;
    color: var(--text-muted); /* Gris en diseño, no verde */
}

.blog-hero-sub {
    font-size: 16px;
    color: var(--text-soft);
    line-height: 1.75;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Botones Blog */
.btn-blog-primary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--text); /* Botón oscuro */
    color: var(--surface);
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-weight: 500;
    font-size: 14px;
    transition: background 0.15s;
}

.btn-blog-primary:hover {
    background: #000;
    text-decoration: none;
    color: white;
}

.btn-blog-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg2);
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-blog-secondary:hover {
    background: var(--bg3);
    color: var(--text);
}

/* Grids */
.blog-section {
    padding: 56px 0;
}

.blog-section-header {
    margin-bottom: 40px;
}

.bg-surface-dim {
    background: #fcfcfb; /* Un tono casi blanco muy sutil */
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.blog-grid-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.blog-grid-standard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Post Cards Generales */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.post-image-wrap {
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

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

.post-card:hover .post-image {
    transform: scale(1.03);
}

.post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.post-title {
    font-family: var(--sans);
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 8px;
}

.post-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
}

.post-link-arrow {
    margin-left: auto;
    font-size: 16px;
    color: var(--text-muted);
    transition: color 0.15s, transform 0.15s;
}

.post-link-arrow:hover {
    color: var(--text);
    text-decoration: none;
    transform: translateX(2px);
}

/* Variaciones de Card */
.post-card.featured .post-title {
    font-size: 18px;
    letter-spacing: -0.01em;
}

.post-card.featured .post-excerpt {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-card.standard .post-title {
    font-size: 14px;
    margin-bottom: 0; /* En diseño estándar no hay extracto */
}

/* Newsletter Section */
.newsletter-section {
    padding: 64px 0;
}

.newsletter-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.newsletter-icon {
    font-size: 32px;
    background: var(--surface);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.newsletter-content {
    flex: 1;
}

.newsletter-title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.newsletter-text {
    font-size: 13px;
    color: var(--text-soft);
}

.newsletter-form {
    display: flex;
    gap: 12px;
}

.newsletter-input {
    padding: 12px 16px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 14px;
    width: 240px;
    background: var(--surface);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--text-muted);
}

.btn-newsletter {
    padding: 12px 20px;
    background: var(--text);
    color: var(--surface);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}
