:root {
    /* Brand Colors */
    --primary: #8a0101;
    --secondary: #FF4500;
    --accent: #FF6347;
    --dark: #1A1A1A;
    --light: #ffdbc5;
    --white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #740000, #e93e00);
    --gradient-secondary: linear-gradient(135deg, rgba(255, 69, 0, 0.1), rgba(255, 0, 0, 0.1));

    /* Shadows */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 4px 20px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

.gallery-main-section {
    padding-top: 0; /* Space above is handled by gallery-float-section's margin-bottom */
    padding-bottom: 80px; /* Consistent with other main site sections */
    padding-left: 0;
    padding-right: 0;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    color: var(--primary);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 15px;
}

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

@media (max-width: 768px) {
    .gallery-float-section .section-title {
        font-size: 1.8rem; /* Adjusted for mobile */
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        color: var(--primary) !important; /* Ensure color is applied */
        margin-bottom: 1.5rem; /* Adjusted margin for mobile */
        padding-bottom: 10px; /* Adjusted padding for mobile */
    }

    .gallery-float-section .section-title::after {
        width: 60px; /* Slightly smaller underline for mobile */
        height: 2px;
    }
    /* Add other mobile-specific gallery styles here if needed */
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
}

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

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    aspect-ratio: 3/4;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.gallery-item picture {
    display: block; /* Ensure picture element takes up space */
    width: 100%;
    height: 100%;
    overflow: hidden; /* Helps contain the image zoom if needed at this level */
}

.gallery-item picture img {
    display: block; /* Ensure image is a block element */
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease-in-out; /* Specific transition for zoom effect */
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: var(--white);
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .item-overlay {
    transform: translateY(0);
}

/* Add zoom effect to the image on gallery item hover */
.gallery-item:hover picture img {
    transform: scale(1.07); /* Subtle zoom for a premium feel */
}

.item-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
}

.item-overlay p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Lightbox Modal */

.lightbox-modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

body.lightbox-open {
    overflow: hidden;
}
.lightbox-modal {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Prevent interaction when hidden */
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-large);
}

.lightbox-caption {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    text-align: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 30px;
    font-size: 1rem;
}

.close-lightbox {
    position: fixed;
    top: 20px;
    right: 20px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: var(--transition);
}

.close-lightbox:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Floating Gallery Styles */
.gallery-float-section {
    margin-top: 80px;
    margin-bottom: 60px;
    overflow: hidden;
    background: var(--light);
    padding: 60px 0;
    position: relative;
}

.gallery-float-section::before,
.gallery-float-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.gallery-float-section::before {
    left: 0;
    background: linear-gradient(to right, var(--light) 0%, transparent 100%);
}

.gallery-float-section::after {
    right: 0;
    background: linear-gradient(to left, var(--light) 0%, transparent 100%);
}

.gallery-float-wrapper {
    position: relative;
    padding: 20px 0;
    background: var(--light);
    overflow: hidden;
}

.gallery-float-track {
    display: flex;
    gap: 24px;
    width: fit-content;
    position: relative;
}

.track-1, .track-2 {
    display: flex;
    gap: 24px;
    animation-duration: 40s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    transition: animation-play-state 0.3s ease;
    transform-style: preserve-3d;
}

.track-1 {
    animation-name: floatLeft;
}

.track-2 {
    animation-name: floatRightProper; /* New dedicated keyframes */
    margin-top: 24px;
}

.gallery-item-group {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}

.gallery-float-wrapper .gallery-item {
    flex: 0 0 300px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
}

.gallery-float-wrapper .gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-large);
    z-index: 3;
}

.gallery-float-wrapper .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-float-wrapper .gallery-item:hover img {
    transform: scale(1.1);
}

/* AOS Override for floating gallery diagnostics */
.gallery-float-wrapper .gallery-item[data-aos] {
    opacity: 1 !important;
    transform: none !important; /* Reset AOS transforms */
}

@keyframes floatRightProper {
    from { transform: translateX(calc(-100% - 24px)); }
    to { transform: translateX(0); }
}

@keyframes floatLeft {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 24px)); }
}

/* Call-to-Action Section */
.cta-section {
    background: linear-gradient(90deg, #ffecd2 0%, #fcb69f 100%);
    padding: 48px 0 40px 0;
    text-align: center;
    margin-top: 48px;
}
.cta-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 16px;
}
.cta-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #a83232;
    margin-bottom: 12px;
}
.cta-text {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 24px;
}
.cta-button {
    display: inline-block;
    background: #a83232;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 32px;
    text-decoration: none;
    box-shadow: 0 2px 16px rgba(168,50,50,0.08);
    transition: background 0.2s, transform 0.2s;
}
.cta-button:hover {
    background: #d94f4f;
    transform: translateY(-2px) scale(1.04);
}

