:root {
    font-family: Inter, sans-serif;
    --primary-color: #8BCC00;
    --neutral-color-1: #000000; /* pitch black */
    --neutral-color-2: #1F1F1F;
    --text-color-primary: #EBEBEB;
    --text-color-secondary: #c2c2c2;
    --text-color-tertiary: #999999;
    --line-height: 1.5;
}

/* General Body and Typography */
body {
    align-items: center;
    margin: 0;
    background-color: var(--neutral-color-1);
    color: var(--text-color-primary);
    width: 100%;
    overflow-x: hidden;
}
main{margin: 144px 64px;}

.text{
    margin: 144px;
    padding: 0 144px;
    text-align: justify;
}
.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.container img{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#hero-img {
    aspect-ratio: 90 / 41;
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    object-fit: cover;
}
section{margin: 96px 24px;}

#image-gallery{display: grid;
    grid-template-columns:repeat(2, 2fr);
    gap: 1rem;
    margin-top: 24px;
}
#image-gallery img{
    border-radius: 4px;
    aspect-ratio: 1.618/1;
    width: 100%;
    height: auto;
    object-fit: cover;
}
/* Fullscreen Image Viewer Styling for Images in alok-atolia.html */
.image-container {
    position: relative; 
    aspect-ratio: 1.618 / 1; 
    border-radius: 0.5rem; 
    overflow: hidden; 
    cursor: pointer;
}

.image-container img {
    display: block; 
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.3s ease-in-out; 
}

/* Hover Effect for Image to Scale */
.image-container:hover img {
    transform: scale(1.1); 
}

/* Fullscreen Overlay Settings for Image View */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1); 
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 1000; 
    padding: 20px; 
    box-sizing: border-box;
}

.fullscreen-image {
    max-width: 90%; 
    max-height: 90%;
    object-fit: contain; 
    box-shadow: 0 0 25px rgba(0,0,0,0.5); 
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease-in-out;
    z-index: 1002; 
}

.fullscreen-close svg { 
    width: 24px; 
    height: 24px; 
    display: block; 
}

.fullscreen-close:hover {
    color: #bbb; 
}

/* In-place zoom styling */
.image-zoomed {
    position: fixed;
    top: 80px;
    left: 80px;
    right: 80px;
    bottom: 80px;
    width: calc(100vw - 160px);
    height: calc(100vh - 160px);
    object-fit: contain;
    z-index: 1000;
    cursor: zoom-out;
    transition: all 0.3s ease-in-out;
}

.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
}

/* Pointer cursor for images */
.container img {
    cursor: pointer;
}

.container img:hover {
    cursor: pointer;
}

/* Navigation buttons styling for zoomed images */
.fullscreen-nav {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease-in-out;
}

.fullscreen-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    /* Reduce main margins on mobile */
    main {
        margin: 72px 24px;
    }
    
    /* Stack gallery images in single column on mobile */
    #image-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 16px;
    }
    
    /* Adjust hero image margins */
    #hero-img {
        margin: 32px 0;
    }
    
    /* Reduce section margins */
    section {
        margin: 48px 16px;
    }
    
    /* Adjust fullscreen overlay padding */
    .fullscreen-overlay {
        padding: 10px;
    }
    
    /* Adjust fullscreen image size on mobile */
    .fullscreen-image {
        max-width: 95%;
        max-height: 95%;
    }
    
    /* Adjust close button position */
    .fullscreen-close {
        top: 15px;
        right: 15px;
    }
    
    /* Adjust navigation button size on mobile */
    .fullscreen-nav {
        width: 40px;
        height: 40px;
    }
}

/* Further optimization for medium-small devices */
@media (max-width: 600px) {
    main { margin: 72px 20px; }
    #hero-img { aspect-ratio: 5/3; border-radius: 10px; }
    #image-gallery { gap: 1.25rem; }
    section { margin: 40px 12px; }
}

/* Small phones */
@media (max-width: 480px) {
    main { margin: 64px 16px; }
    #hero-img { aspect-ratio: 4/3; border-radius: 8px; }
    #image-gallery { gap: 1rem; }
    section { margin: 36px 8px; }
    .fullscreen-close { top: 10px; right: 10px; font-size: 32px; }
    .image-zoomed { top: 56px; left: 16px; right: 16px; bottom: 32px; width: auto; height: auto; }
}

/* Very small devices */
@media (max-width: 360px) {
    main { margin: 56px 12px; }
    #hero-img { aspect-ratio: 1/1; }
    #image-gallery { gap: 0.75rem; }
}

/* Disable hover-only effects on touch devices to prevent sticky states */
@media (hover: none) {
    .image-container:hover img { transform: none; }
    .image-container:active img { transform: scale(1.05); }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
