/* ================= GALLERY CSS - LANDO STYLE ================= */
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #ff6200;
    --primary-neon: #ff6200;
    /* Electric Orange */
    --bg-dark: #000000;
    --bg-secondary: #080808;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ================= STANDARD HEADER STYLES ================= */
.title {
    width: 100%;
    /* Background image set inline in HTML */
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2vw;
}

.topphoto {
    background-image: url('/Home/images/cool-background1.png');
    background-repeat: no-repeat;
    background-size: 100%;
    height: 390px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2vw;
}

.head1 {
    color: #ff4d00;
    opacity: 1;
    font-family: Anton, sans-serif;
    font-size: clamp(6rem, 12vw, 10rem);
    margin-left: 5vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    max-height: 280px;
}

.head2 {
    color: aliceblue;
    opacity: 0.8;
    font-family: Anton, sans-serif;
    font-size: clamp(1.5rem, 4vw, 5rem);
    margin-left: 8vw;
    transform: translate(0, -2vw);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    max-height: 280px;
}

@media (max-width: 768px) {
    .title {
        align-items: center;
        text-align: center;
    }

    .head1 {
        font-size: clamp(3rem, 10vw, 8rem);
        margin-left: 0;
    }

    .head2 {
        font-size: clamp(1.2rem, 3.5vw, 4rem);
        margin-left: 0;
        transform: translate(0, -1vw);
    }
}

.separator-white {
    width: 80%;
    height: 3px;
    background: white;
    margin: 20px auto;
    border-radius: 2px;
}

/* ================= GALLERY SECTION ================= */
.gallery-section {
    background: #000000;
    min-height: 100vh;
    padding: 40px 20px 80px;
    position: relative;
    z-index: 2;
}

.section-header-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-neon);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.section-header {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    font-weight: 300;
}

/* ================= CATEGORY TABS - PILL STYLE ================= */
.gallery-tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    padding: 20px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 40px;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: 50px;
    /* Full Pill */
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.tab-btn span {
    position: relative;
    z-index: 2;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--primary-neon);
    z-index: 0;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tab-btn:hover {
    color: #fff;
    border-color: var(--primary-neon);
}

.tab-btn.active {
    border-color: var(--primary-neon);
    color: #000;
    /* Black text on neon background */
}

.tab-btn.active::before {
    width: 100%;
}

.tab-btn.active i {
    opacity: 1;
}

/* Filter Display */
.filter-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 50px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-label {
    color: var(--text-muted);
}

.filter-current {
    color: var(--primary-neon);
    font-weight: 700;
}

.filter-count {
    color: var(--text-muted);
    font-weight: 400;
}

/* ================= PINTEREST MASONRY GRID ================= */
.pinterest-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 24px;
}

.masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    /* Fix flex overflow */
}

.pin-item {
    display: block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 24px;
    border-radius: 12px;
    /* Less rounded for rougher look */
    overflow: hidden;
    background: #111;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 1;
    transform: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Slight border */
    will-change: transform, opacity;
}

.pin-item.hidden {
    display: none;
}

.pin-item.in-view {
    /* Optional: keep for JS triggering opacity/transform if we add hidden class via JS */
    opacity: 1;
    transform: none;
}

.pin-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition-duration: 0.3s;
    /* Faster hover */
    transition-delay: 0s !important;
}

.pin-image-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    /* Prevent collapse during lazy load */
    background-color: #1a1a1a;
}

.pin-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
    filter: brightness(0.9) grayscale(20%);
    /* Moodier look */
}

.pin-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) grayscale(0%);
}

/* Pin Actions */
.pin-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 10;
}

.pin-item:hover .pin-actions {
    opacity: 1;
    transform: translateX(0);
}

.pin-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pin-action-btn:hover {
    background: var(--primary-neon);
    color: #000;
    border-color: var(--primary-neon);
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(255, 98, 0, 0.5);
}

.pin-action-btn:active {
    transform: scale(0.95);
}

/* Pin Info */
.pin-info {
    display: none;
}

.pin-item:hover .pin-info {
    opacity: 1;
    transform: translateY(0);
}

.pin-category {
    display: none;
}

