/* Fort Gallery Widget Styles */
.fort-gallery-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.fort-gallery {
    display: grid;
    width: 100%;
}

/* Grid Layout */
.fort-gallery.layout-grid {
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    grid-auto-rows: minmax(200px, auto);
}

/* Masonry Layouts */
.fort-gallery.layout-masonry,
.fort-gallery.layout-masonry-grid {
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    grid-auto-rows: 200px;
}

/* Justified Layout */
.fort-gallery.layout-justified {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
}

.fort-gallery.layout-justified .gallery-item {
    flex-grow: 1;
    height: 200px;
    min-width: 150px;
}

.fort-gallery.layout-justified .gallery-item img {
    height: 100%;
    width: auto;
    max-width: 100%;
}

/* Column definitions */
.fort-gallery.columns-1 { --columns: 1; }
.fort-gallery.columns-2 { --columns: 2; }
.fort-gallery.columns-3 { --columns: 3; }
.fort-gallery.columns-4 { --columns: 4; }
.fort-gallery.columns-5 { --columns: 5; }
.fort-gallery.columns-6 { --columns: 6; }

/* Gallery Items */
.gallery-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Masonry item sizes */
.gallery-item--regular {
    grid-row: span 1;
}

.gallery-item--tall {
    grid-row: span 2;
}

.gallery-item--wide {
    grid-column: span 2;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.image-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Hover Effects */
.fort-gallery.hover-zoom .gallery-item:hover .image-wrapper img {
    transform: scale(1.1);
}

.fort-gallery.hover-fade .gallery-item:hover {
    opacity: 0.8;
}

.fort-gallery.hover-rotate .gallery-item:hover .image-wrapper img {
    transform: rotate(5deg) scale(1.05);
}

/* Overlay styles */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(0,0,0,0.6);
}

.fort-gallery.hover-slide .overlay {
    transform: translateY(100%);
    opacity: 1;
    transition: transform 0.3s ease;
}

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

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: #ffffff;
}

.overlay-content i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-content i {
    transform: scale(1.2);
}

/* Tabbed Gallery Styles */
.tabbed-gallery {
    display: flex;
    gap: 20px;
}

.tabbed-gallery.tab-position-top,
.tabbed-gallery.tab-position-bottom {
    flex-direction: column;
}

.tabbed-gallery.tab-position-bottom {
    flex-direction: column-reverse;
}

.tabbed-gallery.tab-position-left {
    flex-direction: row;
}

.tabbed-gallery.tab-position-right {
    flex-direction: row-reverse;
}

.fort-gallery-tabs {
    display: flex;
    gap: 5px;
}

.tab-position-top .fort-gallery-tabs,
.tab-position-bottom .fort-gallery-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-position-left .fort-gallery-tabs,
.tab-position-right .fort-gallery-tabs {
    flex-direction: column;
    min-width: 200px;
}

.fort-tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    color: #666666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
    border-radius: 4px;
}

.fort-tab-button:not(.active) {
    opacity: 0.7;
}

.fort-tab-button:hover {
    opacity: 1;
    background-color: #e5e5e5;
}

.fort-tab-button.active {
    display: inline-block;
    text-transform: capitalize;
    color: #000;
    font-size: 16px;
    padding-bottom: 5px;
    position: relative;
    text-decoration: none;
}

.fort-gallery-content {
    flex: 1;
    position: relative;
}

.fort-gallery-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.fort-gallery-tab-content.active {
    display: block;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading animation */
.fort-gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.fort-gallery-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 1024px) {
    .fort-gallery.columns-6 { --columns: 4; }
    .fort-gallery.columns-5 { --columns: 3; }
}

@media (max-width: 768px) {
    .fort-gallery {
        --columns: 2 !important;
        grid-auto-rows: 150px;
    }
    
    .gallery-item--wide {
        grid-column: span 1;
    }
    
    .tabbed-gallery.tab-position-left,
    .tabbed-gallery.tab-position-right {
        flex-direction: column;
    }
    
    .tab-position-left .fort-gallery-tabs,
    .tab-position-right .fort-gallery-tabs {
        flex-direction: row;
        min-width: auto;
        flex-wrap: wrap;
    }
    
    .fort-tab-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .fort-gallery {
        --columns: 1 !important;
        grid-auto-rows: 200px;
    }
    
    .gallery-item--wide,
    .gallery-item--tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .fort-gallery-wrapper {
        margin: 0 10px;
    }
    
    .tabbed-gallery {
        gap: 10px;
    }
    
    .fort-tab-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}


