﻿/* =========================================================
   1) RESET & BASE STYLES
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
}

/* =========================================================
   2) LAYOUT WRAPPER
========================================================= */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================================
   3) HEADER
========================================================= */
.site-header {
    background-color: #00264d;
    color: #fff;
    padding: 20px;
    min-height: 100px;
    border-bottom-right-radius: 80px 40px;
    position: relative;
    z-index: 1;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    min-height: 60px;
}

    .header-content .title {
        text-align: center;
        font-size: 1.5rem;
        font-weight: bold;
        color: #fff;
        grid-column: 2;
    }

.logo {
    height: 80px;
    width: 300px;
    object-fit: contain;
    margin-right: 15px;
}

/* =========================================================
   4) MAIN CONTENT
========================================================= */
.site-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 10px;
    overflow: hidden;
}

.calendar-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    background: #f4f4f4;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* =========================================================
   5) REGISTRATION LINK
========================================================= */
.registration-link {
    background-color: #00264d;
    padding: 20px 30px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .registration-link:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    }

    .registration-link h4 {
        margin: 0;
        font-size: 20px;
    }

    .registration-link a {
        display: inline-block;
        margin-top: 8px;
        font-size: 16px;
        color: #66ccff;
        text-decoration: none;
        word-break: break-all;
        transition: color 0.3s ease, text-decoration 0.3s ease;
    }

        .registration-link a:hover {
            color: #fff;
            text-decoration: underline;
        }

/* =========================================================
   6) FILTERS PANEL
========================================================= */
.filters-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.filter-label {
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
    font-size: 0.9rem;
    border-bottom: 2px solid #ddd;
    width: 100%;
    padding-bottom: 3px;
}

