/* ============================================================
   Afterflow – Newsletter & Footer Widget  v1.0
   afl.css — Base styles. Elementor selector overrides on top.
============================================================ */

/* ── Wrapper ──────────────────────────────────────────────── */
.afl-wrap {
    background-color: #3d8b8b;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

/* ── Texture overlay ──────────────────────────────────────── */
.afl-wrap.afl-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* ── Radial glow ──────────────────────────────────────────── */
.afl-wrap.afl-glow::after {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 120%;
    background: radial-gradient( ellipse at center, rgba(255,255,255,0.07) 0%, transparent 70% );
    pointer-events: none;
    z-index: 0;
}

/* ── Newsletter section ───────────────────────────────────── */
.afl-newsletter {
    position: relative;
    z-index: 1;
    padding: 100px 40px 100px;
    text-align: center;
}

.afl-newsletter-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* ── Headline ─────────────────────────────────────────────── */
.afl-headline {
    font-size: 58px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}

.afl-headline-italic {
    font-style: italic;
    color: #f5a898;
    font-weight: 400;
}

/* ── Subheadline ──────────────────────────────────────────── */
.afl-sub {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 36px;
    line-height: 1.6;
    max-width: 480px;
}

/* ── Form row ─────────────────────────────────────────────── */
.afl-form-row {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.afl-form-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* ── Inputs ───────────────────────────────────────────────── */
.afl-input {
    flex: 1;
    min-width: 0;
    height: 52px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    padding: 0 22px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.afl-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.afl-input:focus {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.18);
}

/* ── Button ───────────────────────────────────────────────── */
.afl-btn {
    flex-shrink: 0;
    height: 52px;
    padding: 0 32px;
    background-color: #f5a898;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 16px rgba(245, 168, 152, 0.35);
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.afl-btn:hover {
    background-color: #e8927e;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 168, 152, 0.45);
}

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

.afl-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

/* ── Message (success / error) ────────────────────────────── */
.afl-msg {
    font-size: 14px;
    min-height: 20px;
    padding: 4px 0;
    border-radius: 6px;
    transition: opacity 0.3s;
    text-align: center;
    width: 100%;
}

.afl-msg.afl-success {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.afl-msg.afl-error {
    color: #ffd0c8;
    font-weight: 400;
}

/* ── Privacy note ─────────────────────────────────────────── */
.afl-privacy {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin: 10px 0 0;
    text-align: center;
}

/* ── Divider line ─────────────────────────────────────────── */
.afl-divider-line {
    position: relative;
    z-index: 1;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
}

/* ── Footer ───────────────────────────────────────────────── */
.afl-footer-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 22px 40px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    box-sizing: border-box;
}

/* ── Brand / Logo ─────────────────────────────────────────── */
.afl-brand {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.afl-brand-bold {
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.04em;
}

.afl-brand-italic {
    font-style: italic;
    font-weight: 400;
}

/* ── Copyright ────────────────────────────────────────────── */
.afl-copyright {
    text-align: center;
    flex: 1;
    min-width: 160px;
    color: rgba(255, 255, 255, 0.55);
}

/* ── Footer links ─────────────────────────────────────────── */
.afl-footer-links {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.afl-footer-link {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.afl-footer-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* Tablet ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .afl-newsletter {
        padding: 80px 32px 80px;
    }
    .afl-headline {
        font-size: 44px;
    }
    .afl-footer-inner {
        padding: 20px 32px;
    }
}

/* Mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .afl-newsletter {
        padding: 60px 20px 60px;
    }

    .afl-headline {
        font-size: 32px !important;
        line-height: 1.2;
    }

    .afl-sub {
        font-size: 14px !important;
        margin-bottom: 28px;
    }

    /* ✅ Stack input + button vertically on mobile */
    .afl-form-fields {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .afl-input {
        width: 100%;
        flex: none;
    }

    .afl-btn {
        width: 100%;
        height: 50px;
        padding: 0 24px;
        font-size: 15px !important;
    }

    /* ✅ Footer: stack on mobile */
    .afl-footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .afl-copyright {
        order: 2;
    }

    .afl-brand {
        order: 1;
    }

    .afl-footer-links {
        order: 3;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px 20px;
    }
}

/* Very small ─────────────────────────────────────────────── */
@media (max-width: 380px) {
    .afl-newsletter { padding: 48px 16px 52px; }
    .afl-headline   { font-size: 27px !important; }
}
