:root {
    --primary: #ED1B2F; /* McGill Red */
    --primary-hover: #C51525;
    --secondary: #2C5234; /* Nature Green */
    --text-dark: #1A1A1A;
    --text-light: #666666;
    --bg-light: #F7F9F8;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 20px 25px -5px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/j5i6zx/site/media/6a4e8ea2387bb0.43998475.jpg');
    background-size: cover;
    background-position: center;
    padding: 3rem 1.5rem;
    text-align: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(44,82,52,0.7) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: var(--white);
    padding-bottom: 2rem;
}
.tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    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: 1.5rem;
}
.hero-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}
.hero-subtitle a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}
.hero-subtitle a:hover {
    opacity: 0.8;
}

/* Container & Tabs */
.container {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: -60px auto 40px;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.tab-btn {
    background: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.tab-btn:hover {
    color: var(--primary);
    transform: translateY(-2px);
}
.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 8px 16px rgba(237, 27, 47, 0.25);
}

/* Card */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}
.section-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.25rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}
.section-desc {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
}
.section-desc a {
    color: var(--primary);
    text-decoration: underline;
}
.section-desc a:hover {
    color: var(--primary-hover);
}

/* Form Styles */
.form-group { margin-bottom: 1.5rem; }
label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}
.field-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: -0.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
input[type="text"], input[type="email"], textarea, input[type="file"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--white);
    transition: border-color 0.3s, box-shadow 0.3s;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(237, 27, 47, 0.1);
}
input[type="file"] {
    padding: 0.6rem;
    background: #FAFAFA;
}
select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    width: 100%; padding: 0.875rem 1rem; padding-right: 2.5rem;
    font-size: 1rem; font-family: inherit;
    border: 1px solid var(--border); border-radius: 8px;
    background-color: var(--white);
    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='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    transition: border-color 0.3s, box-shadow 0.3s;
}
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(237, 27, 47, 0.1);
}
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary);
}
.checkbox-group label {
    font-weight: 400;
    margin-bottom: 0;
    font-size: 0.95rem;
    cursor: pointer;
    line-height: 1.5;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
    width: auto;
    padding: 0.75rem 2rem;
}
.btn-secondary:hover { background: #E5E7EB; }

/* Alerts */
#alert-container {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}
.alert-error {
    background-color: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #F87171;
}
.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

/* Success State */
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--secondary);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}
.upload-preview { margin: 2rem 0; }
.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.filter-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Gallery Grid */
.gallery-header { margin-bottom: 1.5rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}
.gallery-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.gallery-img-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-img-wrap img {
    transform: scale(1.05);
}
.gallery-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.gallery-caption {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    flex: 1;
    color: var(--text-dark);
}
.gallery-author {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}
.vote-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}
.vote-count {
    font-weight: 600;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.vote-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.vote-btn:not(:disabled):hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.vote-btn:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: default;
    border-color: #E5E7EB;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox-content {
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.lightbox-content img {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
}
.lightbox-info {
    color: white;
    padding-top: 1rem;
    text-align: center;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* Spinner */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Powered By */
#wbx-powered-by-slot { margin-top: 3rem; margin-bottom: 2rem; display: flex; justify-content: center; }

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero { min-height: 350px; padding-top: 2rem; }
    .tabs { flex-direction: column; }
    .tab-btn { width: 100%; }
    .card { padding: 1.5rem; }
    .container { margin-top: -20px; }
}
