/* =========================================
   PROGRESSIVE - THIRST FOR ADVENTURE
   BRAND GUIDELINES IMPLEMENTATION
   ========================================= */

/* ==================
   1. BRAND TOKENS & BASE STYLES
   ================== */
:root {
    --brand-blue: #0077B3;
    --deep-navy: #0A3360;
    --very-light-cyan: #F2FAFC;
    --charcoal-stroke: #2D2D2D;
    --white: #FFFFFF;
    --black: #000000;
    --pale-grey-input: #f5f5f5;
    --gutter: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Roboto', sans-serif;
    background: url('../images/back.jpg') center top;
    background-size: 100% auto;
    background-repeat: repeat-y;
    min-height: 100vh;
    color: var(--deep-navy);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-weight: 900;
    margin-top: 0;
}
p {
    font-weight: 400;
    line-height: 1.5;
    color: #333; /* A slightly softer text color for paragraphs */
    margin-top: 0;
}

/* Global spacing optimizations */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
}
p {
    margin-bottom: 1em;
}

/* ==================
   NAVIGATION STYLES
   ================== */

/* Navigation */
.site-nav {
    padding: 20px 0;
    margin-bottom: 20px;
}

.nav-home {
    color: #2B5A87;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}

.nav-home:hover {
    color: #007BFF;
    background: rgba(0, 123, 255, 0.1);
}

/* ==================
   2. DESKTOP FLOW (WIDE SCREENS)
   ================== */

/* HERO BACKDROP & HEADER IMAGE */
.hero-backdrop {
    width: 100%;
    position: relative;
    padding: 0;
}

.hero-container {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem var(--gutter);
}

.header-image {
    width: 100%;
    max-width: 850px;
    height: auto;
    display: block;
}



/* INTRO COPY (Desktop) */
.intro-copy {
    background: var(--very-light-cyan);
    text-align: center;
    padding: 1rem var(--gutter);
}
.intro-container {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 2rem;
}
.intro-container h2 {
    font-size: 1.875rem;
    margin-bottom: 0.75rem; /* Slightly increased spacing */
    line-height: 1.3; /* Increased line height for better spacing */
}
.intro-container p {
    margin-bottom: 0;
    line-height: 1.4;
}

/* CONTEST PANEL */
.contest-panel {
    background: var(--very-light-cyan);
    padding: 1rem var(--gutter) 0.75rem;
    margin-bottom: 0.5rem;
}
.contest-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: center; /* This will center the packet vertically */
    justify-content: center;
}
.contest-col-left {
    text-align: center;
    flex: none;
    display: flex;
    align-items: center; /* Center the image vertically within its container */
}
.contest-col-right {
    text-align: center;
    flex: none;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.packet-img {
    max-width: 100%;
    width: 260px;
    margin-left: 0;
}
.contest-col-right h3 {
    font-size: 2.25rem;
    color: var(--deep-navy);
    margin-bottom: 0.5rem;
    line-height: 1.15;
}
.contest-col-right p {
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.code-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    max-width: 400px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.code-form input {
    background: var(--white);
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 0;
    padding: 0.75rem 1rem;
    flex: 1;
    font-size: 1rem;
    outline: none;
}
.code-form input:focus {
    border-color: var(--brand-blue);
}
.submit-button {
    background: var(--brand-blue);
    color: var(--white);
    border: 1px solid var(--brand-blue);
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}
.submit-button:hover {
    background: #005a87;
}

/* Validation Message */
.validation-message {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: #c53030;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    display: block;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.15);
    position: relative;
    animation: slideInDown 0.3s ease-out;
}

.validation-message::before {
    content: "⚠️";
    margin-right: 8px;
    font-size: 1rem;
}

.validation-message.error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: #c53030;
    border-color: #feb2b2;
}

.validation-message.error::before {
    content: "❌";
}

.validation-message.info {
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    color: #2b6cb0;
    border-color: #90cdf4;
    box-shadow: 0 2px 8px rgba(43, 108, 176, 0.15);
}

.validation-message.info::before {
    content: "ℹ️";
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================
   MODAL STYLES
   ================== */

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 51, 96, 0.8); /* Deep navy with transparency */
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal container */
.modal {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(10, 51, 96, 0.3);
    max-width: 90%;
    width: 400px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.7) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

/* Modal header */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--deep-navy);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.modal-icon.error {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
}

