:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #00c6ff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    /* Fix for mobile viewport height */
    min-height: -webkit-fill-available;
}

/* Navigation */
.navbar {
    background-color: var(--bg-secondary);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

/* Yellow highlight line for active page */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FFD700; /* Yellow color */
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.nav-menu a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-menu a.active::after {
    transform: scaleX(1);
    background-color: #FFD700;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

/* Hamburger Animation */
.hamburger.active {
    background-color: transparent;
}

.hamburger.active::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger.active::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Hero Section */
.hero {
    height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('placeholder-hero.jpg');
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Text Wrapper Section */
.text-wrapper {
    max-width: 1820px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.8;
}

.text-wrapper p {
    font-size: 1.1rem;
    margin: 0 auto;
    max-width: 100%;
}

/* Add some subtle animation */
.text-wrapper {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 1600px) {
    .text-wrapper {
        max-width: 75%;
    }
}

@media (max-width: 1200px) {
    .text-wrapper {
        max-width: 85%;
    }
    .text-wrapper p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .text-wrapper {
        margin: 3rem auto;
        max-width: 90%;
    }
    
    .text-wrapper p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

/* Gallery Container */
.gallery-container {
    max-width: 1800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 3/2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-caption .default-caption {
    background: rgba(0, 0, 0, 0.3);
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.3rem;
    line-height: 1.2;
}

.gallery-caption .hover-caption {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Desktop - mouse hover only */
@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover .gallery-caption .hover-caption {
        transform: translateY(0);
    }
    
    /* Disable tap behavior on desktop */
    .gallery-caption .hover-caption.show-on-tap {
        transform: translateY(100%);
    }
}

/* Mobile - tap only */
@media (hover: none), (pointer: coarse) {
    /* Disable hover effect on mobile */
    .gallery-item:hover .gallery-caption .hover-caption {
        transform: translateY(100%);
    }
    
    /* Enable tap behavior */
    .gallery-caption .hover-caption.show-on-tap {
        transform: translateY(0) !important;
    }
}

.gallery-caption .hover-caption h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.gallery-caption .hover-caption p {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

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

/* Responsive adjustments */
@media (max-width: 1800px) {
    .gallery-container {
        max-width: 95%;
    }
}

@media (max-width: 1400px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .gallery-container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Gallery Grid */
.gallery {
    padding: 4rem 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1820px;
    margin: 0 auto;
    padding: 0 2rem;
}

.category-card {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.7rem;
    background: rgba(0, 0, 0, 0.3);
    z-index: 3;
    text-align: center;
    backdrop-filter: blur(2px);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.category-card:hover .category-content {
    transform: translateY(0);
}

.category-content h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.category-content p {
    font-size: 0.75rem;
    color: #ccc;
    margin: 0;
    line-height: 1.2;
    max-width: 90%;
    margin: 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 1.2em;
}

@media (min-width: 1400px) {
    .category-content p {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        height: 2.4em;
    }
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scale(1.05);
}

.category-card.astro::before {
    background-image: url('placeholder-astro.jpg');
}

.category-card.animals::before {
    background-image: url('placeholder-animals.jpg');
}

.category-card.birds::before {
    background-image: url('placeholder-birds.jpg');
}

.category-card.insects::before {
    background-image: url('placeholder-insects.jpg');
}

.astro-slideshow {
    padding-top: 0;
    height: 0;
    padding-bottom: 66.67%;
}

/* Slideshow Styles */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slides-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 2;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 0.5rem;
}

.next {
    right: 0.5rem;
}

.dots-container {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background: white;
}

/* Footer Styles */
footer {
    background-color: var(--bg-secondary);
    padding: 2rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1820px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-secondary);
}

.footer-content p {
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.4rem;
    transition: opacity 0.3s ease;
    padding: 0.5rem;
    opacity: 0.7;
}

.social-link:hover {
    opacity: 1;
}

.fa-instagram {
    font-size: 1.5rem;
}

.fa-facebook-f {
    font-size: 1.3rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Hamburger button */
    .nav-toggle {
        display: block;
        z-index: 1002;
        padding: 6px;
    }
    
    .hamburger, .hamburger::before, .hamburger::after {
        height: 2.5px;  /* Slightly thicker lines */
    }
    
    .hamburger {
        width: 22px;  /* Slightly wider */
    }
    
    /* Menu container */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: auto;
        min-width: 180px;  /* Wider menu */
        background-color: rgba(18, 18, 18, 0.95);
        border-radius: 0 0 5px 5px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        z-index: 1001;
    }
    
    /* Active state */
    .nav-menu.active {
        display: block;
    }
    
    /* Menu items */
    .nav-menu li {
        display: block;
        margin: 0;
        padding: 0;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    /* Menu links */
    .nav-menu a {
        display: block;
        padding: 10px 15px;  /* More padding */
        font-size: 0.9rem;  /* Larger text */
        line-height: 1.3;
        text-align: center;
        transition: background 0.2s;
    }
    
    /* Hover state */
    .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    /* Active link highlight */
    .nav-menu a.active {
        color: var(--accent);
        font-weight: 500;
    }

    .hero {
        height: 40vh;
        padding-top: 60px;
        background-attachment: scroll;
        -webkit-background-size: cover;
        background-size: cover;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
        width: 100%;
    }

    .category-card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }

    .category-content {
        padding: 0.6rem;
    }

    .category-content h2 {
        font-size: 1.1rem;
    }

    .category-content p {
        font-size: 0.75rem;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    /* Fix for iOS Safari */
    @supports (-webkit-touch-callout: none) {
        .hero {
            min-height: 40vh;
            height: -webkit-fill-available;
        }
        
        .nav-menu {
            background-color: rgba(18, 18, 18, 0.95);
        }
    }

    /* Fix for Android Chrome */
    @media screen and (-webkit-min-device-pixel-ratio:0) {
        .nav-menu {
            background-color: rgba(18, 18, 18, 0.95);
        }
        
        .category-card {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
}

/* Update responsive behavior for the gallery */
@media (max-width: 1600px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-content {
        padding: 0.7rem;
    }
    .category-content h2 {
        font-size: 1.1rem;
    }
    .category-content p {
        font-size: 0.75rem;
    }
}

/* Tablet specific styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .category-content {
        padding: 0.8rem;
    }

    .category-content h2 {
        font-size: 1.2rem;
    }

    .category-content p {
        font-size: 0.8rem;
    }

    .hero {
        height: 35vh;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* About Page Styles */
.about-container {
    max-width: 1820px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
}

.about-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 3rem;
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Slideshow styles */
.about-slideshow {
    position: sticky;
    top: 120px;
}

.about-slideshow .slideshow-container {
    width: 90%;
    margin: 0 auto;
    position: relative;
    aspect-ratio: 3/2;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.about-slideshow .slides-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.about-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.about-slideshow .slide.active {
    opacity: 1;
}

.about-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Bottom text wrapper - full width */
.about-bottom-text {
    width: 100%;
    color: var(--text-secondary);
    margin-top: -40px;
}

.about-bottom-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.about-bottom-text p:last-child {
    margin-bottom: 0;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-slideshow {
        position: relative;
        top: 0;
    }

    .about-container h1 {
        font-size: 2rem;
    }

    .about-text p,
    .about-bottom-text p {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .about-container {
        padding: 100px 1rem 2rem;
    }

    .about-container h1 {
        font-size: 1.8rem;
    }

    .about-text p,
    .about-bottom-text p {
        font-size: 0.85rem;
    }
}

/* Contact Page Styles */
.contact-container {
    max-width: 1820px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
    text-align: center;
}

.contact-container h1 {
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.contact-box {
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 12px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-box h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.contact-item i {
    font-size: 1.2rem;
    width: 24px;
    color: var(--text-secondary);
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--text-primary);
}

/* Updated Contact Page Styles */
.contact-item span {
    color: var(--text-secondary);
}

/* Responsive styles */
@media (max-width: 768px) {
    .contact-container h1 {
        font-size: 2.5rem;
    }

    .contact-subtitle {
        font-size: 1rem;
    }

    .contact-box {
        padding: 2rem;
    }

    .contact-box h2 {
        font-size: 1.5rem;
    }

    .contact-item {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-container h1 {
        font-size: 2rem;
    }

    .contact-box {
        padding: 1.5rem;
    }
}

/* Construction Page Styles */
.construction-container {
    max-width: 1820px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
    text-align: center;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.construction-scene {
    width: 300px;
    height: 300px;
    position: relative;
    margin-bottom: 2rem;
}

/* Crane Animation */
.crane {
    position: absolute;
    top: 50px;
    right: 50px;
    width: 120px;
    height: 200px;
    animation: crane-sway 4s ease-in-out infinite;
}

.crane-arm {
    width: 120px;
    height: 10px;
    background: #FFD700;
    position: absolute;
    top: 0;
    transform-origin: right center;
    animation: crane-arm 6s ease-in-out infinite;
}

.cable {
    width: 2px;
    height: 100px;
    background: #666;
    position: absolute;
    left: 30px;
    top: 10px;
    animation: cable-move 4s ease-in-out infinite;
}

.hook {
    width: 10px;
    height: 10px;
    background: #999;
    position: absolute;
    bottom: 0;
    left: -4px;
    border-radius: 50%;
}

/* Building Blocks */
.blocks {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.block {
    width: 40px;
    height: 20px;
    background: #FFD700;
    margin: 5px;
    position: absolute;
    opacity: 0;
    animation: block-appear 8s infinite;
}

.block1 { animation-delay: 0s; }
.block2 { animation-delay: 2s; }
.block3 { animation-delay: 4s; }

/* Worker Animation */
.worker {
    position: absolute;
    bottom: 30px;
    left: 80px;
    animation: worker-move 6s ease-in-out infinite;
}

.hard-hat {
    width: 15px;
    height: 10px;
    background: #FFD700;
    border-radius: 50% 50% 0 0;
}

.body {
    width: 10px;
    height: 20px;
    background: #666;
    margin-top: 2px;
}

/* Gears Animation */
.gears {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.gear {
    width: 30px;
    height: 30px;
    border: 5px solid #FFD700;
    border-radius: 50%;
    position: absolute;
    animation: gear-spin 4s linear infinite;
}

.gear1 {
    right: 0;
}

.gear2 {
    right: 25px;
    animation-direction: reverse;
}

/* Text Styles */
.construction-text {
    text-align: center;
    color: var(--text-primary);
}

.construction-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.construction-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Progress Bar */
.progress-bar {
    width: 200px;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.progress {
    width: 100%;
    height: 100%;
    background: #FFD700;
    animation: progress 3s ease-in-out infinite;
    transform-origin: left center;
}

/* Animations */
@keyframes crane-sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes crane-arm {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-20deg); }
}

@keyframes cable-move {
    0%, 100% { height: 100px; }
    50% { height: 120px; }
}

@keyframes block-appear {
    0% { opacity: 0; transform: translateY(-20px); }
    20% { opacity: 1; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes worker-move {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(50px); }
}

@keyframes gear-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes progress {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(0.7); }
    100% { transform: scaleX(1); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .construction-scene {
        width: 250px;
        height: 250px;
    }

    .construction-text h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .construction-scene {
        width: 200px;
        height: 200px;
    }

    .construction-text h1 {
        font-size: 1.5rem;
    }
}

.section-heading {
    text-align: center;
    font-size: 2.2rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .section-heading {
        font-size: 1.8rem;
        margin: 1.5rem 0 0.5rem;
    }
}

.search-container {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.image-counter {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
}

.search-box {
    flex: 1;
    padding: 0 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 32px;
    min-width: 200px;
}

.search-box:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.search-box::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        margin: 1rem auto;
    }

    .image-counter {
        width: auto;
        min-width: fit-content;
        justify-content: center;
        margin-bottom: 0.3rem;
    }

    .search-box {
        width: 100%;
        min-width: unset;
        height: 32px;
        line-height: 32px;
    }
}

/* Hide items when no results */
.gallery-item.hidden {
    display: none;
}

/* No results message */
.no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    grid-column: 1 / -1;
    display: none;
}

.no-results.visible {
    display: block;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    margin-bottom: 100px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1rem;
    line-height: 1.6;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    max-width: 90%;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
    color: white;
    font-size: 2rem;
    cursor: pointer;
    margin: 0 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .lightbox-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 0;
    }

    .lightbox-caption {
        position: relative;
        bottom: auto;
        margin-top: 1rem;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 5px;
        width: 90%;
    }

    .lightbox-image {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .lightbox-nav {
        display: none;
    }
}

/* Mobile caption handling */
@media (max-width: 768px) {
    /* Special styling for main birds.html page */
    body[class="birds-page"] .gallery-item,
    body[class="animals-page"] .gallery-item,
    body[class="insects-page"] .gallery-item,
    body[class="astro-page"] .gallery-item {
        position: relative;
        border-radius: 10px !important;
        overflow: hidden;
    }

    body[class="birds-page"] .gallery-caption,
    body[class="animals-page"] .gallery-caption,
    body[class="insects-page"] .gallery-caption,
    body[class="astro-page"] .gallery-caption {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        color: white !important;
        padding: 8px !important;
        margin: 0 !important;
        text-align: center !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        height: auto !important;
        border-radius: 0 0 10px 10px !important;
    }

    body[class="birds-page"] .gallery-caption h3,
    body[class="animals-page"] .gallery-caption h3,
    body[class="insects-page"] .gallery-caption h3,
    body[class="astro-page"] .gallery-caption h3 {
        font-size: 14px !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-weight: normal !important;
        line-height: 1.2 !important;
    }

    body[class="birds-page"] .gallery-caption p,
    body[class="animals-page"] .gallery-caption p,
    body[class="insects-page"] .gallery-caption p,
    body[class="astro-page"] .gallery-caption p {
        display: none !important;
    }

    body[class="birds-page"] .gallery-item img,
    body[class="animals-page"] .gallery-item img,
    body[class="insects-page"] .gallery-item img,
    body[class="astro-page"] .gallery-item img {
        border-radius: 10px !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Hide captions on all other pages */
    body:not([class="birds-page"]):not([class="animals-page"]):not([class="insects-page"]):not([class="astro-page"]) .gallery-caption {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
}


