/* CSS Reset & Variables */
:root {
    --primary: #CF102D;      /* Custom Red */
    --primary-hover: #A00C22;
    --secondary: #CF102D;    /* Custom Red */
    --secondary-hover: #A00C22;
    --bg-color: #F8FAFC;
    --surface: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --error: #EF4444;
    --success: #10B981;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --radius-lg: 16px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

/* Header */
.site-header {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0;
    background-color: var(--primary);
    background-image: url('https://offertabs.s3.amazonaws.com/offer/fgcwur/site/media/6a554348886c56.81970580.jpg');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    min-height: 450px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(207, 16, 45, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text-box {
    max-width: 800px;
    margin: 0 auto;
    color: #FFF;
    text-align: center;
}

.hero .badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.countdown-block {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    min-width: 90px;
    text-align: center;
}

.cd-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

.cd-label {
    display: block;
    font-size: 0.875rem;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 40px 20px 80px;
    display: flex;
    flex-direction: column;
}

/* Campaign Details Card */
.campaign-details {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.campaign-details .card-body {
    padding: 40px;
}

.campaign-details p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.campaign-details p:last-child {
    margin-bottom: 0;
}

.campaign-details hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 30px 0;
}

.campaign-details .rules-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.campaign-details .rules-text strong {
    color: var(--text-main);
}

/* Status Banners */
.status-banner {
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    text-align: center;
}

.status-banner.error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #F87171;
}

.status-banner.info {
    background-color: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-card, .post-entry-card {
    max-width: 600px;
    margin: 0 auto;
}

.card-header {
    background: #F8FAFC;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.card-header h2 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 8px;
}

.card-body {
    padding: 32px;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    background: #FFF;
    transition: all 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(207, 16, 45, 0.1);
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    background: #FFF;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-text {
    font-size: 1rem;
    color: var(--text-main);
}

/* Rules Agreement */
.agreement-group {
    background: #F8FAFC;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.rules-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.rules-link:hover {
    color: var(--primary-hover);
}

/* File Dropzone */
.file-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: #F8FAFC;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.file-dropzone:hover, .file-dropzone.dragover {
    border-color: var(--primary);
    background: #EFF6FF;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-dropzone:hover .upload-icon {
    color: var(--primary);
}

.file-name {
    font-weight: 500;
    color: var(--text-muted);
}

.hidden-input {
    display: none;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #FFF;
}

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

.btn-secondary {
    background: var(--secondary);
    color: #FFF;
}

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

.btn-block {
    width: 100%;
}

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

/* Post Entry / Success */
.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.post-entry-card h2 {
    font-family: var(--font-heading);
    margin-bottom: 12px;
}

/* Share Panel */
.share-panel {
    background: #F8FAFC;
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 30px 0;
    border: 1px solid var(--border);
}

.share-panel h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

.share-input-group {
    display: flex;
    margin-top: 16px;
    gap: 8px;
}

.share-input-group input {
    flex: 1;
    background: #FFF;
}

/* Gallery Layout */
.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Gallery Item Card */
.gallery-item {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #F1F5F9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-caption {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.vote-count {
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.vote-btn {
    padding: 8px 16px;
    background: #FFF;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-btn:hover:not(:disabled) {
    background: var(--primary);
    color: #FFF;
}

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

.loading-spinner svg {
    animation: spin 1s linear infinite;
    color: var(--primary);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

#wbx-powered-by-slot {
    margin-top: 40px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
        min-height: 350px;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(207, 16, 45, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    }

    .hero-text-box {
        text-align: center;
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .countdown {
        justify-content: center;
        gap: 10px;
    }
    
    .countdown-block {
        padding: 10px;
        min-width: 70px;
    }
    
    .cd-value {
        font-size: 1.5rem;
    }
    
    .campaign-details .card-body {
        padding: 24px;
    }

    .card-body {
        padding: 24px 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}
