/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --color-primary: #fd904d;
    --color-primary-dark: #e67d3a;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray-100: #f8f9fa;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-600: #6c757d;
    --color-gray-800: #343a40;
    --color-gray-900: #212529;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Borders */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-gray-900);
    background-color: var(--color-white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Header */
.main-header {
    background: #000;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    text-decoration: none;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-white);
}

.logo-sub {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}

.nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-white);
}

/* Hero */
.page-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1553413077-190dd305871c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 150px 0 80px;
    margin-top: 80px;
    text-align: center;
}

.page-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: white;
    font-family: var(--font-heading);
}

.page-hero p {
    font-size: 1.2rem;
    color: #dee2e6;
    max-width: 600px;
    margin: 0 auto;
}

.highlight {
    color: #fd904d;
}

/* Gallery Controls */
.gallery-controls {
    padding: 3rem 0 1.5rem;
    background-color: #f8f9fa;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.search-box i {
    color: #6c757d;
    font-size: 1.2rem;
    margin-right: 10px;
}

#search-input {
    flex: 1;
    padding: 15px 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #212529;
    outline: none;
}

#search-input::placeholder {
    color: #6c757d;
}

.clear-btn {
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.2s;
    display: none;
}

.clear-btn:hover {
    color: #6c757d;
}

.clear-btn.visible {
    display: block;
}

.search-results {
    text-align: center;
    margin-top: 10px;
    color: #6c757d;
    font-size: 0.9rem;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn i {
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: #fd904d;
    color: #fd904d;
}

.filter-btn.active {
    background: #fd904d;
    border-color: #fd904d;
    color: white;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #495057;
}

#sort-select {
    padding: 8px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

#sort-select:focus {
    border-color: #fd904d;
    outline: none;
}

/* Masonry Grid */
.gallery-main {
    padding: 3rem 0;
}

.masonry-grid {
    column-count: 4;
    column-gap: 1rem;
    margin-bottom: 2rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.media-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-video, 
.media-container img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.masonry-item:hover .media-overlay {
    opacity: 1;
}

.play-button, .zoom-button {
    align-self: flex-end;
    width: 50px;
    height: 50px;
    background: #fd904d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
    border: none;
}

.play-button:hover, .zoom-button:hover {
    transform: scale(1.1);
    background: #e67d3a;
}

.media-info {
    color: white;
}

.media-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: white;
    font-family: var(--font-heading);
}

.media-info p {
    font-size: 0.9rem;
    color: #dee2e6;
    margin-bottom: 5px;
}

.media-duration {
    font-size: 0.8rem;
    color: #adb5bd;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.media-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Loading and Results States */
.loading-indicator {
    text-align: center;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #dee2e6;
    border-top-color: #fd904d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-results i {
    color: #adb5bd;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* Lightbox Modals */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-content {
    background: white;
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2001;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-media {
    position: relative;
    background: black;
}

#lightbox-video,
#lightbox-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-info {
    padding: 1.5rem;
    background: white;
}

.lightbox-info h3 {
    color: #212529;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.lightbox-info p {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Video Controls */
.video-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
}

.control-btn {
    background: white;
    border: 1px solid #dee2e6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #495057;
}

.control-btn:hover {
    background: #fd904d;
    border-color: #fd904d;
    color: white;
}

.time-display {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: center;
}

#progress-bar {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #dee2e6;
    border-radius: 3px;
    outline: none;
}

#progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fd904d;
    border-radius: 50%;
    cursor: pointer;
}

/* Image Navigation */
.image-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.nav-btn {
    background: #f8f9fa;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    color: #495057;
}

.nav-btn:hover {
    background: #fd904d;
    color: white;
}

#image-counter {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #495057;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #fd904d;
    color: white;
}

.btn-primary:hover {
    background-color: #e67d3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1rem;
}

.text-center {
    text-align: center;
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.cta-section p {
    font-size: 1.1rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.main-footer {
    background-color: #000;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1;
    margin-bottom: 1rem;
}

.footer-logo span:first-child {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.footer-logo span:last-child {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #fd904d;
    margin-top: 2px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fd904d;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    .masonry-grid {
        column-count: 3;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        gap: 0;
        flex-direction: column;
        background-color: #000;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
    }
    
    .nav-item {
        margin: 16px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .sort-container {
        justify-content: center;
    }
    
    .lightbox-content {
        max-width: 95%;
    }
    
    .page-hero h1 {
        font-size: 2.5rem;
    }
    
    .cta-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .masonry-grid {
        column-count: 1;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .page-hero {
        padding: 120px 0 60px;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
}