:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --dark-color: #222;
    --light-color: #fff;
    --bg-color: #f9f9f9;
    --gray-light: #eee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-color);
    line-height: 1.6;
}

.hero {
    padding: 5rem 5% 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--soft-white) 0%, var(--pure-white) 100%);
}

.hero h1 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    font-size: 3.2rem;
    margin-bottom: 1.6rem;
    font-weight: 700;
    letter-spacing: -1px;
}


.hero h1:after {
    content: '';
    position: absolute;
    width: 30%;
    height: 5px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--light-black);
}

.gallery {
    padding: 3rem 0;
}

.gallery-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.gallery-title h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.gallery-title h1:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 280px;
    gap: 15px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: var(--light-color);
    height: 100%;
    width: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

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

/* Masonry layout for varied aspect ratios */
.gallery-item-tall {
    grid-row: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
}
/* Lightbox custom styles */
.lg-outer .lg-image {
    max-height: 80vh !important;
    width: auto !important;
}

.lg-actions .lg-next, 
.lg-actions .lg-prev {
    background-color: rgba(0,0,0,0.45);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 50px;
    color: white !important;
}

.lg-toolbar {
    background-color: rgba(0,0,0,0.45) !important;
}

.lg-close.lg-icon {
    color: white !important;
}

.lg-sub-html {
    background-color: rgba(0,0,0,0.7);
    padding: 15px;
    bottom: 0;
}

.lg-share-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.lg-share-btn {
    color: white;
    background: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.lg-share-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.lg-progress-bar .lg-progress {
    background-color: var(--primary-color) !important;
}

@media (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); /* Even smaller on very small screens */
        grid-auto-rows: 180px;
        gap: 6px;
    }

    /* Keep all the masonry layout rules */
    .gallery-item-tall {
        grid-row: span 2;
    }

    .gallery-item-wide {
        grid-column: span 2;
    }

    /* Adjust hero section for mobile */
    .hero {
        padding: 3rem 5% 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px){
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        grid-auto-rows: 130px;
        gap: 10px;
    }
}