/* ==========================================================================
   COMPONENTS — piezas reutilizables (clase base + modificadores)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sección
   -------------------------------------------------------------------------- */

.section {
    padding: 7rem 0;
}

.section-tight {
    padding: 4rem 0;
}

.section-alt {
    background-color: var(--color-surface-alt);
}

.section-dark {
    background-color: var(--color-ink);
}

.section-inner {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 720px;
}

.section-header-center {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    align-items: center;
}

.section-title {
    max-width: 22ch;
}

.section-header-center .section-title {
    max-width: none;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-body);
}

.section-dark .section-title h2,
.section-dark h3 {
    color: var(--color-invert);
}

.section-dark .section-subtitle {
    color: var(--color-invert-soft);
}

.section-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-footer {
    display: flex;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Eyebrow (etiqueta sobre el título)
   -------------------------------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--color-brand-line);
    border-radius: 999px;
    background-color: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-size: 0.813rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.eyebrow-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-brand);
}

.section-dark .eyebrow {
    border-color: var(--color-invert-line);
    background-color: var(--color-glass-dark);
    color: var(--color-invert);
}

/* --------------------------------------------------------------------------
   Botones — la clase vive en el wrap, nunca en la etiqueta <a> o <button>
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
}

.btn > a,
.btn > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.813rem 1.375rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background-color: var(--color-surface-sunken);
    color: var(--color-ink);
    font-size: 0.938rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn > a:hover,
.btn > button:hover {
    transform: translateY(-1px);
}

.btn > a:active,
.btn > button:active {
    transform: translateY(0);
}

.btn-brand > a,
.btn-brand > button {
    background-color: var(--color-brand);
    color: var(--color-invert);
    box-shadow: 0 1px 2px var(--color-shadow-md), 0 8px 20px -10px var(--color-brand);
}

.btn-brand > a:hover,
.btn-brand > button:hover {
    background-color: var(--color-brand-strong);
    box-shadow: 0 2px 4px var(--color-shadow-md), 0 14px 26px -12px var(--color-brand);
}

.btn-outline > a,
.btn-outline > button {
    background-color: var(--color-surface);
    border-color: var(--color-border-strong);
    color: var(--color-ink);
}

.btn-outline > a:hover,
.btn-outline > button:hover {
    border-color: var(--color-ink);
}

.btn-ghost > a,
.btn-ghost > button {
    background-color: transparent;
    color: var(--color-ink);
}

.btn-ghost > a:hover,
.btn-ghost > button:hover {
    background-color: var(--color-surface-sunken);
}

.btn-invert > a,
.btn-invert > button {
    background-color: var(--color-invert);
    color: var(--color-ink);
}

.btn-invert > a:hover,
.btn-invert > button:hover {
    background-color: var(--color-surface-sunken);
}

.btn-invert-outline > a,
.btn-invert-outline > button {
    background-color: transparent;
    border-color: var(--color-invert-line);
    color: var(--color-invert);
}

.btn-invert-outline > a:hover,
.btn-invert-outline > button:hover {
    background-color: var(--color-glass-dark);
    border-color: var(--color-invert-soft);
}

.btn-lg > a,
.btn-lg > button {
    padding: 1rem 1.75rem;
    border-radius: 14px;
    font-size: 1rem;
}

.btn-sm > a,
.btn-sm > button {
    padding: 0.563rem 0.938rem;
    border-radius: 10px;
    font-size: 0.875rem;
}

.btn-block,
.btn-block > a,
.btn-block > button {
    width: 100%;
}

.btn-arrow > a::after,
.btn-arrow > button::after {
    content: "→";
    transition: transform 0.15s ease;
}

.btn-arrow > a:hover::after,
.btn-arrow > button:hover::after {
    transform: translateX(3px);
}

.btn-play > a::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid currentColor;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   Grillas
   -------------------------------------------------------------------------- */

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background-color: var(--color-surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    border-color: var(--color-border-strong);
    box-shadow: 0 1px 2px var(--color-shadow-sm), 0 18px 40px -24px var(--color-shadow-lg);
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.938rem;
}

.card-problem {
    background-color: var(--color-surface);
}

/* --------------------------------------------------------------------------
   Icono de tarjeta
   -------------------------------------------------------------------------- */

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: var(--color-brand-soft);
    color: var(--color-brand-strong);
    flex-shrink: 0;
}

.icon-box svg {
    width: 22px;
    height: 22px;
}

.icon-box-danger {
    background-color: var(--color-danger-soft);
    color: var(--color-danger);
}

.icon-box-accent {
    background-color: var(--color-accent-soft);
    color: var(--color-accent);
}

.icon-box-dark {
    background-color: var(--color-glass-dark);
    color: var(--color-invert);
}

.icon-box-whatsapp {
    background-color: var(--color-whatsapp);
    color: var(--color-invert);
}

/* --------------------------------------------------------------------------
   Badge / chip
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background-color: var(--color-surface-sunken);
    color: var(--color-body);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-brand {
    background-color: var(--color-brand);
    color: var(--color-invert);
}

.badge-soft {
    background-color: var(--color-brand-soft);
    color: var(--color-brand-strong);
}

.badge-accent {
    background-color: var(--color-accent-soft);
    color: #8a5a00;
}

/* --------------------------------------------------------------------------
   Lista de checks
   -------------------------------------------------------------------------- */

.check-list,
.check-list ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-list {
    font-size: 0.938rem;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.check-list li::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 0.188rem;
    border-radius: 50%;
    background-color: var(--color-brand-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f9268' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.check-list-muted li::before {
    background-color: var(--color-surface-sunken);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8b86' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.check-list-inline,
.check-list-inline ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.check-list-inline {
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Responsive — grillas
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .section {
        padding: 5rem 0;
    }

    .section-inner {
        gap: 2.5rem;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .section {
        padding: 4rem 0;
    }

    .section-tight {
        padding: 3rem 0;
    }

    .section-inner {
        gap: 2rem;
    }

    .section-header {
        gap: 0.75rem;
    }

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

    .grid {
        gap: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.375rem;
    }

    .btn-group {
        gap: 0.625rem;
    }
}
