/* ===============================
   NEWSLETTER MODAL — PREMIUM ADAPTIVE
================================= */

.newsletter-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 15000;
}

.newsletter-modal.active {
    display: flex;
}

.newsletter-modal-content {
    position: relative;
    overflow: hidden;

    width: min(920px, 100%);
    max-height: calc(100vh - 48px);

    border-radius: 34px;

    background:
        radial-gradient(circle at top right, rgba(59,130,246,.14), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fbff);

    border: 1px solid rgba(255,255,255,.75);

    box-shadow:
        0 34px 90px rgba(15,23,42,.24),
        inset 0 1px 0 rgba(255,255,255,.9);

    animation: modalPremiumIn .28s ease;
}

.modal-grid {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
    align-items: stretch;

    max-height: calc(100vh - 48px);
}

/* IMAGE ADAPTATIVE */

.modal-image {
    display: flex;
    align-items: flex-end;
    justify-content: center;

    min-height: 0;
    height: auto;

    padding: 24px 20px 0;

    background:
        radial-gradient(circle at center, rgba(124,58,237,.12), transparent 45%);
}

.modal-image img {
    width: auto;
    max-width: 100%;

    height: auto;
    max-height: min(520px, calc(100vh - 120px));

    object-fit: contain;
    display: block;

    filter: drop-shadow(0 24px 46px rgba(15,23,42,.14));
}

/* TEXT */

.modal-text {
    padding: 56px 52px 48px;
    overflow: hidden;
}

.modal-text h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.modal-text p {
    margin: 18px 0 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.75;
}

/* FORM */

.modal-form {
    margin-top: 28px;
}

.modal-form form {
    display: flex;
    gap: 10px;
}

.modal-form input {
    flex: 1;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(226,232,240,.95);
    background: rgba(255,255,255,.92);
    color: #0f172a;
    font-size: .98rem;
    outline: none;
}

.modal-form input:focus {
    background: white;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.modal-form button {
    min-height: 54px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #4da6ff, #2563eb);
    color: white;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(37,99,235,.24);
}

.modal-form button:hover {
    transform: translateY(-2px);
    opacity: .96;
}

.modal-privacy {
    margin-top: 16px !important;
    color: #64748b !important;
    font-size: .78rem !important;
    line-height: 1.6 !important;
}

/* CLOSE */

.close-modal {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    color: #0f172a;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.05);
    background: #f5f3ff;
    color: #5b21b6;
}

/* ANIMATION */

@keyframes modalPremiumIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* TABLET / MOBILE */

@media (max-width: 820px) {
    .newsletter-modal {
        padding: 14px;
    }

    .newsletter-modal-content {
        max-height: calc(100vh - 28px);
        border-radius: 28px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 28px);
    }

    .modal-image {
        max-height: 32vh;
        padding: 18px 18px 0;
    }

    .modal-image img {
        max-height: 32vh;
        max-width: 80%;
    }

    .modal-text {
        padding: 28px 24px 26px;
        text-align: center;
    }

    .modal-text h2 {
        font-size: clamp(1.45rem, 6vw, 2rem);
    }

    .modal-text p {
        font-size: .94rem;
        line-height: 1.65;
    }

    .modal-form {
        margin-top: 20px;
    }

    .modal-form form {
        flex-direction: column;
    }

    .modal-form input,
    .modal-form button {
        width: 100%;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .modal-image {
        max-height: 26vh;
    }

    .modal-image img {
        max-height: 26vh;
        max-width: 76%;
    }

    .modal-text {
        padding: 24px 20px 22px;
    }

    .modal-privacy {
        font-size: .72rem !important;
    }
}