.modal-icon.info {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2b6cb0;
}

.modal-icon.success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #2f855a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: var(--deep-navy);
}

/* Modal body */
.modal-body {
    padding: 1.5rem;
}

.modal-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin: 0;
}

/* Modal footer */
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f4f8;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.modal-button.primary {
    background: var(--brand-blue);
    color: var(--white);
}

.modal-button.primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.modal-button.secondary {
    background: #e2e8f0;
    color: var(--deep-navy);
}

.modal-button.secondary:hover {
    background: #cbd5e0;
}

/* Form Modal Styles */
.form-modal {
    width: 500px;
    max-width: 95%;
    overflow: hidden;
}

.form-modal-title .modal-title-text {
    color: var(--brand-blue);
    font-weight: 600;
}

.user-info-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 119, 179, 0.1);
}

/* Select dropdown styling to match input fields */
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.form-group select:focus {
    outline: none;
    border-color: var(--brand-blue);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 119, 179, 0.1);
}

.form-group select:hover {
    border-color: #cbd5e0;
}

/* Styling for the "Other" camping location field */
#other-camping-location {
    margin-top: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.4;
    cursor: pointer;
    margin-top: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Tighten spacing between checkbox form rows in modal */
.form-row .checkbox-label {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

/* Reduce spacing specifically between the checkbox form rows at the end */
.form-row:last-child {
    margin-top: -0.25rem;
}



.form-privacy-notice {
    margin: 0;
    padding: 1rem 1.5rem;
    background: #f2fafc;
    border-top: 1px solid #e2e8f0;
    width: 100%;
    position: relative;
}

.form-privacy-notice p {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.form-privacy-notice p:last-child {
    margin-bottom: 0;
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .modal {
        max-width: 95%;
        width: 100%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1.25rem;
    }
    
    .modal-title {
        font-size: 1.125rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .modal-footer {
        padding: 1rem 1.25rem;
        flex-direction: column;
    }
    
    .modal-button {
        width: 100%;
        justify-content: center;
        order: 1;
    }
    
    .modal-button.secondary {
        order: 2;
        margin-top: 0.5rem;
    }
    
    .contest-col-right {
        max-width: 100%;
        padding: 0;
    }

    /* Form modal mobile styles */
    .form-modal {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-group {
        flex: 1 1 100%;
    }
    
    .form-group input {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .form-privacy-notice {
        padding: 1rem 1.25rem;
    }
    
    .checkbox-label {
        font-size: 0.875rem;
        gap: 0.75rem;
    }
}

/* SUB-CTA STRIP */
.sub-cta-strip {
    background: var(--white);
    padding: 1rem var(--gutter);
    text-align: center;
}
.sub-cta-container {
    max-width: 600px;
    margin: 0 auto;
}
.sub-cta-container h4 {
    font-size: 1.375rem;
    margin-bottom: 0.375rem;
    line-height: 1.25;
}
.sub-cta-container p {
    margin-bottom: 1rem;
    line-height: 1.4;
}
    .cta-button {
        display: inline-block;
        background: var(--brand-blue);
        color: var(--white);
        padding: 1rem 2rem;
        text-decoration: none;
        border-radius: 5px;
        font-weight: 700;
    }

    /* DRINK PLAY WIN MOBILE OVERLAY */
    .drink-play-win-overlay {
        display: none; /* Hidden on desktop */
    }
    .droplet-stamp-mobile {
        width: 150px;
        height: auto;
    }

    /* RV DIVIDER */
.rv-divider {
    text-align: center;
    padding: 0.75rem 0;
    background: var(--white);
}
.rv-bottom {
    width: 140px;
    height: auto;
}

/* ==================
   DESKTOP OPTIMIZATION (LARGE SCREENS)
   ================== */
@media (min-width: 1024px) {
    /* Further optimize for desktop viewing */
    .hero-container {
        padding: 0.75rem var(--gutter);
    }
    
    .header-image {
        max-width: 750px;
    }
    
    .intro-copy {
        padding: 1.5rem var(--gutter);
    }
    
    .contest-panel {
        padding: 1.25rem var(--gutter);
    }
    
    .intro-container h2 {
        font-size: 1.75rem;
        margin-bottom: 0.375rem;
    }
    
    .contest-col-right h3 {
        font-size: 2rem;
        margin-bottom: 0.375rem;
    }
    
    .packet-img {
        width: 240px;
    }
    
    .sub-cta-strip {
        padding: 1.75rem var(--gutter);
    }
    
    .sub-cta-container h4 {
        margin-bottom: 0.25rem;
    }
    
    .sub-cta-container p {
        margin-bottom: 0.875rem;
    }
    
    .rv-divider {
        padding: 1.25rem 0;
    }
    
    .footer {
        padding: 2rem var(--gutter);
    }
}

/* FOOTER */
.footer {
    padding: 1.25rem var(--gutter);
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 4rem;
}
.footer-links a, .footer-social p {
    color: var(--deep-navy);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.3;
}
.footer-social {
    text-align: right;
}
.footer-social p {
    margin-bottom: 0.375rem;
}
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}
.social-link svg {
    width: 24px;
    height: 24px;
    fill: var(--deep-navy);
}

.social-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* ==================
   3. MOBILE FLOW (NARROW SCREENS)
   ================== */
@media (max-width: 768px) {
    :root {
        --gutter: 16px; /* Tighter gutters on mobile */
    }
    
    body {
        background-repeat: no-repeat;
    }
    
    /* HERO - Mobile Header Image */
    .hero-backdrop {
        padding: calc(var(--gutter) * 0.5);
        margin-bottom: -0.5rem; /* More space below header for cleaner layout */
    }
    
    .hero-container {
        padding: 0.5rem 0;
        max-width: 100%;
    }
    
    .header-image {
        content: url('../images/header-mobile.png');
        max-width: 85%;
        height: auto;
        margin: 0 auto;
    }

    /* DRINK PLAY WIN MOBILE OVERLAY */
    .drink-play-win-overlay {
        display: block;
        position: relative;
        text-align: center;
        z-index: 10;
        margin-top: -1.5rem; /* Balanced overlap with better spacing */
        margin-bottom: -0.5rem; /* Cleaner integration */
        padding: 0.5rem 0;
    }
    .droplet-stamp-mobile {
        width: 120px; /* Can be larger with more space available */
        height: auto;
    }

    /* CONTEST PANEL */
    .contest-container {
        flex-direction: row;
        gap: 1.25rem;
        align-items: flex-start;
    }
    .contest-col-left {
        text-align: center;
        flex: 1 1 40%;
        padding-right: 0.5rem;
    }
    .contest-col-right {
        text-align: center;
        flex: 1 1 60%;
        padding-left: 0.5rem;
    }
    .packet-img {
        max-width: 100%;
        width: 200px; /* Further optimized for compact mobile layout */
        margin-left: 0;
    }
    .code-form {
        align-items: center;
        flex-direction: column;
        gap: 0.75rem;
        box-shadow: none;
        overflow: visible;
        border-radius: 0;
        max-width: 100%;
        margin-top: 1rem;
        padding: 0 0.5rem;
    }
    .code-form input, .submit-button {
        width: 90%; /* Expand for easy tapping */
        border-radius: 6px;
    }
    .code-form input {
        border-right: 1px solid #ccc;
    }
    
    /* Mobile validation messages */
    .validation-message {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.8rem;
        padding: 10px 14px;
    }

    /* SUB-CTA STRIP */
    .sub-cta-strip {
        background: var(--white);
        padding: 0.75rem var(--gutter);
        margin-top: 0.5rem;
    }
    .sub-cta-container h4 {
        color: var(--deep-navy);
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    .sub-cta-container p {
        color: var(--deep-navy);
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    /* Mobile spacing optimizations */
    .intro-copy {
        padding: 0.75rem var(--gutter);
        margin-bottom: 0.5rem;
    }
    
    .intro-container h2 {
        font-size: 1.625rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .intro-container p {
        margin-bottom: 0;
        line-height: 1.4;
    }
    
    .contest-panel {
        padding: 0.75rem var(--gutter);
        margin-bottom: 0.5rem;
    }
    
    .contest-col-right h3 {
        font-size: 1.875rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }
    
    .contest-col-right p {
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }
    
    .rv-divider {
        padding: 0.5rem 0;
        margin-top: 0.5rem;
    }
    
    .footer {
        padding: 1rem var(--gutter);
    }
    
    /* FOOTER */
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    .footer-links {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: center;
    }
    .footer-social {
        text-align: center;
    }
}