:root {
    /* Tourism Vernon Inspired Palette */
    --primary: #1E4835;       /* Deep Forest Green */
    --primary-light: #2A644A; /* Lighter Pine */
    --secondary: #00829B;     /* Lake Blue */
    --accent: #E37222;        /* Warm Sun/Fall Orange */
    --bg-light: #CDEAE7;      /* User requested background */
    --text-main: #2D3748;
    --text-muted: #718096;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --error: #E53E3E;
    --success: #38A169;
    
    /* Typography */
    --font-heading: 'Khand', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Effects */
    --radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.1);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-main);
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Layout */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 1.5rem 8rem;
    display: flex;
    align-items: center;
    color: var(--white);
    min-height: 70vh;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Darkened overlay to ensure text readability */
    background: rgba(0, 0, 0, 0.65);
    z-index: 2;
}

.hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    flex: 1;
    text-align: center;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo {
    max-width: 280px;
    max-height: 140px;
    height: auto;
    margin-bottom: 2rem;
    object-fit: contain;
}

.eyebrow {
    display: inline-block;
    padding: 0.4rem 1.25rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--white);
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #CDEAE7; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.concept {
    font-size: 1.05rem;
    max-width: 100%;
    margin: 0 0 2.5rem;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 2rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    min-width: 90px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.time-block span {
    font-size: 2.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1;
    color: #FFFFFF;
}

.time-block label {
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
    opacity: 0.9;
    font-weight: 600;
    color: #FFFFFF;
}

/* Forms */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.form-card {
    max-width: 700px;
    margin: -3rem auto 3rem;
    position: relative;
    z-index: 10;
}

.form-card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-desc {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--primary);
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #FFFFFF;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(0, 130, 155, 0.1);
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231E4835' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: #FAFAFA;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.file-upload-wrapper:hover .file-upload-display {
    border-color: var(--secondary);
    background: rgba(0, 130, 155, 0.03);
}

.file-upload-display svg {
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.checkbox-group {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.15rem;
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-label a {
    color: var(--secondary);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: #D1641A;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    font-size: 1.25rem;
    padding: 1.125rem;
    margin-top: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(30, 72, 53, 0.05);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.95rem;
}

.btn-vote {
    background: var(--secondary);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    font-size: 1.05rem;
}

.btn-vote:hover:not(:disabled) {
    background: #006C80;
}

.btn-vote:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Messages */
.message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.message.error {
    background: #FEF2F2;
    color: var(--error);
    border: 1px solid #FCA5A5;
}

.message.success {
    background: #F0FDF4;
    color: var(--success);
    border: 1px solid #9AE6B4;
}

/* Rules Section */
.rules-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

.rules-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.rules-summary::-webkit-details-marker {
    display: none; /* Hide default arrow in Safari/Chrome */
}

.rules-summary h2 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.rules-summary .chevron {
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

details[open] .rules-summary .chevron {
    transform: rotate(180deg);
}

.rules-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.rules-content h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 1.5rem 0 0.5rem;
    font-family: var(--font-body);
    font-weight: 700;
}

.rules-content h3:first-child {
    margin-top: 0;
}

.rules-content p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.rules-content ul {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.rules-content li {
    margin-bottom: 0.5rem;
}

/* Gallery & Filtering */
.gallery-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
    text-align: center;
}

.gallery-header h2 {
    margin-bottom: 1.5rem;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.category-tab {
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

/* Postcard Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-card {
    background: var(--white);
    padding: 12px 12px 20px 12px;
    border-radius: 4px; /* Classic postcard edge */
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #E2E8F0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-6px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.gallery-img-container {
    position: relative;
    padding-top: 100%; /* Square crop for consistency */
    background: #F1F5F9;
    overflow: hidden;
    cursor: pointer;
}

.gallery-img-container img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img-container img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    pointer-events: none; /* Let clicks pass to the container */
    z-index: 2;
}

.category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255,255,255,0.95);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    z-index: 2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gallery-info {
    padding: 1.25rem 0.5rem 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gallery-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-info .author {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.vote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.vote-count {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.load-more-container {
    text-align: center;
    margin-top: 3.5rem;
}

.empty-gallery {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    color: var(--text-muted);
}

.empty-gallery svg {
    color: var(--border);
    margin-bottom: 1rem;
}

.empty-gallery h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 30, 23, 0.9); /* Deep green tint */
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    z-index: 1001;
}

.lightbox-img-wrapper {
    flex: 2;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 400px;
}

.lightbox-info {
    flex: 1;
    padding: 2.5rem;
    background: var(--white);
    display: flex;
    flex-direction: column;
    min-width: 320px;
    overflow-y: auto;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.95);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
    color: var(--text-main);
}

.lightbox-close:hover {
    background: var(--white);
    transform: scale(1.1);
    color: var(--error);
}

.lightbox-header {
    margin-bottom: 0.5rem;
}

.lightbox-header .category-badge {
    position: relative;
    top: 0; left: 0;
    display: inline-block;
    margin-bottom: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    box-shadow: none;
    color: var(--primary);
}

.lightbox-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.lightbox-info p {
    color: var(--text-muted);
    font-size: 1rem;
}

.lightbox-share-row {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.share-label {
    font-weight: 600;
    font-size: 0.85rem !important;
    color: var(--text-main) !important;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lightbox-vote-row {
    margin-top: auto;
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Footer Slot */
#wbx-powered-by-slot {
    margin-top: auto;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        padding-top: 2rem;
    }
    
    .hero-content {
        max-width: 100%;
    }
}

@media (max-width: 860px) {
    .lightbox-content { flex-direction: column; overflow-y: auto; max-height: 95vh; }
    .lightbox-img-wrapper { min-height: 300px; max-height: 50vh; }
}

@media (max-width: 768px) {
    .hero { padding: 6rem 1.5rem 4rem; min-height: auto; }
    .hero h1 { font-size: 3.5rem; }
    
    /* Background image adjustment for mobile */
    .hero-bg {
        background-size: 100% auto;
        background-position: top center;
        background-repeat: no-repeat;
    }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .card { padding: 2rem 1.5rem; }
    .form-card { margin-top: -2rem; }
    .rules-card { padding: 1.5rem; }
    
    /* Countdown adjustments for mobile */
    .countdown {
        gap: 0.5rem;
    }
    .time-block {
        min-width: 70px;
        padding: 0.8rem 0.5rem;
    }
    .time-block span {
        font-size: 1.75rem;
    }
    .time-block label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.75rem; }
    .time-block {
        min-width: 65px;
        padding: 0.6rem 0.4rem;
    }
    .time-block span {
        font-size: 1.5rem;
    }
}
