/* --- 1. GLOBAL SETTINGS & ACCESSIBILITY --- */
:root {
    --bg-main: #ffffff;
    --text-primary: #1a1a1a;    /* High contrast near-black */
    --text-secondary: #4a4a4a;  /* Readable medium gray */
    --accent-red: #d63031;
    --glass-overlay: rgba(0, 0, 0, 0.88); /* Darker for better text pop */
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

/* --- 2. HEADER & LOGO --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.logoContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.BEN {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.icon {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: 0.3s;
    text-decoration: none;
}

.icon:hover {
    background-color: var(--text-primary);
    color: #fff;
    transform: scale(1.1);
}

/* --- 3. TYPOGRAPHY (The Contrast Fix) --- */
.lettersContainer {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.headerText {
    display: block;
    margin-bottom: 12px;
}

.text1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.text2 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.text3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 20px;
    color: var(--accent-red);
}

/* --- 4. THE GALLERY GRID --- */
.imageContainer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 25px;
    padding: 10px;
}

.imageDiv {
    position: relative;
    width: 100% !important;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.imageDiv:hover {
    transform: translateY(-8px);
}

.imageDiv img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Counter Badge */
.counter, .dynamicCounter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.2);
}

/* --- 5. POPUP & MODAL UI --- */
.overlay {
    position: fixed;
    inset: 0;
    background: var(--glass-overlay);
    backdrop-filter: blur(15px);
    z-index: 1000;
}

.popup {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup .childContainer {
    width: 100%;
    height: 80vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.popupImage img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* --- 6. FLOATING ACTION TOOLBAR --- */
.clickable {
    position: fixed;
    bottom: 40px;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    transition: 0.2s;
    z-index: 1010;
}

.clickable p {
    margin: 0;
    font-weight: 900;
    font-size: 1.2rem;
}

.clickable:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: #fff;
    transform: translateY(-5px);
}

/* Positioning the Icons in a Row */
.close { left: calc(50% - 120px); }
.story { left: calc(50% - 40px); }
.vote { left: calc(50% + 40px); }
.comment { left: calc(50% + 120px); }

/* --- 7. STORY & COMMENT PANELS --- */
.fullstorysegment {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2000;
    padding: 60px 20px;
    overflow-y: auto;
}

.storyText p {
    font-size: 1.25rem;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.exp {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    color: #000;
    max-width: 500px;
}

.hastag div {
    background: #000;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 600;
}

/* --- 8. UTILITIES --- */
.hidepopup, .hideoverlay, .none {
    display: none !important;
}

/* --- 9. MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .imageContainer {
        grid-template-columns: 1fr 1fr; /* Two columns on mobile */
        gap: 12px;
    }

    .text1 { font-size: 1.4rem; }

    .clickable {
        bottom: 20px;
        width: 45px;
        height: 45px;
    }

    .close { left: 10%; }
    .story { left: 33%; }
    .vote { left: 56%; }
    .comment { left: 79%; }
}
