/* Newsletter Section with Infinite Looping Photo Marquee Grid */
.newsletter-section {
    position: relative;
    height: 520px;
    min-height: 480px;
    background: #0f1519;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.marquee-grid-bg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    z-index: 1;
    transform: none; /* Straight, perfectly horizontal rows matching reference image */
    pointer-events: none;
}

.marquee-row {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
}

.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.marquee-set {
    display: flex;
    gap: 8px;
    padding-right: 8px;
}

.marquee-card {
    width: 210px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.marquee-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85) contrast(1.05); /* Clear, crisp, bright photos */
    transition: transform 0.3s ease;
}

/* Opposing Direction Animations */
.scroll-left .marquee-track {
    animation: marqueeScrollLeft linear infinite;
}

.scroll-right .marquee-track {
    animation: marqueeScrollRight linear infinite;
}

/* Speed variation across rows */
.marquee-row[data-row="0"] .marquee-track { animation-duration: 45s; }
.marquee-row[data-row="1"] .marquee-track { animation-duration: 38s; }
.marquee-row[data-row="2"] .marquee-track { animation-duration: 52s; }
.marquee-row[data-row="3"] .marquee-track { animation-duration: 42s; }

@keyframes marqueeScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marqueeScrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.marquee-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 24, 0.58); /* Soft semi-transparent dark tint, crisp photos visible behind */
    z-index: 2;
}

.newsletter-inner {
    max-width: 850px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 3;
    padding: 0 15px;
}

.newsletter-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -0.8px;
    line-height: 1.15;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

.newsletter-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 35px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nl-icon-small {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Initial State Button */
.nl-trigger-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}

.btn-join-pill {
    background: #00ff9d; /* Vibrant bright neon green matching reference */
    color: #0c3220;
    border: none;
    padding: 16px 52px;
    font-size: 1.15rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 255, 157, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-join-pill:hover {
    transform: scale(1.06);
    box-shadow: 0 15px 40px rgba(0, 255, 157, 0.5);
    background: #10ffaa;
}

/* Expanded Pill Form Container */
.newsletter-form-expandable {
    max-width: 620px;
    margin: 0 auto;
}

.animate-reveal {
    animation: pillExpand 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pillExpand {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.nl-input-pill-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 6px 6px 6px 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.nl-input-pill-wrapper input {
    flex: 1;
    background: #eef4ff; /* Soft pastel light blue fill */
    border: none;
    padding: 16px 24px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    color: #1a2b22;
    font-weight: 500;
    outline: none;
    margin-right: 8px;
}

.nl-input-pill-wrapper input::placeholder {
    color: #7a8b94;
}

.btn-subscribe-orange {
    background: #f37021; /* Vibrant orange */
    color: #ffffff;
    border: none;
    padding: 16px 36px;
    font-weight: 700;
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(243, 112, 33, 0.35);
}

.btn-subscribe-orange:hover {
    background: #e05e10;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(243, 112, 33, 0.5);
}

.newsletter-trust {
    margin-top: 25px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.newsletter-trust i {
    color: #20c997;
}

@media (max-width: 576px) {
    .newsletter-section {
        height: 480px;
    }

    .marquee-card {
        width: 150px;
        height: 95px;
    }

    .nl-input-pill-wrapper {
        flex-direction: column;
        border-radius: 24px;
        padding: 10px;
        gap: 10px;
    }

    .nl-input-pill-wrapper input {
        width: 100%;
        margin-right: 0;
        text-align: center;
        border-radius: 16px;
    }

    .btn-subscribe-orange {
        width: 100%;
        border-radius: 16px;
    }
}
