/* ==========================================
   1. Root & Global Styles
   ========================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: "Times New Roman", Times, Georgia, serif;
    background-image: url("imgs/cobalt-sky.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #0d1b2a;
    margin: 0;
    padding: 0;
    width: 100%;
    color: #f0f4f8;
}

footer {
    text-align: center;
}

/* ==========================================
   2. Layout & Containers
   ========================================== */
#main-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.left-bar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.info, 
.menu-wrapper, 
.spotlightbox, 
.directory-container, 
.directory-map, 
.gallerybox {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #778da9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #1b263b;
}

/* ==========================================
   3. Header & Navigation
   ========================================== */
header {
    margin: 5px auto;
    display: flex;
    align-items: center;
    justify-content: center; 
    position: relative;    
    background-color: rgba(13, 27, 42, 0.85);
    padding: 15px 20px;
    gap: 20px;              
}

header .logo {
    font-size: 28px;
}

header .title {
    font-size: 36px;
    font-weight: bold;
    color: #e0f2fe;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#cslogo {
    width: 220px;           
    height: auto;
    display: block;
    border: 2px solid #415a77;
    border-radius: 25%;     
    padding: 5px;
}

.menu-toggle, 
.hamburger {
    display: none;
}

.menu-wrapper h3, 
.info-title h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0d1b2a;
}

.nav-menu .menulist {
    max-height: 300px;
    overflow-y: auto;
}

.menulist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menulist li {
    padding: 8px 0;
    border-bottom: 1px solid #cbd5e1;
}

.menulist li:last-child {
    border-bottom: none;
}

.menulist li a {
    text-decoration: none;
    color: #1d4ed8;
    font-weight: 600;
}

.menulist li a:hover {
    text-decoration: underline;
    color: #1e40af;
}

#socials {
    display: flex;
    justify-content: space-around;
}

/* ==========================================
   4. Components (Spotlight, Gallery, etc.)
   ========================================== */
.info-para p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #334155;
}

.spotlightbox h2, 
.gallerybox h2 {
    text-align: center;
    font-size: 18px;
    color: #0d1b2a;
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.spotlight-body {
    display: flex;
    gap: 20px;
    align-items: center;
}

.hero-img {
    width: 220px;
    height: 140px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    padding: 10px; 
}

.business-info {
    flex-grow: 1;
}

.business-info h3 {
    margin: 0 0 8px 0;
    color: #0d1b2a;
}

.business-info p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #334155;
}

.business-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn {
    display: inline-block;
    background-color: #1d4ed8;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.btn:hover {
    background-color: #1e40af;
}

/* Gallery Grid (Consolidated) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px;
}

.gallery-item {
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-img img {
    width: 100%;
    height: 140px; 
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #cbd5e1;
}

.gallery-caption {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
}

.img-info {
    margin: 0;
    color: #0d1b2a;
    font-weight: bold;
    line-height: 1.3;
}

.img-credit {
    margin: 0;
    color: #475569;
    font-size: 12px;
}

.img-credit a {
    color: #1d4ed8;
    text-decoration: none;
}

.img-credit a:hover {
    text-decoration: underline;
}

/* ==========================================
   5. Contact Form
   ========================================== */
.Contact-info {
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 15px;
    color: #555555;
}

.Contact-info a {
    color: #0066cc;
    text-decoration: none;
}

.Contact-info a:hover {
    text-decoration: underline;
}

#contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#contact label {
    font-weight: 600;
    font-size: 14px;
    color: #444444;
    margin-bottom: -8px; 
}

#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#contact input[type="text"]:focus,
#contact input[type="email"]:focus,
#contact textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.2);
}

#contact textarea {
    resize: vertical;
    min-height: 100px;
}

.g-recaptcha {
    margin-top: 8px;
}

#contact button[type="submit"] {
    background-color: #0066cc;
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

#contact button[type="submit"]:hover {
    background-color: #004999;
}

/* ==========================================
   6. Calendar & Sponsors
   ========================================== */
.cal-header {
    text-align: center;
    margin-bottom: 20px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.cal-day-label {
    background: #f4f6f8;
    font-weight: bold;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
}

.cal-cell {
    background: #fff;
    min-height: 100px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.cal-cell.empty {
    background: #f9f9f9;
}

.cal-day-num {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.cal-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    max-height: 70px;
}

.cal-event {
    background: #0056b3;
    color: #fff;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.cal-event:hover {
    background: #003d82;
}

.cal-event-thumb {
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
    max-width: 14px;
    max-height: 14px;
}

.sponsors {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sponsorbox {
    display: flex;
}

.slogo {
    height: 75px;
}

.sponsortier {
    display: flex;
    gap: 5px;
}

.sponsorship-lightbox {
    width: 100%;
    max-width: 100%; 
    box-sizing: border-box;
    margin: 0 auto;
}

.sponsorship-table {
    width: 100%;
    table-layout: fixed; 
    border-collapse: collapse;
    margin-top: 10px;
}

.sponsorship-table th, 
.sponsorship-table td {
    border: 1px solid;
    padding: 8px 4px;
    text-align: center;
    font-size: 13px;
    word-break: break-word;
}

.sponsorship-table th:first-child,
.sponsorship-table td:first-child {
    width: 32%;
    text-align: left;
}

/* ==========================================
   7. Responsive Media Queries
   ========================================== */
@media (max-width: 1000px) {
    #main-wrapper {
        flex-direction: column;
        padding: 10px;
    }

    .left-bar {
        width: 100%;
    }

    header {
        padding: 15px 20px;
    }

    header .logo {
        margin: auto;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 5px;
        float: right;
    }

    .hamburger .bar {
        width: 25px;
        height: 3px;
        background-color: #0d1b2a;
        border-radius: 2px;
        transition: 0.3s;
    }

    .menu-wrapper {
        position: relative;
    }

    .menu-wrapper h3 {
        display: inline-block;
        margin: 0;
    }

    .nav-menu {
        display: none;
        margin-top: 10px;
    }

    .menu-toggle:checked ~ .nav-menu {
        display: block;
    }

    .menu-toggle:checked ~ .hamburger .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle:checked ~ .hamburger .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle:checked ~ .hamburger .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 688px) {
    .spotlight-body {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .spotlight-body .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #contact button[type="submit"] {
        width: 100%;
    }
}