/* CSS Variables & Theme */
:root {
    --ink-blue: #00244E;
    --golden-yellow: #FDB913;
    --light-blue: #B3D4FF;
    --pale-blue: #F4F9FF;
    --white: #FFFFFF;
    --error-color: #D32F2F;
    --success-color: #2E7D32;
    --font-family: 'Inter', sans-serif;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-family);
    color: var(--ink-blue);
    background-color: var(--white);
    background-image: 
      linear-gradient(90deg, rgba(179, 212, 255, 0.4) 50%, transparent 50%),
      linear-gradient(rgba(179, 212, 255, 0.4) 50%, transparent 50%);
    background-size: 40px 40px;
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--ink-blue);
}
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* Layout Container */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}
.hero-logo {
    max-width: 100%;
    width: 1200px;
    height: auto;
    margin: 0 auto;
    display: block;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,36,78,0.1);
}
.hero-date {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink-blue);
    padding: 8px 24px;
    border-radius: 999px;
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 24px;
    box-shadow: 0 4px 12px rgba(0,36,78,0.1);
}

/* Navigation Buttons */
.page-nav {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}
.btn-nav {
    background-color: var(--golden-yellow);
    color: var(--ink-blue);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,36,78,0.1);
}
.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,36,78,0.15);
}

/* Main Content Wrapper */
.main-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Content Container for Sections */
.content-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(0,36,78,0.1);
    width: 100%;
    backdrop-filter: blur(4px);
}
@media (max-width: 600px) {
    .content-container { padding: 24px; }
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 40px;
    font-weight: 400;
    color: var(--ink-blue);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.intro-text h2 {
    text-align: center;
    margin-bottom: 24px;
}
.intro-text p {
    margin-bottom: 16px;
}
.intro-text a {
    color: var(--ink-blue);
    font-weight: 700;
    text-decoration: underline;
}

/* --- Simple Form Styling --- */
.simple-form {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

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

.form-row {
    display: flex;
    gap: 24px;
}

.form-row .half {
    flex: 1;
}

@media (max-width: 600px) {
    .form-row { flex-direction: column; gap: 0; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.simple-form input[type="text"],
.simple-form input[type="email"],
.simple-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(0, 36, 78, 0.05); /* Minimal border */
    border-radius: 8px; /* Subtle rounded corners */
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: var(--pale-blue); /* Lightly tinted fields */
    color: var(--ink-blue);
}

.simple-form input:focus, 
.simple-form textarea:focus {
    outline: none;
    background-color: #eaf2fb;
    border-color: rgba(0, 36, 78, 0.2);
}

.simple-form input::placeholder, 
.simple-form textarea::placeholder {
    color: rgba(0, 36, 78, 0.5);
}

/* File Upload Custom Style */
.file-upload-wrapper {
    display: block;
    border: none;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--pale-blue);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.file-upload-wrapper:hover {
    background: #eaf2fb;
}
.file-upload-wrapper input[type="file"] {
    position: absolute; width: 0; height: 0; opacity: 0;
}
.upload-text {
    display: block;
    font-weight: 400;
    font-size: 1.1rem;
    color: rgba(0, 36, 78, 0.5);
}
#file-preview-container {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
#file-preview-img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,36,78,0.1);
    width: 100%;
    height: auto;
}
.btn-text-only {
    background: transparent;
    border: none;
    color: var(--ink-blue);
    text-decoration: underline;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px;
}

/* Checkboxes */
.checkbox-group {
    margin-top: 16px;
    margin-bottom: 32px;
}
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 36px;
    margin-bottom: 16px;
}
.checkbox-label input[type="checkbox"] {
    position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0;
}
.checkbox-custom {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 24px;
    width: 24px;
    background-color: var(--pale-blue);
    border: 1px solid rgba(0, 36, 78, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}
.checkbox-label:hover .checkbox-custom {
    border-color: rgba(0, 36, 78, 0.3);
}
.checkbox-label input:checked ~ .checkbox-custom {
    background-color: var(--ink-blue);
    border-color: var(--ink-blue);
}
.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-label input:checked ~ .checkbox-custom:after {
    display: block;
}
.checkbox-text {
    font-size: 1.1rem;
    color: var(--ink-blue);
    font-weight: 400;
}
.checkbox-text a {
    color: var(--ink-blue);
    font-weight: 600;
    text-decoration: underline;
}

/* Affiliation Section */
.affiliation-section {
    margin-top: 48px;
    margin-bottom: 40px;
}
.section-heading {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--ink-blue);
}
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-align: center;
}
.btn-block { width: 100%; }

.btn-primary {
    background-color: var(--golden-yellow) !important;
    color: var(--ink-blue) !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    padding: 20px 24px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    border: none !important;
    width: 100%;
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,36,78,0.15) !important;
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
}

.btn-secondary {
    background-color: var(--light-blue);
    color: var(--ink-blue);
    padding: 12px 24px;
}
.btn-secondary:hover {
    background-color: #9cbfee;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--ink-blue);
    color: var(--ink-blue);
    padding: 12px 24px;
}
.btn-outline:hover {
    background: var(--ink-blue);
    color: var(--white);
}

/* Success & Share Section */
.success-card {
    text-align: center;
}
.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}
.share-panel {
    background: var(--pale-blue);
    border-radius: 8px;
    padding: 24px;
    margin: 30px 0;
    border: 1px solid var(--light-blue);
}
.share-input-group {
    display: flex;
    margin: 16px 0;
}
.share-input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    background: var(--white);
}
.share-input-group button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0 20px;
}
.social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.btn-social {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}
.btn-social:hover { opacity: 0.9; }
.btn-social.fb { background: #1877F2; }
.btn-social.tw { background: #1DA1F2; }

/* Status Banner */
.status-banner {
    padding: 16px 20px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
}
.status-banner.ended {
    background: #fef2f2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

/* Error Text */
.error-text {
    color: var(--error-color);
    font-size: 0.95rem;
    margin-bottom: 24px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    border-left: 4px solid var(--error-color);
    font-weight: 600;
}

/* Gallery Section */
.gallery-section {
    width: 100%;
}
.gallery-header {
    text-align: center;
    margin-bottom: 30px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}
.gallery-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,36,78,0.05);
    border: 1px solid var(--light-blue);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,36,78,0.1);
}
.gallery-img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: var(--pale-blue);
}
.gallery-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.gallery-caption {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--ink-blue);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gallery-meta {
    font-size: 0.85rem;
    color: var(--ink-blue);
    opacity: 0.8;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-actions { text-align: center; }
.gallery-loader { text-align: center; color: var(--ink-blue); font-weight: 600; padding: 20px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-blue); opacity: 0.7; }
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 36, 78, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--ink-blue);
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.close-modal:hover {
    opacity: 0.7;
}

@media (max-width: 600px) {
    .modal-content { padding: 30px 20px; }
}

#wbx-powered-by-slot { margin-top: 20px; width: 100%; text-align: center; }
