* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --caliste-green: #8FBC8F;
    --caliste-dark: #6B8E6B;
    --caliste-light: #B8D4B8;
    --apricot-white: #FDE8CD;
    --apricot-warm: #F5D5A8;
    --apricot-deep: #E8C18A;
    --cream: #FFF8F0;
    --charcoal: #2C3E2B;
    --text-dark: #2E3A2C;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--apricot-white) 0%, var(--cream) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background 0.3s ease;
}

/* DARK MODE */
body.dark {
    background: linear-gradient(135deg, #1a2a1a 0%, #2c3e2b 100%);
    color: var(--apricot-white);
}

body.dark header {
    background: rgba(26, 42, 26, 0.95);
    border-bottom: 2px solid var(--caliste-green);
}

body.dark .logo h1 {
    color: var(--caliste-light);
}

body.dark .logo h1 span {
    color: var(--apricot-white);
}

body.dark nav a {
    color: var(--apricot-white);
}

body.dark nav a:hover,
body.dark nav a.active {
    color: var(--caliste-green);
}

body.dark #darkModeBtn {
    background: var(--caliste-dark);
    color: var(--apricot-white);
}

body.dark .filter-btn {
    color: var(--apricot-white);
    border-color: var(--caliste-light);
}

body.dark .filter-btn.active {
    background: var(--caliste-green);
    color: var(--charcoal);
}

body.dark .gallery-item {
    background: rgba(44, 62, 43, 0.85);
}

body.dark footer {
    background: var(--charcoal);
    color: var(--apricot-white);
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 248, 240, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--caliste-light);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--caliste-dark);
}

.logo h1 span {
    color: var(--apricot-deep);
    font-size: 2rem;
}

.logo a {
    text-decoration: none;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--caliste-green);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--caliste-green);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

#darkModeBtn {
    background: var(--caliste-light);
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    color: var(--charcoal);
}

#darkModeBtn:hover {
    background: var(--caliste-green);
    transform: scale(1.02);
}

/* GALLERY */
section {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--caliste-dark);
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--apricot-deep);
    border-radius: 2px;
}

.gallery-subtitle {
    margin-bottom: 2rem;
    color: var(--text-dark);
    opacity: 0.7;
}

body.dark .gallery-subtitle {
    color: var(--apricot-white);
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--caliste-green);
    padding: 0.6rem 1.8rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--caliste-dark);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background: var(--caliste-light);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--caliste-green);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    text-align: center;
}

/* LIGHTBOX */
.lightbox {
    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;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--caliste-green);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--caliste-green);
    color: var(--charcoal);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--apricot-warm);
    color: var(--text-dark);
    border-top: 2px solid var(--caliste-light);
    margin-top: 2rem;
}

/* ANIMATION */
.fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade.show {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .filter-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.8rem;
    }
    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem 0.8rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 2rem 1rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}