/* =========================================
   1. RESET & BASIC TYPOGRAPHY
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #111;
    color: #fff;
    overflow-x: hidden;
    
    /* STICKY FOOTER MAGIC */
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

h1, h2, h3 {
    font-weight: 300;
    margin-top: 0;
}

/* =========================================
   2. HEADER & LOGO
   ========================================= */
header {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    min-height: 80px; 
    background: transparent; 
    
    display: flex;
    align-items: center; 
    justify-content: flex-start; 
    gap: 30px; 
    
    padding: 15px 40px; 
    z-index: 9999; 
    pointer-events: none; 
}

header .logo, header .menu-icon {
    pointer-events: auto;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%; 
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.logo img {
    max-height: 60px; 
    width: auto;
    object-fit: contain; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); 
}

/* --- THE BLOOMING APERTURE ICON --- */
.menu-icon {
    cursor: pointer;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.4); 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    transform: translateZ(0); 
}

.menu-icon:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05); 
}

.menu-icon svg {
    width: 32px;
    height: 32px;
    display: block;
    overflow: visible;
}

/* THE BLADES ANIMATION */
.shutter-blades {
    transform-origin: 50px 50px;
    /* DEFAULT STATE: CLOSED */
    transform: rotate(25deg) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* HOVER STATE: OPEN */
.menu-icon:hover .shutter-blades {
    transform: rotate(0deg) scale(1);
}

/* ACTIVE STATE: SPIN */
.menu-icon.is-active .shutter-blades {
    transform: rotate(-90deg) scale(0.8);
    opacity: 0.8;
}

.menu-icon path {
    fill: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* =========================================
   3. OVERLAY MENU
   ========================================= */
.overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    background-color: rgba(15, 15, 15, 0.98); 
    overflow-x: hidden;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    text-align: center;
    opacity: 0; 
    transition: opacity 0.3s ease 0.2s; 
    width: 100%;
}

.overlay[style*="width: 100%"] .overlay-content {
    opacity: 1;
}

.overlay a {
    padding: 15px;
    text-decoration: none;
    font-size: 2.5rem;
    color: #888;
    display: block;
    transition: 0.3s;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.overlay a:hover {
    color: #fff;
    letter-spacing: 5px; 
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden; 
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0; 
    transform: translate(-50%, -50%);
    object-fit: cover; 
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; 
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    cursor: pointer;
}

.scroll-down span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    margin: -10px;
    animation: scrollAnimate 2s infinite;
}

.scroll-down span:nth-child(2) { animation-delay: -0.2s; }
.scroll-down span:nth-child(3) { animation-delay: -0.4s; }

@keyframes scrollAnimate {
    0% { opacity: 0; transform: rotate(45deg) translate(-20px, -20px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(20px, 20px); }
}

/* =========================================
   5. GALLERY GRID (Dynamic)
   ========================================= */
.gallery-grid {
    column-count: var(--cols, 3);
    column-gap: 20px;
    padding: 60px 40px 40px 40px; 
    background-color: #111;
    max-width: 100%;
    margin: 0 auto;
}

.photo-card {
    margin-bottom: 20px;
    break-inside: avoid; 
}

.photo-card img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    display: block;
    cursor: zoom-in; 
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-card img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Responsive Overrides */
@media screen and (max-width: 900px) {
    .gallery-grid { column-count: 2 !important; }
}
@media screen and (max-width: 600px) {
    .gallery-grid { column-count: 1 !important; padding: 20px; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* =========================================
   6. LIGHTBOX (FIXED)
   ========================================= */
#lightbox {
    position: fixed; /* Must be fixed to cover screen */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000; /* Ensure it is on top of everything */
    
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}

#lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

#lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem;
    font-weight: 100;
    cursor: pointer;
    z-index: 100001;
    line-height: 1;
}
#lightbox .close:hover {
    color: #ff4444;
}

/* =========================================
   7. TEXT PAGES & ADMIN
   ========================================= */
.text-page {
    padding-top: 140px;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
    min-height: 80vh;
}

.text-page h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    letter-spacing: 1px;
}

.text-page p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 20px;
}

.container { 
    max-width: 800px; 
    margin: 100px auto 50px; 
    padding: 0 20px;
}

input[type="text"], input[type="password"], input[type="file"] {
    width: 100%;
    padding: 12px;
    margin: 8px 0 20px 0;
    display: inline-block;
    border: 1px solid #444;
    background-color: #222;
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    background-color: #fff;
    color: #000;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}

button:hover {
    background-color: #ddd;
}

.delete-btn {
    background-color: #8b0000;
    color: #fff;
    padding: 8px 15px;
    font-size: 0.8rem;
}
.delete-btn:hover { background-color: #ff0000; }

.upload-section {
    background-color: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 40px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #222;
}

.list-item img {
    border-radius: 4px;
    object-fit: cover;
}

/* =========================================
   8. RESPONSIVE DESIGN
   ========================================= */
@media screen and (max-width: 900px) {
    /* Tablet */
}

@media screen and (max-width: 600px) {
    header {
        padding: 15px 20px;
        background: transparent; 
    }

    .overlay a {
        font-size: 1.8rem;
    }
    
    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .list-item form {
        width: 100%;
        text-align: right;
    }

    .hero-content h1 { font-size: 2rem; }
    .hero-section { height: 60vh; }
}