/* --- Gallery General Styles --- */
/* Reuse variables from style.css where possible, but define local specific ones if needed */

.gallery-section {
    padding: 2rem 1rem;
    background-color: var(--color-white);
    position: relative;
    /* Context only */
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
    /* Space for floating button on mobile */
}

/* --- Masonry Grid --- */
.gallery-grid {
    column-count: 1;
    /* Mobile first: 1 column */
    column-gap: 1rem;
}

@media (min-width: 600px) {
    .gallery-grid {
        column-count: 2;
        /* Tablet: 2 columns */
    }
}

@media (min-width: 900px) {
    .gallery-grid {
        column-count: 3;
        /* Desktop: 3 columns */
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f0f0f0;
    /* Placeholder color */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    /* Hidden initially for fade-in */
    transition: opacity 0.8s ease-in-out;
}

.gallery-item img.loaded {
    opacity: 1;
}

/* --- Caption Overlay (Optional) --- */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--color-gold);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 600px) {
    .lightbox-nav {
        font-size: 1.5rem;
        padding: 0.8rem 0.4rem;
        background: rgba(0, 0, 0, 0.3);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }
}

/* --- Request Visit Feature --- */
.btn-floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-terracotta);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(212, 107, 78, 0.4);
    cursor: pointer;
    z-index: 900;
    font-size: 1rem;
    transform: translateY(0);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-floating-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 107, 78, 0.6);
    background-color: #c0583b;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin-bottom: 0.5rem;
    color: var(--color-green-dark);
}

.modal-body .alert-info {
    background: #fffcf5;
    border: 1px solid var(--color-gold);
    color: #8a6d3b;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.form-note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 1rem;
    text-align: center;
}