/* ==========================================================================
   Caicedo Cleaning
   Gallery Base Styles

   Responsibilities:
   - Shared gallery variables
   - Gallery section layout
   - Section heading
   - Basic empty-state message
   - Shared accessibility and reduced-motion rules

   Masonry layout: masonry.css
   Lightbox styles: lightbox.css
   Thumbnail styles: thumbnails.css
   ========================================================================== */


/* ==========================================================================
   Gallery Variables
   ========================================================================== */

:root {
    --gallery-primary: #fc780c;
    --gallery-secondary: #f286a8;

    --gallery-background: #ffffff;
    --gallery-surface: #fffdf4;

    --gallery-text: #333333;
    --gallery-muted-text: #666666;

    --gallery-border: #dddddd;

    --gallery-radius: 18px;

    --gallery-shadow:
        0 12px 35px rgba(0, 0, 0, 0.12);

    --gallery-transition:
        0.3s ease;
}


/* ==========================================================================
   Gallery Section
   ========================================================================== */

.gallery-section {
    position: relative;

    width: 100%;

    padding: 90px 20px;

    background: var(--gallery-background);

    overflow: hidden;
}


/* ==========================================================================
   Gallery Container
   ========================================================================== */

.gallery-section .container {
    width: min(1400px, 95%);
    margin-inline: auto;
}


/* ==========================================================================
   Section Heading
   ========================================================================== */

.gallery-section .section-title {
    max-width: 760px;

    margin: 0 auto 55px;

    text-align: center;
}

.gallery-section .section-title h2 {
    margin: 0 0 15px;

    color: var(--gallery-text);

    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
}

.gallery-section .section-title p {
    max-width: 700px;

    margin: 0 auto;

    color: var(--gallery-muted-text);

    font-size: 1rem;
    line-height: 1.7;
}


/* ==========================================================================
   Empty Gallery State
   ========================================================================== */

.gallery-empty {
    width: 100%;
    max-width: 900px;

    margin-inline: auto;

    padding: 70px 30px;

    text-align: center;

    background: #fafafa;

    border: 2px dashed var(--gallery-border);
    border-radius: var(--gallery-radius);
}

.gallery-empty p {
    margin: 0;

    color: var(--gallery-muted-text);

    font-size: 1.1rem;
    line-height: 1.6;
}


/* ==========================================================================
   Shared Focus Styles
   ========================================================================== */

.gallery-item:focus-visible,
.lightbox-thumb:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-close:focus-visible {
    outline: 3px solid var(--gallery-primary);
    outline-offset: 4px;
}


/* ==========================================================================
   Responsive Layout
   ========================================================================== */

@media (max-width: 900px) {
    .gallery-section {
        padding: 75px 18px;
    }

    .gallery-section .section-title {
        margin-bottom: 42px;
    }
}


@media (max-width: 600px) {
    .gallery-section {
        padding: 60px 15px;
    }

    .gallery-section .container {
        width: 100%;
    }

    .gallery-section .section-title {
        margin-bottom: 35px;
    }

    .gallery-section .section-title h2 {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }

    .gallery-section .section-title p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .gallery-empty {
        padding: 50px 20px;
    }

    .gallery-empty p {
        font-size: 1rem;
    }
}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .gallery-section *,
    .gallery-section *::before,
    .gallery-section *::after,
    .lightbox *,
    .lightbox *::before,
    .lightbox *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ==========================================================================
   See More Gallery Button
   ========================================================================== */

.gallery-see-more-wrapper {
    display: flex;
    justify-content: center;

    margin-top: 45px;
}

.gallery-see-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 54px;

    padding: 14px 24px;

    border: 2px solid var(--gallery-primary);
    border-radius: 999px;

    background: var(--gallery-primary);
    color: #ffffff;

    font: inherit;
    font-size: 1rem;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 10px 25px rgba(252, 120, 12, 0.24);

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.gallery-see-more:hover {
    background: #ffffff;
    color: var(--gallery-primary);

    transform: translateY(-3px);

    box-shadow:
        0 14px 30px rgba(252, 120, 12, 0.28);
}

.gallery-see-more:active {
    transform: translateY(-1px);
}

.gallery-see-more:focus-visible {
    outline: 3px solid rgba(252, 120, 12, 0.35);
    outline-offset: 4px;
}

.gallery-see-more-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    height: 30px;

    padding-inline: 8px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.2);
    color: inherit;

    font-size: 0.85rem;
    line-height: 1;
}

.gallery-see-more:hover .gallery-see-more-count {
    background: rgba(252, 120, 12, 0.12);
}

@media (max-width: 600px) {
    .gallery-see-more-wrapper {
        margin-top: 32px;
    }

    .gallery-see-more {
        width: 100%;
        max-width: 320px;
    }
}

.gallery-item-button,
.lightbox-thumb-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.gallery-item-button {
    height: 100%;
}

.gallery-item-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-thumb-button {
    flex: 0 0 auto;
    width: auto;
}

.lightbox-thumb-button:focus-visible,
.gallery-item-button:focus-visible {
    outline: 3px solid #fc780c;
    outline-offset: 3px;
}