/* Gallery Page Specific Stylesheet - Contains ALL CSS for the Gallery Page */

/* 1. Global Resets & Box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. Root Variables (Color Palette & Fonts) */
:root {
    --color-primary-bg: #F0F4F8;       /* Soft, modern light blue-grey */
    --color-secondary-bg: #E2E8F0;     /* Slightly darker blue-grey for elements */
    --color-accent-teal: #008080;      /* Rich, earthy teal */
    --color-accent-gold: #FFB74D;      /* Friendly, inviting warmth */
    --color-text-dark: #334155;        /* Soft but legible dark text */
    --color-text-light: #64748B;       /* Lighter text for descriptions */
    --color-white: #FFFFFF;
    --color-border-light: #CBD5E1;     /* Light border color */
    --color-green-tag: #28a745;         /* For "Beginner" tag */
    --color-orange-tag: #fd7e14;        /* For "Intermediate" tag */
    --color-purple-tag: #6f42c1;        /* For "Advanced" tag */

    /* Updated to Poppins */
    --font-poppins: 'Poppins', sans-serif;
}

/* 3. Base Body & Typography */
body {
    font-family: var(--font-poppins);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-poppins);
    color: var(--color-text-dark);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 4. Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin: 0 auto 3rem;
    max-width: 48rem;
}

.heading-primary {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.heading-secondary {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--color-accent-teal);
    color: var(--color-white);
    border: 2px solid var(--color-accent-teal);
}

.btn-primary:hover {
    background-color: #006666;
    border-color: #006666;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent-teal);
    border: 2px solid var(--color-accent-teal);
}

.btn-secondary:hover {
    background-color: var(--color-accent-teal);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
}

/* Section Padding */
section {
    padding: 4rem 0;
}

/* 5. Navbar */
.navbar {
    background-color: var(--color-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 40;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent-teal);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--color-text-dark);
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover {
    color: var(--color-accent-teal);
}

/* Active Nav Link Style */
.nav-link-active {
    color: var(--color-accent-teal);
    font-weight: 600;
}
.nav-link-active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent-teal);
    bottom: 0;
    left: 0;
}


/* Hide desktop nav links on small screens */
.nav-links {
    display: none;
}
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}
.mobile-menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.3);
}
.mobile-menu-toggle:hover {
    background-color: var(--color-primary-bg);
}

/* 6. Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0 0 0 auto;
    width: 16rem;
    background-color: var(--color-white);
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}

.mobile-nav-link {
    display: block;
    font-size: 1.25rem;
    color: var(--color-text-dark);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

.mobile-nav-link:hover {
    color: var(--color-accent-teal);
    background-color: var(--color-primary-bg);
}

/* Active Mobile Nav Link Style */
.mobile-nav-link-active {
    color: var(--color-accent-teal);
    font-weight: 600;
    background-color: var(--color-primary-bg); /* Highlight background */
}

/* Class to prevent body scrolling when mobile menu is active */
body.mobile-menu-active {
    overflow: hidden;
}

/* 7. Specific Section Styles (e.g., Hero sections) */
.section-hero {
    background-color: var(--color-primary-bg);
    padding: 4rem 0;
}


/* 8. Common Grid and Card Styles (for gallery items) */
.gallery-grid {
    display: grid;
    /* Default to flexible columns on small screens */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.gallery-card {
    background-color: var(--color-white);
    border-radius: 0.75rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.2s ease;
}

.gallery-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.gallery-image-wrapper {
    position: relative;
    aspect-ratio: 3 / 2; /* Changed aspect ratio to make images wider */
    overflow: hidden;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-content {
    padding: 1.5rem;
    text-align: left;
}

.gallery-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.gallery-category {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

/* 9. Footer */
.footer {
    background-color: var(--color-white);
    color: var(--color-text-dark);
    padding: 3rem 0;
    border-top: 3px solid var(--color-accent-teal);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent-teal);
    margin-bottom: 1rem;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.footer-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-accent-teal);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--color-text-dark);
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--color-accent-teal);
}

.footer-contact p {
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.contact-address {
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    font-size: 1.5rem;
    color: var(--color-text-dark);
    transition: color 0.2s ease;
}

.social-link:hover {
    color: var(--color-accent-teal);
}


/* 10. Media Queries for Responsiveness */

/* Medium devices (tables, 768px and up) */
@media (min-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .navbar-content {
        justify-content: space-between;
    }

    .nav-links {
        display: flex;
    }
    .mobile-menu-toggle {
        display: none;
    }

    .section-hero .heading-primary { /* Adjust hero heading size for tablets */
        font-size: 3.5rem;
    }
    .section-hero .section-description { /* Adjust hero description size for tablets */
        font-size: 1.25rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        text-align: left;
    }

    .social-links {
        justify-content: flex-start;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .heading-primary {
        font-size: 3.5rem;
    }

    .heading-secondary {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for desktops */
    }
}

/* Extra large devices (large desktops, 1280px and up) */
@media (min-width: 1280px) {
    .container {
        padding: 0;
    }
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns for large desktops */
    }
}

/* Gallery Specific Styles */

/* Background for the filter/category section */
.section-gallery-filters {
    background-color: var(--color-white); /* White background for this section based on screenshot */
}

/* Background for the gallery grid section */
.section-gallery-grid {
    background-color: var(--color-primary-bg); /* Primary-bg for this section based on screenshot */
}

/* Layout for filter buttons */
.filter-buttons-grid {
    display: flex;
    flex-wrap: wrap; /* Allows buttons to wrap to the next line on smaller screens */
    justify-content: center; /* Centers the buttons horizontally */
    gap: 1rem; /* Consistent gap between buttons */
}

/* Ensure buttons themselves use the properties from the .btn class */
.filter-btn {
    white-space: nowrap; /* Prevents button text from wrapping */
}

/* Media query for larger screens for filter buttons */
@media (min-width: 768px) {
    .filter-buttons-grid {
        gap: 1.5rem; /* Larger gap for desktop, consistent with other grid gaps */
    }
}
