/* Fonsancarlos Formatos - Estilos base */

:root {
    --fc-green: #008100;
    --fc-green-dark: #006600;
    --fc-green-soft: rgba(0, 129, 0, 0.08);
    --fc-green-softer: rgba(0, 129, 0, 0.05);
    --fc-text: #222222;
    --fc-muted: #626262;
    --fc-bg-card: #f7f7f7;
    --fc-border: rgba(0, 0, 0, 0.04);
    --fc-font-head: 'Poppins', sans-serif;
    --fc-font-body: 'DM Sans', sans-serif;
}

.fc-formato-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.fc-btn-back {
    display: inline-block;
    color: var(--fc-green);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    margin-bottom: 12px;
    padding: 6px 0;
    transition: color 0.2s;
}

.fc-btn-back:hover {
    color: var(--fc-green-dark);
    text-decoration: underline;
}

.fc-formato-title {
    margin-bottom: 24px;
    font-size: 1.5em;
    border-bottom: 2px solid var(--fc-green);
    padding-bottom: 10px;
    color: var(--fc-green);
}

/* Fieldsets */
.fc-fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fafafa;
}

.fc-fieldset legend {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--fc-green);
    padding: 0 8px;
}

/* Campos */
.fc-field {
    margin-bottom: 16px;
}

.fc-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.95em;
}

.fc-field input[type="text"],
.fc-field input[type="email"],
.fc-field input[type="number"],
.fc-field input[type="date"],
.fc-field select,
.fc-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.fc-field input:focus,
.fc-field select:focus,
.fc-field textarea:focus {
    border-color: var(--fc-green);
    outline: none;
    box-shadow: 0 0 0 2px var(--fc-green-soft);
}

/* Checkbox y radio */
.fc-field input[type="checkbox"],
.fc-field input[type="radio"] {
    margin-right: 8px;
    width: auto;
    flex-shrink: 0;
}

.fc-field-checkbox label,
.fc-field label:has(input[type="checkbox"]),
.fc-field label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    font-weight: 400;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Row layout */
.fc-row {
    display: flex;
    gap: 16px;
}

.fc-field-half {
    flex: 1;
}

/* Required marker */
.fc-required {
    color: #d32f2f;
}

/* Info box */
.fc-info-box {
    background: var(--fc-green-softer);
    border-left: 4px solid var(--fc-green);
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

/* Submit */
.fc-formato-submit {
    margin-top: 24px;
    text-align: center;
}

.fc-btn-download {
    background: var(--fc-green);
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.fc-btn-download:hover {
    background: var(--fc-green-dark);
}

.fc-btn-download:disabled {
    background: #999;
    cursor: not-allowed;
}

.fc-spinner {
    display: inline-block;
    margin-left: 12px;
    color: #666;
    font-style: italic;
}

/* =========================
   Listing principal /formatos/
   ========================= */

/* Oculta el titulo de la pagina en el tema cuando se renderiza el listing o un formato individual */
body:has(.fc-formatos-listing) .entry-title,
body:has(.fc-formatos-listing) .page-header,
body:has(.fc-formatos-listing) header.page-header,
body:has(.fc-formatos-listing) .elementor-page-title,
body:has(.fc-formatos-listing) .page-title,
body:has(.fc-formato-wrapper) .entry-title,
body:has(.fc-formato-wrapper) .page-header,
body:has(.fc-formato-wrapper) header.page-header,
body:has(.fc-formato-wrapper) .elementor-page-title,
body:has(.fc-formato-wrapper) .page-title {
    display: none !important;
}

.fc-formatos-listing {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.fc-formatos-eyebrow {
    font-family: var(--fc-font-head);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--fc-green);
    margin: 0 0 12px;
}

.fc-formatos-title {
    font-family: var(--fc-font-head);
    font-weight: 600;
    font-size: 36px;
    color: var(--fc-text);
    line-height: 1.2;
    margin: 0 0 16px;
    border: none;
    padding: 0;
}

.fc-formatos-intro {
    font-family: var(--fc-font-body);
    font-size: 16px;
    color: var(--fc-muted);
    max-width: 650px;
    line-height: 1.7;
    margin: 0 0 48px;
}

.fc-formatos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.fc-formato-card {
    background: var(--fc-bg-card);
    border: 1px solid var(--fc-border);
    border-radius: 16px;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fc-formato-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.fc-formato-card--pending {
    opacity: 0.75;
}

.fc-formato-card--pending:hover {
    transform: none;
    box-shadow: none;
}

.fc-formato-card-icon {
    width: 52px;
    height: 52px;
    background: var(--fc-green-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.fc-formato-card-icon svg {
    width: 26px;
    height: 26px;
}

.fc-formato-card-title {
    font-family: var(--fc-font-body);
    font-weight: 700;
    font-size: 18px;
    color: var(--fc-text);
    margin: 0 0 8px;
}

.fc-formato-card-desc {
    font-family: var(--fc-font-body);
    font-size: 14px;
    color: var(--fc-muted);
    line-height: 1.5;
    margin: 0 0 24px;
    flex: 1;
}

.fc-btn-fill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--fc-green);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: var(--fc-font-body);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    width: fit-content;
    transition: background 0.2s;
}

.fc-btn-fill:hover {
    background: var(--fc-green-dark);
    color: #fff;
}

.fc-btn-fill-icon {
    display: inline-flex;
    align-items: center;
}

.fc-btn-fill-icon svg {
    width: 18px;
    height: 18px;
}

.fc-formato-badge-pending {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #fff;
    color: var(--fc-muted);
    border: 1px dashed rgba(0, 0, 0, 0.15);
    border-radius: 100px;
    font-family: var(--fc-font-body);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: fit-content;
}

.fc-formatos-cta-note {
    margin-top: 48px;
    padding: 20px 24px;
    background: var(--fc-green-softer);
    border-left: 4px solid var(--fc-green);
    border-radius: 12px;
    font-family: var(--fc-font-body);
    font-size: 14px;
    color: #515151;
    line-height: 1.6;
}

.fc-formatos-cta-note strong {
    color: var(--fc-text);
}

/* Coming soon (legacy) */
.fc-coming-soon {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
}

/* Conditional sections animation */
.fc-conditional-section {
    transition: opacity 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .fc-formatos-listing {
        padding: 32px 20px 48px;
    }

    .fc-formatos-title {
        font-size: 28px;
    }

    .fc-formatos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fc-formato-card {
        padding: 28px 24px;
    }
}

@media (max-width: 600px) {
    .fc-row {
        flex-direction: column;
        gap: 0;
    }
}