/* Beaches Information Section */
.beaches-info-section {
    background: #fff7f1;
    padding: 56px 0 40px 0;
    margin-top: 0;
}
.beaches-info-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}
.beaches-title {
    font-size: 2rem;
    font-weight: 700;
    color: #a83232;
    margin-bottom: 10px;
    text-align: center;
}
.beaches-description {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 32px;
    text-align: center;
}
.beaches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}
.beach-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(168,50,50,0.07);
    padding: 18px 20px 22px 20px;
    max-width: 260px;
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.beach-card img {
    width: 100%;
    max-width: 220px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(168,50,50,0.05);
}
.beach-card h3 {
    font-size: 1.12rem;
    color: #a83232;
    margin: 0 0 8px 0;
    font-weight: 600;
    text-align: center;
}
.beach-card p {
    font-size: 0.99rem;
    color: #555;
    text-align: center;
}
.beach-card:hover {
    box-shadow: 0 6px 28px rgba(168,50,50,0.13);
    transform: translateY(-3px) scale(1.03);
}

.beaches-info-button-container {
    text-align: center;
    margin-top: 32px;
}

.beaches-info-button {
    display: inline-block;
    background: #a83232; /* Same as cta-button */
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 32px;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(168,50,50,0.08);
    transition: background 0.2s, transform 0.2s;
}

.beaches-info-button:hover {
    background: #d94f4f; /* Same as cta-button hover */
    transform: translateY(-2px) scale(1.04);
}

/* Responsive Design Updates */
@media (max-width: 900px) {
    .beaches-list {
        gap: 18px;
    }
    .beach-card {
        max-width: 44vw;
    }
}
@media (max-width: 600px) {
    .cta-title, .beaches-title {
        font-size: 1.35rem;
    }
    .cta-section, .beaches-info-section {
        padding: 32px 0 24px 0;
    }
    .beaches-list {
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }
    .beach-card {
        max-width: 98vw;
        padding: 13px 10px 16px 10px;
    }
    .beach-card img {
        height: 110px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        margin: 60px auto 40px;
        padding: 0 15px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .gallery-filters {
        gap: 10px;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px 0;
    }

    .gallery-float-wrapper .gallery-item {
        flex: 0 0 220px;
        height: 160px;
    }

    .track-1, .track-2 {
        gap: 15px;
        animation-duration: 35s;
    }

    .gallery-float-section {
        margin-top: 40px;
        margin-bottom: 40px;
        padding: 20px 0;
    }

    .gallery-item {
        aspect-ratio: 1;
    }

    .item-overlay {
        padding: 15px;
    }

    .item-overlay h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        margin: 40px auto 30px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .gallery-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 15px;
    }

    .filter-btn {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .gallery-item {
        aspect-ratio: 4/3;
    }

    .gallery-float-wrapper .gallery-item {
        flex: 0 0 180px;
        height: 140px;
    }

    .gallery-float-section::before,
    .gallery-float-section::after {
        width: 50px;
    }

    .track-1, .track-2 {
        gap: 12px;
        animation-duration: 25s;
    }

    .track-2 {
        margin-top: 12px;
    }

    .item-overlay {
        padding: 12px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    }

    /* Lightbox adjustments for mobile */
    .lightbox-caption {
        padding: 8px 15px;
        font-size: 0.9rem;
        bottom: 15px;
    }

    .close-lightbox {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}

/* Mobile Menu Base Styles */
.mobile-menu-btn {
    display: none;
}

.mobile-close-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
        border: none;
        background: none;
        cursor: pointer;
        padding: 5px;
    }

    .mobile-menu-btn span {
        display: block;
        background: var(--primary);
        height: 2px;
        width: 25px;
        margin: 6px 0;
        transition: 0.3s ease;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--white);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 120px;
        transition: 0.3s ease-in-out;
    box-shadow: none;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .mobile-close-btn {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        border: 1px solid var(--primary);
        border-radius: 4px;
        background: transparent;
        color: var(--primary);
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        line-height: 1;
        z-index: 1001;
    }

    .main-nav {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        list-style: none;
        text-align: center;
    }

    .main-nav li {
        margin: 35px 0;
    }

    .main-nav a {
        color: var(--primary);
        font-size: 1.1rem;
        font-weight: 500;
        padding: 8px 0;
        display: inline-block;
        text-decoration: none;
        position: relative;
        transition: var(--transition);
        width: 100%;
    }

    .main-nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: 0;
        left: 0;
        background: var(--primary);
        transition: width 0.3s ease;
    }

    .main-nav a:hover::after,
    .main-nav a.active::after {
        width: 100%;
    }

    .social-menu {
        margin-top: 60px;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 35px;
    }

    .social-menu a {
        color: var(--primary);
        font-size: 1.3rem;
        transition: var(--transition);
    }

    /* Dark overlay */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: transparent;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .nav-menu.active::before {
        left: -75%;
        opacity: 1;
        visibility: visible;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        width: 85%;
        padding-top: 100px;
    }

    .nav-menu.active::before {
        left: -85%;
    }

    .mobile-close-btn {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .main-nav li {
        margin: 30px 0;
    }

    .main-nav a {
        font-size: 1rem;
    }

    .social-menu {
        gap: 30px;
        margin-top: 50px;
    }
}
