/********** Template CSS **********/
:root {
    --primary: #C0652F;
    --secondary: #E3AB69;
    --light: #EDF0F5;
    --dark: #40484E;
    --accent: #50BBDF;
}

/* Global smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
}

.back-to-top i {
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Better back-to-top icon centering */
.back-to-top {
    font-size: 0 !important;
    line-height: 0 !important;
}

.back-to-top i {
    vertical-align: middle !important;
    display: inline-block !important;
    font-size: 20px !important;
    line-height: 1 !important;
    position: relative;
    top: 12px;
}


/*** Hero Section ***/
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-image: url('../img/cif525_outdoor_12.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    z-index: 0;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(64, 72, 78, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 20px;
    text-align: center;
}

.hero-villa-name {
    font-family: 'Brush Script MT', cursive, 'Lucida Handwriting', 'Apple Chancery', serif;
    font-size: 6rem;
    font-weight: 400;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
    font-style: italic;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Hero features list styling - positioned to top-right for optimal visual balance */
.hero-features-absolute {
    position: absolute;
    right: 2rem;
    top: 20%;
    transform: translateY(-50%);
    text-align: right;
}

.hero-features-absolute ul {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 0;
    padding: 0;
}

.hero-features-absolute li {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.3rem;
    padding: 0;
}

@media (max-width: 768px) {
    .hero-features-absolute {
        position: relative;
        left: 0;
        top: auto;
        transform: none;
        text-align: center;
        margin-top: 2rem;
    }
}

/* Improved search bar sticky behavior */
.search-bar-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Tab styling for Home Information */
.nav-tabs {
    border-bottom: none;
    margin-bottom: 15px;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--dark);
    font-weight: 500;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background-color: rgba(192, 101, 47, 0.1);
    color: var(--primary);
}

.nav-tabs .nav-link.active {
    background-color: var(--primary);
    color: white;
    border: none;
}

.tab-content {
    padding-top: 1rem;
    border-top: 2px solid var(--primary);
    padding-top: 2rem;
}

.btn-hero {
    background-color: var(--primary);
    color: white;
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(192, 101, 47, 0.4);
    transition: all 0.3s ease;
}

.btn-hero:hover {
    background-color: #A0551F;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(192, 101, 47, 0.6);
    color: white;
}

