/* styles.css */
:root {
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    --dark-bg: #111827;
    --dark-blue: rgb(18, 24, 38);
    --text-dark: rgb(4, 12, 43);
    --text-light: #fff;
    --z-bg: -1;
    --z-tab-content: 5002;
    --z-tabs: 6000;
    --z-panel: 4000;
    --z-top: 9999;
}

@keyframes bgFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes blrFadeIn {
    0% { filter: blur(0); }
    100% { filter: blur(35px); }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: var(--z-bg);
    background-size: 118% auto;
    background-image: linear-gradient(135deg, rgba(177, 190, 229, 0.6), rgba(200, 180, 220, 0.5)), url("./images/hero.jpg");
    background-position: center 35%;
    background-repeat: no-repeat;
    animation: blrFadeIn 1s ease-in forwards;
}

body {
    margin: 0;
    display: flex;
    background-color: transparent;
}

.top-bar,
.top-tabs {
    font-family: var(--font-family);
    animation: bgFadeIn 1s ease-in forwards;
}

.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 72px;
    background-color: var(--dark-bg);
    text-align: left;
    z-index: var(--z-top);
}

.top-bar .logo {
    padding: 0;
    font-size: 24px;
    color: var(--text-light);
    font-family: "helvetica-neue", sans-serif;
    text-decoration: none;
    z-index: var(--z-top);
}

.top-bar-title {
    display: inline-block;
    color: var(--text-light);
    font-size: 24px;
    font-weight: bold;
    margin-left: 8px;
    vertical-align: middle;
    text-decoration: none;
}

.top-bar .logo img {
    height: 64px;
    width: auto;
    vertical-align: middle;
    margin-left: 10px;
}

.top-tabs {
    position: fixed;
    top: 84px;
    left: 0.25%;
    z-index: var(--z-tabs);
    user-select: none;
    }    

.top-tabs .tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--dark-bg);
    font-weight: 600;
    font-size: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
    z-index: 5001;
}

.top-tabs .tab:hover,
.top-tabs .tab.active,
.top-tabs .tab[aria-selected="true"] {
    background: var(--dark-bg);
    color: var(--text-light);
}

/* Panels for the main tabs */
.tab-panel {
    position: fixed;
    inset: 0;
    z-index: var(--z-panel);
    width: 100%;
    animation: bgFadeIn 1.5s ease-in forwards;
    --turtle-image: none;
    background-repeat: no-repeat;
    background-position: right 2% bottom 25%;
    background-size: 18%;
    background-color: transparent;
}

.tab-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--turtle-image);
    background-repeat: inherit;
    background-position: inherit;
    background-size: inherit;
    opacity: 0.65;
    pointer-events: none;
    z-index: 1;
}

.tab-panel > p {
    position: relative;
    z-index: 2;
}

.tab-panel p {
    position: relative;
    width: 100%;
    height: 100%;
    color: var(--text-dark);
    font-family: var(--font-family);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    white-space: pre-wrap;
    background: transparent;
    box-sizing: border-box;
    z-index: var(--z-tab-content);
    opacity: 1;
    transition: opacity 0.25s ease;
    overflow-y: auto;
    padding-bottom: 80px;
}

.tab-panel p.fade-out {
    opacity: 0;
    pointer-events: none;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: var(--z-tab-content);
    transition: opacity 0.25s ease;

}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.report-btn {
    position: fixed;
    right: 24px;
    bottom: 70px;
    padding: 14px 22px;
    background: #dc2626;
    color: #fff;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: var(--z-top);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.report-btn:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 0 0 0 1%;
    background: var(--dark-blue);
    color: var(--text-light);
    font-family: var(--font-family);
    z-index: var(--z-top);
}

.hidden {
  display: none;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        background-image: none;
        background-size: 200% auto;
        background-attachment: scroll;
    }

    body::before {
        background-image: linear-gradient(135deg, rgba(177, 190, 229, 0.6), rgba(200, 180, 220, 0.5));
    }

    .top-bar {
        height: 52px;
        padding: 6px 0;
        display: flex;
        align-items: center;
    }

    .top-bar .logo img {
        height: 36px;
        margin-left: 8px;
    }

    .top-bar-title {
        font-size: 18px;
        margin: 0;
    }

    .top-tabs {
        top: 52px;
        left: 0;
        width: 100%;
        padding: 5px 7px;
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .top-tabs [role="tablist"] {
        display: flex;
        flex-wrap: nowrap;
        gap: 3px;
    }

    .top-tabs .tab {
        margin-right: 0;
        padding: 6px 8px;
        font-size: 23px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tab-panel {
        position: fixed;
        top: 100px;
        bottom: 48px;
        height: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background-position: center 40%;
        background-size: 35%;
        background-repeat: no-repeat;
        
    }

    .tab-panel p {
        position: static;
        width: auto;
        height: auto;
        padding: 20px;
        margin: 0;
        font-size: 16px;
        line-height: 1.6;
        white-space: pre-line;
        background: transparent;
        overflow-y: visible;
        padding-bottom: 20px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 20px;
        height: auto;
    }

    .report-btn {
        right: 8px;
        bottom: 54px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .bottom-bar {
        padding: 8px;
        height: auto;
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    .bottom-bar img {
        height: 0;
        width: 0;
        display: none;
    }
}

@media (max-width: 480px) {
    .top-bar {
        height: 44px;
        padding: 4px 0;
    }

    .top-bar .logo img {
        height: 30px;
    }

    .top-bar-title {
        font-size: 15px;
    }

    .top-tabs {
        top: 44px;
        padding: 10px 4px;
    }

    .top-tabs .tab {
        padding: 4px 6px;
        font-size: 15px;
    }

    .tab-panel {
        top: 84px;
        bottom: 40px;
    }

    .tab-panel p {
        padding: 16px;
        font-size: 15px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .report-btn {
        right: 8px;
        bottom: 64px;
        padding: 8px 14px;
        font-size: 13px;
    }

    .bottom-bar {
        padding: 4px;
        min-height: 32px;
    }

    .hidden {
    display: none;
    }
}
