/* =========================================
   HOMEPAGE CUSTOM LAYOUT
   ========================================= */

/* Hero Image Container - Forced to full browser width */
.pv-hero {
    width: 100%;
    background: #000; 
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0;
}

.pv-hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Overlapping Cards Section */
.pv-explore-section {
    max-width: 1200px; /* Adapts to the theme container */
    margin: -50px auto 40px; /* The negative top margin creates the overlap */
    position: relative;
    z-index: 2;
    padding: 0 0px;
}

.pv-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Clickable Cards */
.pv-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    border-top: 4px solid var(--primary, #cb4b06); 
    display: block; 
    text-decoration: none !important; 
    transition: transform 0.15s ease, box-shadow 0.15s ease; 
    cursor: pointer;
}

.pv-card:hover {
    transform: translateY(-4px); 
    box-shadow: 0 10px 22px rgba(0,0,0,0.2); 
}

.pv-card h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #333333;
}

.pv-card h3 i {
    color: var(--primary, #cb4b06); 
    margin-right: 10px;
}

/* 
=========================================
SPLIDE JS CAROUSEL
========================================= 
*/
.pv-gallery-section {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 30px 45px; 
    background-color: #f4f6f8; 
    border-radius: 8px;
    border: 1px solid #eaedf1;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); 
    position: relative;
}

.pv-thumbnail-link {
    display: block;
    position: relative;
    overflow: hidden; 
    border-radius: 2px;
}

/* The Individual Photos */
.pv-thumbnail-link img {
    width: 100%; 
    height: 180px;
    object-fit: cover; 
    display: block;
    border: 4px solid #ffffff; 
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15); 
    transition: transform 0.3s ease;
}

.splide__slide.pv-fully-visible .pv-thumbnail-link:hover img {
    transform: scale(1.05); 
}

/* Custom Slide-Up Tooltip */
.pv-thumbnail-caption {
    position: absolute;
    bottom: -100%; 
    left: 4px; 
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 10px;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.3;
    transition: bottom 0.25s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40%;
}

/* CRITICAL FIX: Only trigger caption slide-up if the entire slide is fully visible */
.splide__slide.pv-fully-visible .pv-thumbnail-link:hover .pv-thumbnail-caption {
    bottom: 4px; 
}

/* =========================================
   CLEAN CAROUSEL ARROWS (NO BORDERS OR FOCUS RINGS)
   ========================================= */

.splide__arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 50px; 
    background: transparent !important;
    border: none !important;
    outline: none !important; /* Removes browser focus outline on click */
    box-shadow: none !important; /* Removes any default focus shadow */
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none !important;
    z-index: 3;
    opacity: 1;
    cursor: pointer;
}

.splide__arrow--prev {
    left: 0;
}

.splide__arrow--next {
    right: 0;
}

/* The Circular Button Icon */
.splide__arrow svg {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 50%;
    padding: 7px;
    fill: #444444;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, fill 0.2s ease, transform 0.2s ease;
}

/* Specifically point the Previous (Left) Arrow SVG in the correct direction */
.splide__arrow--prev svg {
    transform: rotate(180deg) !important;
}

/* Ensure region background stays clear on hover and click */
.splide__arrow:hover,
.splide__arrow:focus,
.splide__arrow:active {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Hover Behavior for Next Arrow */
.splide__arrow:hover svg {
    background: var(--primary, #cb4b06) !important;
    border-color: var(--primary, #cb4b06) !important;
    fill: #ffffff !important;
    transform: scale(1.08) !important;
}

/* Hover Behavior for Previous Arrow */
.splide__arrow--prev:hover svg {
    background: var(--primary, #cb4b06) !important;
    border-color: var(--primary, #cb4b06) !important;
    fill: #ffffff !important;
    transform: rotate(180deg) scale(1.08) !important;
}

/* =========================================
   FULL-HEIGHT "END - LOOPING" CAROUSEL MARKER
   ========================================= */

/* Forces the custom divider slide to match the full height of the track container */
.splide__slide.pv-end-marker-slide {
    height: auto !important;
    display: flex;
}

/* The vertical divider bar matching the container height */
.pv-end-marker {
    width: 100%;
    height: 100%;
    min-height: 180px; /* Matches the approximate height of the image thumbnails */
    background-color: #dce1e6; /* A slightly darker shade than the #f4f6f8 background fill */
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Horizontal text layout (no rotation) with bold font and high legibility */
.pv-end-text {
    writing-mode: horizontal-tb; /* Restores standard text flow */
    transform: none;
    font-size: 0.85rem;
    font-weight: 700; /* Bold font */
    letter-spacing: 0.1em;
    color: #475569; /* Dark, readable slate contrast */
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
    user-select: none;
}

/* Information Section (Clean 3-Column Text Grid) */
.pv-info-section {
    background-color: #f9f9f9; 
    padding: 60px 20px;
    border-top: 1px solid #eee;
}

.pv-info-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.pv-info-column h3 {
    color: var(--primary, #cb4b06);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.pv-card p, .pv-info-column p, .pv-info-column ul {
    color: #333333;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.pv-info-column ul {
    padding-left: 20px;
}

.pv-info-column li {
    margin-bottom: 8px;
}

/* Responsive Fallbacks */
@media (max-width: 900px) {
    .pv-card-grid {
        grid-template-columns: 1fr;
    }
    .pv-explore-section {
        margin-top: 20px; 
    }
    .pv-gallery-section {
        padding: 20px; 
    }
    .pv-info-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
    }
}