@media (max-width: 768px) {
    .hero-villa-name {
        font-size: 3.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn-hero {
        padding: 15px 35px;
        font-size: 1rem;
    }
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

/*** Feature Items Enhancement ***/
.feature-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(192, 101, 47, 0.1);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(192, 101, 47, 0.2);
    border-color: var(--primary);
    background-color: var(--primary);
}

.feature-item:hover span {
    color: white;
}

.feature-item i {
    color: var(--primary);
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.feature-item:hover i {
    transform: scale(1.2);
    color: white;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Navbar ***/
.nav-bar {
    position: relative;
    margin-top: 45px;
    padding: 0 5rem; /* wider strap */
    transition: .5s;
    z-index: 9999;
}

.nav-bar.sticky-top {
    position: sticky;
    padding: 0;
    z-index: 9999;
}

.navbar {
    /* box-shadow: 0 0 30px rgba(0, 0, 0, .08); */
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 5px;
    transition: .5s;
}

.navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

.navbar-light .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 15px;
    text-transform: uppercase;
    outline: none;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .nav-bar {
        margin: 0;
        padding: 0;
    }

    .navbar-light .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar-light .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

.navbar-light .navbar-brand {
    height: 75px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        top: 100%;
        margin-top: 0;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
        
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.header {
    padding-top: 0; /* No navbar, no padding needed */
}

@media (min-width: 992px) {
    .header {
        margin-top: 0; /* keep header visible when opened from file:// */
    }
}

/* Replace Owl nav styles with Bootstrap carousel control adjustments */
.carousel-control-prev,
.carousel-control-next {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 40px;
    align-items: center;
    justify-content: center;
    display: flex;
    transition: .3s;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--dark);
}

/* Lightbox modal styles */
.modal-content.bg-transparent {
    background: transparent !important;
    border: none !important;
}
.modal-body .btn {
    opacity: 0.9;
}
.modal-body .btn:hover {
    opacity: 1;
}
.modal-body img {
    max-height: 80vh;
    object-fit: contain;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #DDDDDD;
}


/*** Icon ***/
.icon {
    padding: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF !important;
    border-radius: 50px;
    border: 1px dashed var(--primary) !important;
}

/* Defensive: reduce visible stacking if multiple modal-backdrops appear */
.modal-backdrop {
    opacity: 0.75 !important;
}
.modal-backdrop + .modal-backdrop { display: none !important; }

/* Swiper gallery layout fixes */
#gallery { max-width: 100%; padding: 0; }
.gallery-top { width: 100%; overflow: hidden; padding: 0 60px; position: relative; height: 500px !important; }
.gallery-top .swiper-wrapper { align-items: center; will-change: transform; height: 500px; }
.gallery-top .swiper-slide { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    opacity: 0; 
    transition: all 0.5s ease; 
    background: #f5f5f5; 
    cursor: pointer;
    position: relative;
}
.gallery-top .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(64, 72, 78, 0.1) 0%, rgba(64, 72, 78, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}
.gallery-top .swiper-slide:hover::before {
    opacity: 1;
}
.gallery-top .swiper-slide img { 
    width: 100%; 
    height: 500px !important;
    max-height: 500px !important;
    min-height: 500px !important;
    object-fit: cover;
    display: block; 
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* Ensure consistent container height */
.gallery-top {
    height: 500px !important;
    overflow: hidden;
}

.gallery-top .swiper-slide {
    height: 500px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-top .swiper-slide:hover img {
    transform: scale(1.02);
}
.gallery-top .swiper-slide-active { opacity: 1; transform: scale(1.05); z-index: 10; }
.gallery-top .swiper-slide-prev, .gallery-top .swiper-slide-next { opacity: 0.15; }

/* Gallery Thumbnails Styling */
.gallery-thumbs {
    padding: 20px 0;
}

.gallery-thumbs .swiper-slide {
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.9);
}

.gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-thumbs .swiper-slide:hover {
    opacity: 0.8;
    transform: scale(0.95);
}

/* Ensure only one thumbnail is highlighted and it's centered */
.gallery-thumbs .swiper-slide.swiper-slide-active,
.gallery-thumbs .swiper-slide.swiper-slide-thumb-active {
    opacity: 1 !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 20px rgba(192, 101, 47, 0.6) !important;
    transform: scale(1.1) !important;
    z-index: 10;
}

.gallery-thumbs .swiper-slide.swiper-slide-active img,
.gallery-thumbs .swiper-slide.swiper-slide-thumb-active img {
    transform: scale(1.05);
}

/* Remove highlighting from any other thumbnails that might get marked */
.gallery-thumbs .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-thumb-active) {
    opacity: 0.4 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: scale(0.9) !important;
}

/* Custom Gallery Navigation */
.custom-gallery-prev,
.custom-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    color: var(--primary);
    background: white;
    width: 65px !important;
    height: 65px !important;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 85px;
    user-select: none;
    transition: all 0.3s ease;
    line-height: 0.5;
    overflow: hidden;
    text-align: center;
}

.custom-gallery-prev {
    left: 10px;
}

.custom-gallery-next {
    right: 10px;
}

.custom-gallery-prev:hover,
.custom-gallery-next:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.gallery-thumbs { width: 100%; overflow: hidden; display: flex; justify-content: center; margin-top: 20px; padding: 10px 0; }
.gallery-thumbs .swiper-wrapper { align-items: center; will-change: transform; }
.gallery-thumbs .swiper-slide { 
    width: 100px; 
    height: 70px; 
    cursor: pointer; 
    opacity: 0.5; 
    transition: all 0.4s ease; 
    border: 3px solid transparent; 
    border-radius: 8px; 
    overflow: hidden; 
    flex-shrink: 0;
    position: relative;
}
.gallery-thumbs .swiper-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(192, 101, 47, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-thumbs .swiper-slide:hover { 
    opacity: 0.8; 
    transform: scale(1.08);
}
.gallery-thumbs .swiper-slide:hover::after {
    opacity: 1;
}
.gallery-thumbs .swiper-slide-thumb-active { 
    opacity: 1; 
    border-color: var(--primary); 
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(192, 101, 47, 0.4);
}
.gallery-thumbs .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 5px; }

/* Shrink header carousel images and center them in their column */
/* Header: make the two columns equal height on medium+ screens so the image can match the text height */
@media (min-width: 768px) {
    .header .row { align-items: stretch !important; }
    .header .col-md-6 { display: flex; align-items: stretch; }
    .header .col-md-6:first-child { display: flex; flex-direction: column; justify-content: center; }
    .header .col-md-6.animated.fadeIn { justify-content: center; }

    /* Carousel should take full column height and image should fill it */
    .header .carousel-inner, .header .carousel-inner .carousel-item { height: 100%; display: flex; align-items: center; justify-content: center; }
    .header-single-image {
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    }
}
/* Navbar Option C: transparent overlay */
.navbar-overlay {
    position: absolute;
    width: 100%;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    max-width: 100%;
}
.navbar-overlay.scrolled {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar-overlay .navbar {
    background: transparent !important;
    transition: all 0.4s ease;
}
.navbar-overlay.scrolled .navbar {
    background: white !important;
}
.navbar-overlay .navbar-brand h1 {
    transition: color 0.3s ease;
}
.navbar-overlay:not(.scrolled) .navbar-brand h1,
.navbar-overlay:not(.scrolled) .nav-link {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}
.navbar-overlay:not(.scrolled) .navbar-toggler-icon {
    filter: invert(1);
}

/* ensure the navbar content doesn't overflow its container */
.navbar-overlay .navbar {
    min-height: 64px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.navbar-overlay .navbar-brand { padding-left: .5rem; }

/* Map thumbnail in search area */
.search-map-thumb {
    width: 180px;
    height: 112px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-map-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.search-map-thumb.small {
    width: 64px;
    height: 48px;
}


/*** About ***/
.about-img img {
    position: relative;
    z-index: 2;
}

.about-img::before {
    position: absolute;
    content: "";
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: skew(20deg);
    z-index: 1;
}


/*** Category ***/
.cat-item div {
    background: #FFFFFF;
    border: 1px dashed rgba(0, 185, 142, .3);
    transition: .5s;
}

.cat-item:hover div {
    background: var(--primary);
    border-color: transparent;
}

.cat-item div * {
    transition: .5s;
}

.cat-item:hover div * {
    color: #FFFFFF !important;
}


/*** Property List ***/
.nav-pills .nav-item .btn {
    color: var(--dark);
}

.nav-pills .nav-item .btn:hover,
.nav-pills .nav-item .btn.active {
    color: #FFFFFF;
}

.property-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .08);
}

.property-item img {
    transition: .5s;
}

.property-item:hover img {
    transform: scale(1.1);
}

.property-item .border-top {
    border-top: 1px dashed rgba(0, 185, 142, .3) !important;
}

.property-item .border-end {
    border-right: 1px dashed rgba(0, 185, 142, .3) !important;
}


/*** Team ***/
.team-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .08);
    transition: .5s;
}

.team-item .btn {
    color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 0 30px rgba(0, 0, 0, .15);
}

.team-item .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}