.pin-comp {
    display: block;
    font-size: 1rem;
    color: white;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Custom Drone Icon */
/* Quadcopter Design - Top View */
.icon-drone {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    background-color: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="12" r="3"/><path d="M19 5L15 9M5 5L9 9M19 19L15 15M5 19L9 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="4" cy="4" r="2.5"/><circle cx="20" cy="4" r="2.5"/><circle cx="4" cy="20" r="2.5"/><circle cx="20" cy="20" r="2.5"/></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="12" r="3"/><path d="M19 5L15 9M5 5L9 9M19 19L15 15M5 19L9 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="4" cy="4" r="2.5"/><circle cx="20" cy="4" r="2.5"/><circle cx="4" cy="20" r="2.5"/><circle cx="20" cy="20" r="2.5"/></svg>') no-repeat center;
    background-size: contain;
}

/* Featured item styling */
.pin-item.featured {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

.pin-item.featured:hover {
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(255, 215, 0, 0.3);
}

/* Hidden Items */
.pin-item.hidden {
    display: none;
}

/* ================= BACK TO TOP BUTTON ================= */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 30px rgba(255, 98, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 500;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(255, 98, 0, 0.5);
}

/* ================= ENHANCED LIGHTBOX ================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(30px);
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lightbox-header {
    background: transparent;
    pointer-events: none;
    /* Let clicks pass through header area */
    padding: 0;
    height: 0;
    /* Remove height impact */
}

.lightbox-counter {
    position: fixed;
    top: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    z-index: 10001;
    pointer-events: auto;
}

.lightbox-counter span:first-child {
    color: var(--primary);
    font-weight: 700;
}

.lightbox-actions {
    display: contents;
    /* Remove container impact */
}

/* Specific styling for Close Button to be prominent */
#lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.5rem;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.3s ease;
}

#lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lightbox-content {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    object-fit: contain;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

.lightbox-loader {
    position: absolute;
    display: none;
}

.lightbox-loader.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Lightbox Navigation - Move to sides */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 20;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
    border-color: var(--primary);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-footer {
    position: absolute;
    bottom: 90px;
    /* Above thumbnails */
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass through */
    width: 100%;
    display: flex;
    justify-content: center;
}

.lightbox-caption {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

/* Thumbnail Strip - Refined */
.lightbox-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    padding: 10px 0;
    display: flex;
    gap: 8px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 30;
}

.lightbox-thumbnails::-webkit-scrollbar {
    display: none;
}

.lightbox-thumb {
    width: 60px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-thumb:hover {
    opacity: 0.8;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 98, 0, 0.4);
}

/* ================= ANIMATIONS ================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 1s ease-out forwards;
}

html {
    scroll-behavior: smooth;
}

/* ================= BACK TO TOP ================= */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-neon);
    border-color: var(--primary-neon);
    color: black;
    transform: translateY(-5px);
}

/* ================= BACK TO TOP ================= */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 98, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 98, 0, 0.6);
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 1400px) {
    .pinterest-grid {
        column-count: 3;
        column-gap: 20px;
    }
}

@media (max-width: 1024px) {
    .pinterest-grid {
        column-count: 3;
        column-gap: 16px;
        padding: 0 20px;
    }

    .pin-item {
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .hero-stats {
        gap: 0;
        /* Bento stays joined */
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .lightbox-image-container {
        padding: 80px 80px;
    }
}

@media (max-width: 768px) {
    .pinterest-grid {
        column-count: 2;
        column-gap: 12px;
        padding: 0 15px;
    }

    .pin-item {
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .gallery-tabs {
        gap: 8px;
        padding: 0 15px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.75rem;
        border-radius: 50px;
    }

    .tab-btn span {
        display: inline;
        /* Keep text visible */
    }

    .hero-stats {
        gap: 0;
        flex-wrap: wrap;
        width: 90%;
    }

    .stat-item {
        flex: 1;
        /* Distribute evenly */
        padding: 15px 10px;
    }

    .stat-divider {
        display: block;
        /* Keep dividers */
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.55rem;
    }

    .scroll-indicator {
        margin-top: 60px;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-image-container {
        padding: 70px 60px;
    }

    .lightbox-header {
        padding: 15px 20px;
    }

    .lightbox-action-btn {
        width: 40px;
        height: 30px;
    }

    .back-to-top {
        bottom: 90px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .gallery-section {
        padding: 60px 2% 100px;
    }

    .pin-info {
        padding: 12px 14px;
    }

    .pin-category {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .featured-badge {
        padding: 4px 10px;
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .pinterest-grid {
        column-count: 2;
        column-gap: 10px;
        padding: 0 12px;
    }

    .pin-item {
        margin-bottom: 10px;
        border-radius: 12px;
    }

    .pin-action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .tab-btn {
        padding: 10px 14px;
    }

    .section-header-container {
        margin-bottom: 40px;
    }

    .section-description {
        display: none;
    }

    .filter-display {
        font-size: 0.8rem;
    }

    .lightbox-image-container {
        padding: 60px 15px;
    }

    .lightbox-thumbnails {
        padding: 10px 15px;
    }

    .lightbox-thumb {
        width: 50px;
        height: 38px;
    }

    .hero-title {
        font-size: clamp(3.5rem, 15vw, 8rem);
    }

    .hero-badge {
        padding: 8px 18px;
        margin-bottom: 30px;
    }

    .hero-badge span {
        font-size: 0.7rem;
    }
}

/* Focus states for accessibility */
.tab-btn:focus-visible,
.pin-item:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-action-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}