/* ----- VARIABLES ----- */
:root {
    --primary: #FDB913; /* SCGRR Gold */
    --primary-hover: #E4A611;
    --secondary: #20A4BE; /* SCGRR Light Blue */
    --secondary-hover: #19879C;
    --bg-color: #F8FAFC;
    --surface: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --error: #EF4444;
    --success: #10B981;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --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);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* ----- SCROLLBAR OVERRIDES ----- */
/* Force standard vertical scrollbars to display across browsers */
html, body, .woobox-campaign-container, #wrapper {
    overflow-y: scroll !important;
    scrollbar-width: auto !important; /* Forces visibility on Firefox */
}

/* Force modern Webkit browsers (Safari, Chrome, Edge) to show the scrollbar */
::-webkit-scrollbar {
    -webkit-appearance: none !important;
    width: 12px !important;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.4) !important; 
    border-radius: 6px !important;
    border: 3px solid #ffffff !important; /* Adds padding around the bar */
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* ----- RESET & BASE ----- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    transition: all 0.2s ease;
}

/* ----- UTILITIES ----- */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.w-full {
    width: 100%;
}

.container-centered {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: center;
}

/* ----- HERO SECTION ----- */
.hero {
    position: relative;
    padding: 5rem 1.5rem;
    text-align: center;
    overflow: hidden;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: #ffffff;
}

.brand-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.brand-logo-img {
    height: 140px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.brand-logo-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 800;
}

.hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

/* ----- MAIN CONTAINER & TABS ----- */
.main-container {
    max-width: 1000px;
    margin: -3rem auto 2rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
    flex: 1;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    background-color: var(--surface);
    border-radius: 99px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
}

.tab-btn:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.tab-btn.active {
    background-color: var(--secondary);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(32, 164, 190, 0.25);
}

.content-area {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

/* ----- FORMS ----- */
.form-card {
    max-width: 600px;
    margin: 0 auto;
}

.form-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    text-align: center;
    font-weight: 800;
}

.form-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

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

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

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(253, 185, 19, 0.2);
    background-color: #ffffff;
}

#search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(253, 185, 19, 0.2) !important;
    background-color: #ffffff !important;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.25rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-main);
}

.radio-label input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--secondary);
    cursor: pointer;
}

/* Custom File Upload */
.file-upload-wrapper {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    background-color: #F8FAFC;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.file-upload-wrapper:hover:not(.has-file), .file-upload-wrapper.dragover {
    border-color: var(--primary);
    background-color: rgba(253, 185, 19, 0.05);
}

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

/* Disable input clicks when file is selected so the remove button works */
.file-upload-wrapper.has-file input[type="file"] {
    display: none;
}

.file-icon {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.file-msg {
    display: block;
    font-weight: 600;
    color: var(--text-main);
}

.file-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.file-upload-wrapper.has-file {
    border-style: solid;
    border-color: var(--success);
    background-color: #ffffff;
    padding: 1rem;
    cursor: default;
}

/* File Preview Elements */
#file-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

#file-preview-img {
    max-height: 250px;
    width: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    object-fit: contain;
}

#btn-remove-file {
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
    background-color: #FEE2E2;
    color: var(--error);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

#btn-remove-file:hover {
    background-color: #FECACA;
}


/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: var(--text-main); /* High contrast on gold */
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 185, 19, 0.3);
}

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

.btn-secondary {
    background-color: var(--border);
    color: var(--text-main);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
}

.btn-secondary:hover {
    background-color: #CBD5E1;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border-left: 4px solid var(--error);
    font-weight: 600;
}

/* Spinners */
.spinner, .spinner-dark {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(32, 164, 190, 0.3);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-dark {
    border-color: rgba(0,0,0,0.1);
    border-top-color: var(--secondary);
    margin: 0 auto;
}

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

/* ----- SUCCESS SECTION ----- */
.success-icon {
    color: var(--success);
    margin-bottom: 1rem;
}
.share-panel {
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
}
.share-input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ----- GALLERY SECTION ----- */
.gallery-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.vote-tracker-badge {
    background-color: var(--secondary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-block;
}

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

.gallery-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.gallery-img-wrap {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: #f1f5f9;
    overflow: hidden;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(32, 164, 190, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.btn-view-large {
    background: rgba(255,255,255,0.9);
    color: var(--secondary);
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-card:hover .btn-view-large {
    transform: scale(1);
}

.btn-view-large:hover {
    background: #ffffff;
    color: var(--primary);
}

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

.gallery-caption {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex: 1;
}

.gallery-action {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.btn-vote {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background-color: #F8FAFC;
    color: var(--secondary);
    font-weight: 700;
    border: 1px solid var(--border);
}

.btn-vote:hover:not(:disabled) {
    background-color: rgba(253, 185, 19, 0.1);
    color: var(--secondary-hover);
    border-color: var(--primary);
}

.btn-vote:disabled, .btn-vote.voted {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
    cursor: default;
}

.btn-vote.limit-reached {
    background-color: rgba(100, 116, 139, 0.1);
    color: #64748B;
    border-color: rgba(100, 116, 139, 0.3);
}

.rescue-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary);
    color: var(--text-main);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 2;
    pointer-events: none;
}

/* ----- MODALS ----- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem 1rem;
    overflow-y: auto;
}

.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(32, 164, 190, 0.8);
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    z-index: 1001;
    animation: modalSlide 0.3s ease-out forwards;
    margin: auto;
    flex-shrink: 0;
}

.modal-card h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.lightbox-content {
    position: relative;
    z-index: 1001;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    flex-shrink: 0;
}

.lightbox-img-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

#lightbox-img {
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-caption {
    color: #ffffff;
    text-align: center;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
}

.modal-close:hover {
    background: #E2E8F0;
    color: var(--text-main);
}

.lightbox-content .modal-close {
    top: -40px; right: 0;
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.lightbox-content .modal-close:hover {
    background: rgba(255,255,255,0.4);
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .content-area {
        padding: 1.5rem;
    }
    .tabs {
        flex-direction: column;
    }
    .hero h1 {
        font-size: 2.25rem;
    }
}

@media (min-width: 769px) {
    .lightbox-content {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
        max-width: 95vw;
    }

    .lightbox-img-wrapper {
        flex: 0 1 auto;
        margin: 0;
    }

    #lightbox-img {
        max-width: 65vw;
        max-height: 85vh;
    }

    .lightbox-caption {
        flex: 0 1 350px;
        text-align: left;
        padding: 0;
        font-size: 1.25rem;
        line-height: 1.5;
    }

    .lightbox-content .modal-close {
        top: -40px;
        right: 0;
    }
}