/* ========================================
   Custom Fence Page Styles
======================================== */

/* Hero */
.cf-hero {
    position: relative;
    width: 100%;
    height: 310px;
    overflow: hidden;
    background: #5a3a1a;
}

.cf-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
    display: block;
    filter: brightness(0.72);
}

.cf-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8%;
}

.cf-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    color: #e8833a;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    letter-spacing: 0.5px;
}

/* ========================================
   Section
======================================== */
.cf-section {
    background: #fff;
    padding: 50px 0 70px;
}

.cf-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px;
}

.cf-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    text-align: center;
    margin-bottom: 30px;
}

/* ========================================
   2-Column Image Grid
======================================== */
.cf-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 40px;
}

.cf-grid-2col {
    grid-template-columns: 1fr 1fr;
}

.cf-img-item {
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    background: #e0e0e0;
    aspect-ratio: 4/3;
    position: relative;
}

.cf-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cf-img-item:hover img {
    transform: scale(1.04);
}

/* ========================================
   Lightbox
======================================== */
.cf-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.cf-lightbox.active {
    display: flex;
}

.cf-lb-img-wrap {
    max-width: calc(100vw - 140px);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-lb-img-wrap img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    display: block;
}

.cf-lb-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 2.4rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    z-index: 10;
}

.cf-lb-close:hover {
    color: #95a148;
    transform: scale(1.15);
}

.cf-lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.cf-lb-arrow:hover {
    background: #95a148;
}

.cf-lb-arrow svg {
    width: 30px;
    height: 30px;
}

.cf-lb-prev { left: 20px; }
.cf-lb-next { right: 20px; }

.cf-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    white-space: nowrap;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 600px) {
    .cf-grid-2col {
        grid-template-columns: 1fr;
    }

    .cf-hero {
        height: 220px;
    }

    .cf-hero-overlay {
        justify-content: center;
        padding-right: 0;
    }

    .cf-lb-img-wrap {
        max-width: calc(100vw - 100px);
    }

    .cf-lb-prev { left: 10px; }
    .cf-lb-next { right: 10px; }
}