/* Print styles */
@media print {
    .fort-gallery {
        display: block !important;
    }
    
    .gallery-item {
        display: inline-block;
        width: 48%;
        margin: 1%;
        break-inside: avoid;
    }
    
    .overlay,
    .fort-gallery-tabs {
        display: none !important;
    }
}


/* High contrast mode */
@media (prefers-contrast: high) {
    .fort-tab-button {
        border: 2px solid;
    }
    
    .overlay {
        background-color: rgba(0,0,0,0.9);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .image-wrapper img,
    .overlay,
    .overlay-content i,
    .fort-tab-button {
        transition: none !important;
    }
    
    .fort-gallery-tab-content {
        animation: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .fort-tab-button {
        background-color: #333;
        color: #fff;
        border-color: #555;
    }
    
    .fort-tab-button:hover {
        background-color: #444;
    }
    
    .fort-tab-button.active {
        background-color: #0073aa;
        border-color: #0073aa;
    }
}

/**************************************************
 *********** FORT VILLAS **************************
 **************************************************/
.fort-villas-tabs {
    margin: 0 auto;
    margin-bottom: 2.4em;
}

.fort-villas-tabs-nav {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    border-bottom: none;
    padding-bottom: 0;
    transform: translateX(-100%);
    transition: transform 1s ease;
}

.fort-villas-tabs-nav.active {
    transform: translateX(0);
    transition: transform 1s ease;
}

.fort-villas-tab {
    padding: 0 13px;
}

.fort-villas-tab a {
    display: inline-block;
    text-transform: capitalize;
    color: var(--theme-color-alter_text, #666);
    font-size: 16px;
    padding-bottom: 5px;
    position: relative;
    text-decoration: none;
}

.fort-villas-tab a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: auto;
    right: 0;
    height: 2px;
    width: 0;
    background-color: #C91235;
    transition: all 0.3s;
}

.fort-villas-tab a:hover,
.fort-villas-tab.active a {
    color: #000;
}

.fort-villas-tab a:hover:after,
.fort-villas-tab.active a:after {
    width: 100%;
    left: 0;
    right: auto;
    transition: all 0.3s;
}

.fort-villas-tab-content {
    display: none;
}

.fort-villas-tab-content.active {
    display: block;
}

.villas {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 300px 300px;
    gap: 30px 30px;
    grid-template-areas:
        "lg-13-1 lg-13-1 sm-13-1"
        "lg-13-1 lg-13-1 sm-13-2";
    margin-top: 20px;
}

.villa1 {
    grid-area: lg-13-1;
}

.villa2 {
    grid-area: sm-13-1;
}

.villa3 {
    grid-area: sm-13-2;
}

.villa1,
.villa2,
.villa3 {
    position: relative;
    overflow: hidden;
}

.villa1 img,
.villa2 img,
.villa3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s;
}

.villa1:hover img,
.villa2:hover img,
.villa3:hover img {
    filter: brightness(70%);
}

.villa-overlay {
    position: absolute;
    color: #fff !important;
    padding: 40px 60px !important;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.villa1:hover .villa-overlay,
.villa2:hover .villa-overlay,
.villa3:hover .villa-overlay {
    opacity: 1;
    transform: translateY(0);
}

.villa-overlay.bottom-left {
    bottom: 0;
    left: 0;
}

.villa-overlay.bottom-right {
    bottom: 0;
    right: 0;
}

.villa-overlay.top-left {
    top: 0;
    left: 0;
}

.villa-overlay.top-right {
    top: 0;
    right: 0;
}

.villa-overlay h3 {
    margin: 0 0 5px;
    font-size: 30px;
	color: #fff;
}

.villa-overlay p {
    margin: 0 0 10px;
    font-size: 14px;
}

.villa-link {
    display: inline-block;
    color: #fff;
    text-decoration: none;
	box-shadow: inset 0 0 0 0 #54b3d6;
	margin: 0 -.25rem;
	padding: .25rem .5rem;
	transition: color .3s ease-in-out, box-shadow .3s ease-in-out;
    
}
.villa-link:hover {
	box-shadow: inset 100px 0 0 0 #fff;
	color: #000;
}

@media (max-width: 768px) {
    .villas {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 1fr); /* Three rows, each taking equal height */
        grid-template-areas:
            "lg-13-1"
            "sm-13-1"
            "sm-13-2";
        gap: 20px; /* Optional: smaller gap for mobile */
    }

    .villas > * {
        aspect-ratio: 1 / 1; /* Forces square shape */
        object-fit: cover; /* Ensures images cover the square area */
    }
}

/**************************************************
 *********** FORT Experiance **********************
 **************************************************/
.kepler-fort-experience-tabs {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 2.4em;
}

.kepler-fort-experience-tabs-nav {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    border-bottom: none;
    padding-bottom: 0;
    transform: translateX(-100%);
    transition: transform 1s ease;
}

.kepler-fort-experience-tabs-nav.active {
    transform: translateX(0);
    transition: transform 1s ease;
}

.kepler-fort-experience-tab {
    padding: 0px 13px;
}

.kepler-fort-experience-tab a {
    display: inline-block;
    text-transform: capitalize;
    color: var(--theme-color-alter_text, #666);
    font-size: 16px;
    padding-bottom: 5px;
    position: relative;
    text-decoration: none;
    font-family: 'Overpass';
}

.kepler-fort-experience-tab a:hover,
.kepler-fort-experience-tab.active a {
    color: var(--theme-color-alter_dark, #333);
}

.kepler-fort-experience-tab a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: auto;
    right: 0;
    height: 2px;
    width: 0;
    background-color: #C91235;
    transition: all 0.3s;
}

.kepler-fort-experience-tab a:hover:after,
.kepler-fort-experience-tab.active a:after {
    width: 100%;
    left: 0;
    right: auto;
    transition: all 0.3s;
}

.kepler-fort-experience-tab-content {
    display: none;
}

.kepler-fort-experience-tab-content.active {
    display: block;
}

.experience-gallery-wrapper {
    overflow: visible;
    width: 100%;
    position: relative;
}

.kepler-fort-experience-carousel {
    padding: 20px 0;
}

.kepler-fort-experience-carousel .swiper-slide {
    position: relative;
    min-width: 300px;
    height: 500px;
}

.experience-image {
    width: 100%;
    height: 100%;
}

.experience-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.experience-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff !important;
    padding-left: 20%;
    padding-right: 20%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experience-image:hover img,
.experience-image:active img {
    filter: brightness(50%);
}

.experience-image:hover .image-overlay,
.experience-image:active .image-overlay {
    opacity: 1;
}

.experience-image .image-overlay h3 {
    font-family: 'Overpass';
    font-weight: 100;
    margin: 0;
    font-size: 28px;
    color: #fff !important;
    text-align: center;
    padding-bottom: 18px;
}

.experience-image .image-overlay p {
    font-family: 'Overpass';
    font-weight: 100;
    line-height: normal;
    margin: 10px 0 0;
    font-size: 16px;
    text-align: center;
}

/* Swiper Navigation and Pagination */
.swiper-button-prev,
.swiper-button-next {
    color: #C91235;
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(255, 255, 255, 1);
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 20px;
}

.swiper-pagination-bullet {
    background: #666;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: #C91235;
    opacity: 1;
}

.swiper-pagination {
	bottom: -9px !important;
}

/* Mobile Layout */
@media (max-width: 768px) {
    

    .experience-image {
        aspect-ratio: 1 / 1;
    }

    .experience-image img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    .swiper-button-prev,
    .swiper-button-next {
        display: none; /* Optional: hide navigation arrows on mobile */
    }

    .swiper-pagination {
        bottom: 0px !important;
    }
}