/* ===========================================================
   gallery.css — Modern Clean Theme
   =========================================================== */

/* --- Fonts & Vars --- */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-page: #f8fafc;        /* Slate 50 */
    --bg-card: #ffffff;        /* White */
    --accent-color: #0891b2;   /* Cyan 600 */
    --accent-hover: #0e7490;   /* Cyan 700 */
    --text-heading: #0f172a;   /* Slate 900 */
    --text-body: #334155;      /* Slate 700 */
    --text-muted: #64748b;     /* Slate 500 */
    --border-color: #e2e8f0;   /* Slate 200 */
    
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- Base & Grid --- */
body.gallery-page {
    background-color: var(--bg-page);
    font-family: var(--font-body);
    color: var(--text-body);
    margin: 0;
    overflow-x: hidden;
}

/* Hide Old Overlay */
.cyber-grid-overlay {
    display: none;
}

.gallery-main-content {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto 4rem auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* --- Hero Section --- */
.gallery-hero {
    text-align: center;
    padding: 4rem 1rem 3rem 1rem;
    margin-bottom: 2rem;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-heading);
    text-shadow: none;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.hero-title .blink {
    color: var(--accent-color);
    animation: none; /* Stop blinking */
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* --- Controls (Inputs) --- */
.gallery-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.control-group {
    width: 100%;
    max-width: 350px;
}

.cyber-input-wrapper, .cyber-select-wrapper {
    position: relative;
    width: 100%;
}

.cyber-input-wrapper i, .cyber-select-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8; /* Slate 400 */
    z-index: 2;
}

input, select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 12px 15px 12px 40px;
    color: var(--text-heading);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    border-radius: 8px; /* Rounded corners */
    clip-path: none; /* Removed polygon */
}

input:focus, select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

select option {
    background: #fff;
    color: var(--text-heading);
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

/* Hide HUD Corners */
.hud-corner { display: none; }

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-color);
}

.gallery-thumbnail {
    width: 100%;
    height: 260px;
    object-fit: cover;
    filter: none; /* Full color */
    transition: transform 0.5s ease;
}

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

/* Overlay */
.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    padding: 24px 20px 20px 20px;
    transform: translateY(0); /* Always show gradient slightly? or keep hidden */
    opacity: 0;
    transition: opacity 0.3s ease;
    border-top: none;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-content h3 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    color: #fff;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.overlay-content p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

.gallery-category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--accent-color);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px; /* Pill shape */
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 5;
}

/* --- Featured Item --- */
.featured-image-section { margin-bottom: 4rem; }
.featured-item {
    border: none;
    grid-column: 1 / -1;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
}
.featured-item .gallery-thumbnail { height: 500px; }
.featured-item .gallery-item-overlay { 
    opacity: 1; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 10%, transparent 100%); 
}
.featured-label {
    position: absolute;
    top: 20px; left: 20px;
    background: var(--accent-color);
    color: #fff;
    font-weight: 600;
    padding: 6px 14px;
    z-index: 10;
    font-family: var(--font-body);
    border-radius: 6px;
    clip-path: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- Pagination --- */
.pagination-container {
    margin-top: 4rem;
    text-align: center;
    position: relative;
}
.pagination-hud-line {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 30px;
    opacity: 1;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}
.pagination-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--text-body);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 8px; /* Standard rounded */
    clip-path: none;
}
.pagination-link:hover {
    background: #f1f5f9;
    color: var(--accent-color);
    border-color: #cbd5e1;
    box-shadow: none;
}
.pagination-link.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 4px 6px rgba(8, 145, 178, 0.25);
}
.nav-btn {
    width: auto;
    padding: 0 16px;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.95); /* Slate 900 overlay */
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-content {
    max-width: 90vw;
    display: flex; flex-direction: column; align-items: center;
    z-index: 2;
}

.lightbox-frame {
    position: relative;
    padding: 0;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.lightbox-frame img {
    max-height: 80vh;
    max-width: 100%;
    display: block;
}

/* Hide Frame Decor */
.frame-decor { display: none; }

.lightbox-caption {
    margin-top: 20px;
    text-align: center;
    color: #fff;
    font-family: var(--font-body);
}

.lightbox-actions .cyber-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    transition: 0.2s;
    border-radius: 50px;
}
.lightbox-actions .cyber-btn:hover {
    background: #fff;
    color: #000;
}

.lightbox-close, .lightbox-nav {
    position: absolute;
    color: rgba(255,255,255,0.7);
    background: transparent;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.lightbox-close:hover, .lightbox-nav:hover { color: #fff; }

.lightbox-close { top: 30px; right: 30px; }
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

/* --- Mobile --- */
@media (max-width: 768px) {
    .gallery-hero { padding: 3rem 1rem 2rem 1rem; }
    .hero-title { font-size: 2rem; }
    .featured-item .gallery-thumbnail { height: 300px; }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-nav {
        font-size: 1.5rem;
        background: rgba(0,0,0,0.3);
        padding: 10px;
        border-radius: 50%;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}