/*********************************************************************************

	Template Name: Triplog Club
	Description: Travel portfolio website for sharing travel experiences.
	Version: 2.0 (Performance Optimized - 2026)

	Note: This is custom css with modern performance features.

**********************************************************************************/

/* ========================================
   HERO SLIDER - Pure CSS (no JS library)
   ======================================== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-slider__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slider__slides input[type="radio"] {
    display: none;
}

.hero-slider__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slider__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    width: 90%;
    max-width: 700px;
}

.hero-slider__content h1 {
    font-size: clamp(26px, 5vw, 60px);
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 1s ease forwards;
    animation-delay: 0.3s;
}

.hero-slider__btn {
    display: inline-block;
    padding: 0 30px;
    line-height: 55px;
    font-size: 16px;
    font-weight: 700;
    color: #02264C;
    background-color: #FFDC43;
    border-radius: 5px;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 1s ease forwards;
    animation-delay: 0.6s;
}

.hero-slider__btn:hover {
    background-color: #02264C;
    color: #ffffff;
    transform: translateY(-3px);
    text-decoration: none;
}

/* Slide activation via radio buttons */
.hero-slider__slides input#slide1:checked ~ .hero-slider__slide:nth-of-type(1),
.hero-slider__slides input#slide2:checked ~ .hero-slider__slide:nth-of-type(2),
.hero-slider__slides input#slide3:checked ~ .hero-slider__slide:nth-of-type(3) {
    opacity: 1;
    z-index: 2;
    animation: none;
}

/* Auto-play via CSS animation */
.hero-slider__slide:nth-of-type(1) {
    animation: heroAutoplay 15s infinite;
}
.hero-slider__slide:nth-of-type(2) {
    animation: heroAutoplay 15s infinite 5s;
}
.hero-slider__slide:nth-of-type(3) {
    animation: heroAutoplay 15s infinite 10s;
}

@keyframes heroAutoplay {
    0%, 2% { opacity: 0; }
    5%, 30% { opacity: 1; z-index: 2; }
    35%, 100% { opacity: 0; z-index: 1; }
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation dots */
.hero-slider__nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.hero-slider__nav label {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero-slider__nav label:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.hero-slider__slides input#slide1:checked ~ .hero-slider__nav label:nth-of-type(1),
.hero-slider__slides input#slide2:checked ~ .hero-slider__nav label:nth-of-type(2),
.hero-slider__slides input#slide3:checked ~ .hero-slider__nav label:nth-of-type(3) {
    background: #ffffff;
    transform: scale(1.3);
}

/* Dark overlay on slides */
.hero-slider__slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-slider__content {
    z-index: 3;
}

@media (max-width: 767px) {
    .hero-slider {
        height: 70vh;
        min-height: 400px;
    }
    .hero-slider__content h1 {
        margin-bottom: 20px;
    }
}

/* ========================================
   PERFORMANCE: Content-Visibility
   Skip rendering of off-screen sections
   ======================================== */
.bk-portfolio-with-caption-area {
    content-visibility: auto;
    contain-intrinsic-size: 0 3000px;
}

.brook-testimonial-area {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

.page-footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}

/* ========================================
   PERFORMANCE: Improved image rendering
   ======================================== */
img {
    height: auto;
    max-width: 100%;
}

img[loading="lazy"] {
    background-color: #f0f0f0;
    transition: opacity 0.3s ease;
}

/* ========================================
   PERFORMANCE: Reduce motion for users 
   who prefer reduced motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .wow {
        animation: none !important;
        visibility: visible !important;
    }
}

/* ========================================
   MODERN: Smooth scrolling
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* ========================================
   MODERN: Better focus visibility for a11y
   ======================================== */
:focus-visible {
    outline: 3px solid #4A90D9;
    outline-offset: 2px;
}

/* ========================================
   MODERN: Aspect ratio for video thumbs
   ======================================== */
.video-with-thumb .thumb img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

/* ========================================
   MODERN: Dark mode support
   ======================================== */
@media (prefers-color-scheme: dark) {
    .bg_color--1 {
        background-color: #1a1a1a;
    }
    
    .heading,
    .bk_pra {
        color: #e0e0e0;
    }
}

/* ========================================
   THEME COLOR OVERRIDES
   Replace black/dark (#000, #222) with
   brand color #02264C throughout
   ======================================== */

/* Footer background: override .bg_color--3 from #000 to #02264C */
.bg_color--3 {
    background: #02264C !important;
}

/* Dark backgrounds used in theme */
.bg_color--4 {
    background: #02264C !important;
}
.bg_color--7 {
    background: #02264C !important;
}

/* Headings color */
.heading {
    color: #02264C;
}
.heading.bk-hover a {
    color: #02264C;
}

/* Dark button */
a.brook-btn.bk-btn-dark,
button.brook-btn.bk-btn-dark {
    background: #02264C !important;
    color: #fff !important;
}
a.brook-btn.bk-btn-dark:hover,
button.brook-btn.bk-btn-dark:hover {
    background: #02264C !important;
    color: #fff !important;
}

/* Theme button - no color change on hover */
a.brook-btn.bk-btn-theme,
button.brook-btn.bk-btn-theme {
    background: #FFDC43 !important;
}
a.brook-btn.bk-btn-theme:hover,
button.brook-btn.bk-btn-theme:hover {
    background: #FFDC43 !important;
}

/* Header sticky background */
.br_header.headroom--sticky.headroom--not-top {
    background-color: #02264C !important;
}

/* Copyright area border */
.copyright {
    border-top-color: rgba(255, 255, 255, 0.15);
}

/* Video section heading colors */
.caption-bottom .info h5.heading {
    color: #02264C;
}
.portfolio.with-caption .caption-bottom,
.portfolio.with-caption .caption-bottom .info,
.portfolio.with-caption .caption-bottom .info h5,
.portfolio.with-caption .caption-bottom .info p {
    text-align: left !important;
}
.portfolio.with-caption .caption-bottom {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Call to Action heading */
.brook-call-to-action .heading-h3 {
    color: #02264C;
}

/* Testimonial text: yellow quote, white name, light role */
.testimonial-nav-content .testimonial-nav .content p {
    color: #FFDC43 !important;
}
.testimonial-nav-content .testimonial-nav .content .testimonial-info .clint-info h6 {
    color: #fff !important;
}
.testimonial-nav-content .testimonial-nav .content .testimonial-info .clint-info span {
    color: #FFDC43 !important;
}
.testimonial-nav-content .testimonial-nav .content .rating li i {
    color: #FFDC43 !important;
}

/* Testimonial background image override to WebP */
.bg_image--119 {
    background-image: url(../img/bg/bg-image-119.webp) !important;
    background-position: left center !important;
}

/* Testimonial image ring: yellow & dark (no orange) */
.testimonial-nav-style .slick-center .clint-thumb {
    background-image: linear-gradient(270deg, #02264C 0%, #FFDC43 100%) !important;
}

/* ========================================
   GALLERY TILES - CSS Grid Layout
   ======================================== */
.gallery-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.gallery-tiles__item {
    overflow: hidden;
    position: relative;
    border-radius: 2px;
    aspect-ratio: 4 / 3;
}
.gallery-tiles__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
}
.gallery-tiles__item:hover img {
    transform: scale(1.08);
    filter: brightness(0.85);
}

/* Tablet */
@media only screen and (max-width: 991px) {
    .gallery-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media only screen and (max-width: 575px) {
    .gallery-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}