/* --- Imports & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400&display=swap');

:root {
    --primary-green: #1a3c34;
    --secondary-green: #2d5a4e;
    --gravel-dark: #2f3640;
    --gravel-light: #718093;
    --velvet-touch: #c23616;
    --lily-pad: #44bd32;
    --soft-white: #f5f6fa;
    --glass-bg: rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--gravel-dark);
    /* Subtle noise texture for "Gravel" feel */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/rect%3E%3C/svg%3E");
    font-family: 'Lato', sans-serif;
    color: var(--soft-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Header & Nav --- */
header {
    /* Use black gradient/color behind the banner for a clean top margin */
    background: linear-gradient(to bottom, #000000, rgba(0,0,0,0.8));
    padding-bottom: 5px; /* Space between banner and nav */
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Style for the banner image container */
.header-banner-container {
    padding: 10px 0;
}

.header-banner {
    /* The banner image itself (assume it's in static/assets/) */
    max-width: 100%;
    height: auto;
    /* Increase banner size by 20% (120% total) */
    transform: scale(1.2); 
    transform-origin: top center;
}

nav {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-bottom: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* PURE CSS NAVIGATION BUTTONS (Retained) */
.nav-btn {
    /* Dark Green Gradient */
    background: linear-gradient(145deg, var(--secondary-green), var(--primary-green));
    color: #e1e1e1;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.1em;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3), inset 0 0 5px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--lily-pad);
    color: white;
}

/* --- Layout Container --- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

/* --- Slideshow Stage --- */
.theater-stage {
    display: flex;
    align-items: flex-start; /* Align stage elements to the top */
    justify-content: center;
    gap: 15px; 
    width: 100%;
    max-width: 1400px;
}

/* Container for Controls and Timer */
.side-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 150px;
    padding-top: 20px; /* Offset to align buttons with image top */
}

/* The Image Frame */
#slideshow-container {
    position: relative;
    width: 900px; 
    max-width: 80%;
    aspect-ratio: 16 / 9; 
    background: #000;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    overflow: hidden;
    border: 1px solid #444;
}

/* Fullscreen Override (Retained) */
#slideshow-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
    border: none;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: opacity 1s ease-in-out;
}

/* --- NEW INFO BOX BELOW IMAGE --- */
.info-box-below {
    width: 80%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 8px 8px;
    padding: 15px 20px;
    margin-top: -8px; /* Pulls it up slightly to overlap the shadow */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-box-below h2 {
    font-family: 'Playfair Display', serif;
    margin: 0;
    color: var(--soft-white);
    font-size: 1.8em;
}

.info-box-below p {
    margin: 5px 0 0;
    color: #ccc;
    font-style: italic;
}

/* --- Controls (Prev/Next/Timer) --- */
.control-btn-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn { /* Velvet/Lily Pad style retained */
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #444, #222);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(0,0,0,0.5), inset 0 2px 5px rgba(255,255,255,0.1);
    transition: all 0.2s ease;
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    color: #888;
    user-select: none;
}

.control-btn:hover {
    background: radial-gradient(circle at 30% 30%, var(--velvet-touch), #800);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--velvet-touch);
}

/* GRID */
.grid-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.result-card {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #333;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--velvet-touch, #555);
}

.card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-info {
    padding: 12px;
}

.card-info h3 {
    font-size: 1rem;
    margin: 0;
}

.card-meta {
    font-size: 0.8rem;
    color: #888;
}

.result-card-link {
    text-decoration: none;
    color: inherit;
}

/* --- Tool Bar (Fullscreen / Pause) --- */
.toolbar {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
    /* Use a transparent background for the toolbar */
    background: rgba(0, 0, 0, 0.3); 
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0.8; 
    transition: opacity 0.3s;
}

/* Rest of the styles are unchanged (search, upload, etc.) */