/* Dropdowns */
.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-toggle {
    width: 100%;
    text-align: left;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #00264d;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

    .dropdown-toggle:hover {
        opacity: 0.85;
    }

.dropdown-menu {
    position: absolute;
    top: 110%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    list-style: none;
    padding: 0;
    margin: 5px 0 0;
    min-width: 180px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

    .dropdown-menu.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .dropdown-menu li {
        padding: 10px;
        cursor: pointer;
        transition: background 0.2s;
    }

        .dropdown-menu li:hover {
            background: #f0f0f0;
        }

/* =========================================================
   7) CALENDAR HEADER & GRID
========================================================= */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 10px;
}

.month-and-events {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.month-selector select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Selected date info */
.selected-date-info {
    background-color: #e6f0fa;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #00264d;
    text-align: center;
    margin-top: 5px;
}

/* Calendar grid */
.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.date-box {
    border: 1px solid #ccc;
    padding: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* keep square */
    display: flex;
    flex-direction: column;
}
.date-box {
    overflow-y: auto;
    max-height: 120px;
}

.calendar-event-block {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}


/* Ensure both header and grid use the same grid layout */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Create 7 equal columns */
    gap: 6px;
    margin-bottom: 10px; /* Space between days and dates */
}

.day-name {
    text-align: center;
    font-weight: bold;
    color: #00264d;
    font-size: 1rem;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Same 7 equal columns */
    gap: 6px;
}


.day-number {
    font-weight: bold;
}

.event-title {
    font-size: 10px;
    line-height: 1.2;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-box:hover {
    background-color: #002855; /* highlight on hover */
    color: #fff;
}

/* =========================================================
   8) EVENT + SDG SECTION
========================================================= */
.event-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Left panel: Event Display */
.event-display {
    flex: 0 0 45%; /* balanced width */
    background-color: #fff;
    border-left: 4px solid #00264d;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333;
}

    .event-display h3 {
        margin-bottom: 15px;
        color: #00264d;
    }

/* Right panel: SDG Panel */
.sdg-panel {
    flex: 1; /* remaining space */
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

    .sdg-panel .panel-title {
        font-weight: bold;
        text-align: center;
        margin-bottom: 10px;
    }

.sdg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.sdg-item {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 5px;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

    .sdg-item img {
        width: 50%;
        height: auto;
        object-fit: contain;
        margin-bottom: 5px;
        background: white;
        border-radius: 5px;
    }

    .sdg-item p {
        font-size: 0.7rem;
        text-align: center;
        margin: 0;
        line-height: 1.1;
    }

    .sdg-item:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

/* =========================================================
   9) MODAL
========================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

    .close-btn:hover {
        color: #000;
    }

/* =========================================================
   10) FOOTER
========================================================= */
.site-footer {
    background-color: #00264d;
    color: #fff;
    padding: 20px;
    min-height: 100px;
    border-top-left-radius: 80px 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    min-height: 60px;
}

    .footer-content .footer-text {
        grid-column: 2;
        text-align: center;
        font-size: 1rem;
    }

/* =========================================================
   11) BUTTONS
========================================================= */
.custom-event-btn {
    background-color: #0056b3;
    color: #fff;
    border: none;
    transition: background 0.3s;
    display: inline-block;
}

    .custom-event-btn:hover {
        background-color: #003d80;
        color: #fff;
    }

.center-btn {
    display: block;
    margin: 50px auto;
}

/* =========================================================
   12) IFRAME CONTAINER
========================================================= */
.iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

    .iframe-container iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

/* =========================================================
   13) RESPONSIVE DESIGN
========================================================= */
@media (max-width: 1024px) {
    .event-display {
        flex: 0 0 48%;
    }
}

@media (max-width: 768px) {
    .header-content, .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-header, .site-footer {
        padding: 8px 16px;
        border-radius: 0;
    }

    .logo {
        height: 50px;
        width: 150px;
        margin: 0 auto 10px;
    }

    .calendar-container {
        max-width: 100%;
        overflow-x: auto;
    }

    .calendar-header h2 {
        font-size: 1.2rem;
    }

    .custom-event-btn {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .event-section {
        flex-direction: column;
    }

    .event-display, .sdg-panel {
        flex: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 10px;
        width: 90%;
    }
}
.event-sdg-container {
    display: flex;
    gap: 20px; /* space between event and SDG */
    align-items: stretch; /* makes both columns same height */
}

.event-display, .sdg-display {
    flex: 1; /* equal width for both */
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* One event */
.has-event {
    background-color: #e8f4ff;
    border: 2px solid #1e90ff;
}

/* Two events */
.has-multiple-events {
    background-color: #ffeccc;
    border: 2px solid #ff9900;
}

/* Three or more events */
.has-many-events {
    background-color: #ffe0e0;
    border: 2px solid #ff3b3b;
}
.calendar-controls .btn i {
    font-size: 1.2rem; /* Arrow size */
    line-height: 1;
    color: #fff; /* Ensure visible */
}
.calendar-controls .arrow-btn {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}


/* mobile */
/* Page title */

.page-title {
    text-align: center;
    margin: 20px 0;
    color: #00264d;
}

/* Table wrapper (important for mobile scroll) */
.table-responsive-custom {
    width: 100%;
    overflow-x: auto;
}

/* Table styling */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px; /* prevents breaking */
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

    /* Header */
    .custom-table thead {
        background-color: #00264d;
        color: #fff;
    }

    .custom-table th,
    .custom-table td {
        padding: 12px 10px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }

    /* Row hover */
    .custom-table tbody tr:hover {
        background-color: #f1f7ff;
        transition: 0.2s;
    }

/* Role badge */
.role-badge {
    background-color: #0056b3;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* No data */
.no-data {
    text-align: center;
    color: red;
    padding: 20px;
}

/* Hide columns on mobile */
.hide-mobile {
    display: table-cell;
}

/* =========================
   MOBILE IMPROVEMENTS
========================= */
@media (max-width: 768px) {

    .custom-table {
        font-size: 0.85rem;
        min-width: 600px;
    }

        .custom-table th,
        .custom-table td {
            padding: 8px;
        }

    /* Hide heavy column */
    .hide-mobile {
        display: none;
    }
}

.sdg-1 {
    background-color: #e5243b;
}

.sdg-2 {
    background-color: #dda63a;
}

.sdg-3 {
    background-color: #4c9f38;
}

.sdg-4 {
    background-color: #c5192d;
}

.sdg-5 {
    background-color: #ff3a21;
}

.sdg-6 {
    background-color: #26bde2;
}

.sdg-7 {
    background-color: #fcc30b;
}

.sdg-8 {
    background-color: #a21942;
}

.sdg-9 {
    background-color: #fd6925;
}

.sdg-10 {
    background-color: #dd1367;
}

.sdg-11 {
    background-color: #fd9d24;
}

.sdg-12 {
    background-color: #bf8b2e;
}

.sdg-13 {
    background-color: #3f7e44;
}

.sdg-14 {
    background-color: #0a97d9;
}

.sdg-15 {
    background-color: #56c02b;
}

.sdg-16 {
    background-color: #00689d;
}

.sdg-17 {
    background-color: #19486a;
}

.is-hidden {
    display: none !important;
}

#eventModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10550;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    #eventModal.event-modal-open {
        display: flex !important;
    }

/* Calendar dates containing events */
.date-box.has-event-one {
    background-color: #002f58;
    color: #fff;
}

.date-box.has-event-two {
    background-color: #6db1e2;
    color: #fff;
}

.date-box.has-event-many {
    background-color: #f3b200;
    color: #fff;
}

/* Individual event blocks */
.calendar-event-block {
    background-color: #0055aa;
    color: #fff;
    padding: 2px 4px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.calendar-event-title {
    overflow-wrap: anywhere;
}

.calendar-event-more {
    font-size: 11px;
    color: #fff;
}

/* Event images */
.event-image {
    display: block;
    max-width: 75%;
    height: auto;
    margin: 10px 0;
}

.event-image-list {
    display: block;
    max-width: 250px;
    width: 100%;
    height: auto;
    margin: 10px 0;
}

#modalBody {
    background-color: #fff;
    color: #212529;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 25px;
    border-radius: 10px;
}

body.modal-open {
    overflow: hidden;
}



.admin-dashboard {
    --aou-navy: #00264d;
    --aou-blue: #093254;
    --aou-yellow: #f3b200;
    --aou-muted: #66758a;
    max-width: 1250px;
    margin: 0 auto;
    padding: 35px 24px;
    color: var(--aou-navy);
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 35px;
    padding: 28px 30px;
    border-left: 5px solid var(--aou-yellow);
    border-radius: 12px;
    background: #f4f7fb;
}

.dashboard-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #52677d;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.dashboard-heading h1 {
    margin: 0 0 10px;
    color: var(--aou-navy);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 750;
}

.dashboard-heading p {
    margin: 0;
    color: var(--aou-muted);
    line-height: 1.6;
}

.dashboard-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 82px;
    height: 82px;
    border: 2px solid var(--aou-yellow);
    border-radius: 50%;
    background: var(--aou-navy);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 290px;
    padding: 26px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgb(0 38 77 / 6%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .dashboard-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgb(0 38 77 / 12%);
    }

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    border-radius: 12px;
    font-size: 2rem;
    font-weight: 500;
}

.create-icon {
    background: #fff4cc;
    color: #795700;
}

.report-icon {
    background: #e8f0fb;
    color: var(--aou-navy);
}

.booking-icon {
    background: #e5f5ee;
    color: #176b49;
}

.card-content {
    flex: 1;
}

    .card-content h2 {
        margin: 0 0 12px;
        color: var(--aou-navy);
        font-size: 1.25rem;
        font-weight: 700;
    }

    .card-content p {
        margin: 0 0 24px;
        color: var(--aou-muted);
        font-size: 0.95rem;
        line-height: 1.8;
    }

.dashboard-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--aou-navy);
    border-radius: 8px;
    background: var(--aou-navy);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .dashboard-link:hover,
    .dashboard-link:focus-visible {
        border-color: var(--aou-yellow);
        background: var(--aou-yellow);
        color: var(--aou-navy);
    }

    .dashboard-link:focus-visible {
        outline: 3px solid #8bb8e8;
        outline-offset: 3px;
    }

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 35px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    color: var(--aou-muted);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .admin-dashboard {
        padding: 20px 12px;
    }

    .dashboard-heading {
        padding: 22px 18px;
    }

    .dashboard-mark {
        width: 58px;
        height: 58px;
        font-size: 0.95rem;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dashboard-card {
        min-height: 260px;
        padding: 22px;
    }

    .dashboard-footer {
        flex-direction: column;
    }
}



.event-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn-create-event {
    padding: 10px 22px;
    background: #00264d;
    border-color: #00264d;
    color: #fff;
    font-weight: 600;
}

    .btn-create-event:hover {
        background: #f3b200;
        border-color: #f3b200;
        color: #00264d;
    }

.register-card-header {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #00264d;
    color: #ffffff;
    border-radius: 0.375rem 0.375rem 0 0;
}

    .register-card-header h2,
    .register-card-header p {
        color: #ffffff;
    }

    .register-card-header h2 {
        margin-top: 0;
    }

@media (max-width: 480px) {
    .event-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .event-form-actions > * {
            width: 100%;
            text-align: center;
        }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-card,
    .dashboard-link {
        transition: none;
    }

        .dashboard-card:hover {
            transform: none;
        }
}


/* =========================
   EXTRA SMALL DEVICES
========================= */
@media (max-width: 480px) {

    .page-title {
        font-size: 1.3rem;
    }

    .custom-table {
        font-size: 0.75rem;
        min-width: 500px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem;
    }

    .custom-table {
        font-size: 0.75rem;
        min-width: 500px;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}