.team-item:hover {
    border-color: var(--secondary) !important;
}

.team-item:hover .bg-primary {
    background: var(--secondary) !important;
}

.team-item:hover .bg-primary i {
    color: var(--secondary) !important;
}


/*** Testimonial ***/
.testimonial-carousel {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 576px) {
    .testimonial-carousel {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

.testimonial-carousel .testimonial-item .border {
    border: 1px dashed rgba(0, 185, 142, .3) !important;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 100%;
    height: 40px;
    top: calc(50% - 20px);
    left: 0;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 40px;
    font-size: 20px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--dark);
}


/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
    border-color: var(--light);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .form-control {
    border-color: rgba(255,255,255,0.5);
}

.footer .copyright {
    padding: 15px 0;
    font-size: 15px;
    border-top: none;
}

.footer .copyright a {
    color: var(--light);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

.search-bar {
    padding: 15px;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
    margin: 0 !important;
    margin-top: -1px !important;
}

.search-bar-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 !important;
    margin-top: -1px !important;
    margin-bottom: 0 !important;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.search-bar .btn {
    padding: 0.85rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 500;
}

/* Villa name in search bar - matches hero font */
.villa-name-search {
    font-family: 'Brush Script MT', cursive, 'Lucida Handwriting', 'Apple Chancery', serif;
    font-style: italic;
    font-size: 1.8rem;
}

.search-basic-info {
    gap: 0.75rem;
    padding: 0 0.5rem;
}

.max-width-600 {
    max-width: 600px;
}

.text-align-right {
    text-align: right;
}

.dashed-border {
    border: 1px dashed rgba(0, 185, 142, .3);
}

.feature-item {
    background-color: var(--light);
    border: 1px solid var(--primary);
    border-radius: .25rem;
    padding: 1rem;
    transition: all .3s ease-in-out;
}

.feature-item:hover {
    background-color: var(--primary);
    color: white;
}

.newsletter-signup {
    max-width: 400px;
}
