.cms-section {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.spacing-section {
    padding: 100px 0 50px;
    margin-top: 25px
}

/* CMS Editor Toolbar Styling */
.cms-section {
    position: relative;
    margin-bottom: 2rem;
    clear: both; /* Ensure proper clearing after floated elements */
}

.cms-editor-toolbar {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.editor-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.editor-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.editor-btn i {
    margin-right: 0.375rem;
}

.edit-btn {
    background-color: #0d6efd;
}

.edit-btn:hover {
    background-color: #0b5ed7;
    color: #fff;
}

.image-btn {
    background-color: #198754;
}

.image-btn:hover {
    background-color: #157347;
    color: #fff;
}

.logout-btn {
    background-color: #6c757d;
}

.logout-btn:hover {
    background-color: #5c636a;
    color: #fff;
}

/* Responsive adjustments for editor toolbar */
@media (max-width: 576px) {
    .editor-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .editor-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.edit-cms-button {
    margin-left: 1rem;
}

/* Image containers */
.image-container-left {
    width: 40%;
    margin-right: 20px;
    margin-bottom: 20px;
    float: left;
}

.image-container-right {
    width: 40%;
    margin-left: 20px;
    margin-bottom: 20px;
    float: right;
}

/* Video containers */
.video-container-left {
    width: 40%;
    margin-right: 20px;
    margin-bottom: 20px;
    float: left;
}

.video-container-right {
    width: 40%;
    margin-left: 20px;
    margin-bottom: 20px;
    float: right;
}

/* Map containers */
.map-container-left {
    width: 40%;
    margin-right: 20px;
    margin-bottom: 20px;
    float: left;
}

.map-container-right {
    width: 40%;
    margin-left: 20px;
    margin-bottom: 20px;
    float: right;
}

/* Responsive adjustments for containers */
@media (max-width: 768px) {
    .image-container-left,
    .image-container-right,
    .video-container-left,
    .video-container-right,
    .map-container-left,
    .map-container-right {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        float: none;
    }
}

/* Owl Carousel Styling */
.owl-carousel-wrapper {
    position: relative;
    margin-bottom: 20px;
}

/* Position the navigation arrows inside the carousel */
.owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    margin-top: 0 !important;
}

.owl-prev, .owl-next {
    position: absolute;
    background: rgba(0, 0, 0, 0.5) !important; /* Semi-transparent background */
    color: white !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.owl-prev {
    left: 10px;
}

.owl-next {
    right: 10px;
}

/* Make sure the icons are centered */
.owl-prev i, .owl-next i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Magnific Popup Styling */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.8;
}

.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

/* Add this to your existing CSS file */

/* Cursor change for lightbox images */
.magnific-popup {
    cursor: zoom-in; /* Changes cursor to zoom-in icon on hover */
}

/* Optional: Add a subtle zoom effect on hover */
.magnific-popup img {
    transition: transform 0.3s ease;
}

.magnific-popup:hover img {
    transform: scale(1.03);
}

/* Optional: Add a subtle overlay with a "+" icon on hover */
.magnific-popup {
    position: relative;
    display: block;
    overflow: hidden;
}

.magnific-popup::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.magnific-popup:hover::after {
    opacity: 1;
}


/* Hero Image Styling */
.hero-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Add a subtle overlay to the entire image */
.hero-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.carousel-item-container {
    position: relative;
}

.hero-text-overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff; /* Explicitly set to white */
    z-index: 10;
    width: 80%;
    padding: 20px;
    background-color: transparent;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-text-main {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #ffffff; /* Explicitly set to white */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-text-secondary {
    font-size: 1.5rem;
    color: #ffffff; /* Explicitly set to white */
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

/* Modern text animation for hero sections */
.animate-text {
    opacity: 0; /* Start hidden */
    animation: fadeIn 1.5s ease forwards; /* Slower animation (1.5s instead of 0.8s) */
    animation-delay: 0.5s; /* Slightly longer delay */
}

.animate-text-item {
    opacity: 0; /* Start hidden */
    transform: translateY(20px);
    animation: fadeInUp 1.5s ease forwards; /* Slower animation */
}

/* Staggered animation for text elements with longer delays */
.animate-text-item:nth-child(1) {
    animation-delay: 0.7s;
}

.animate-text-item:nth-child(2) {
    animation-delay: 1s;
}

.animate-text-item:nth-child(3) {
    animation-delay: 1.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced animation for active carousel items */
.owl-carousel .active .hero-text-overlay {
    opacity: 0; /* Start hidden */
    animation: fadeInScale 1.5s ease forwards; /* Slower animation */
}

.owl-carousel .active .animate-text-item {
    opacity: 0; /* Start hidden */
    animation: fadeInSlideUp 1.5s ease forwards; /* Slower animation */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Masonry Gallery */
.masonry-gallery {
    column-count: 3;
    column-gap: 15px;
    margin-bottom: 20px;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    break-inside: avoid;
}

.masonry-item img {
    transition: all 0.3s ease;
}

.masonry-item:hover img {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Grid Gallery */
.grid-gallery {
    margin-bottom: 20px;
}

.grid-gallery img {
    transition: all 0.3s ease;
}

.grid-gallery a:hover img {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Parallax Effect */
.parallax-container {
    height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-text-main {
        font-size: 1.8rem;
    }

    .hero-text-secondary {
        font-size: 1.2rem;
    }

    .hero-text-overlay {
        width: 90%;
    }

    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .hero-text-main {
        font-size: 1.5rem;
    }

    .hero-text-secondary {
        font-size: 1rem;
    }

    .masonry-gallery {
        column-count: 1;
    }

    .parallax-container {
        height: 300px;
    }
}
