/* --- css/home.css --- */

/* Specific Parallax Backgrounds for Home Page */
.hero-parallax {
    background-image: linear-gradient(rgba(58, 53, 50, 0.6), rgba(58, 53, 50, 0.6)), url('/images/background/home.jpg');
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #FCFAF5;
    text-align: center;
    padding: 0 20px;
}

.hero-parallax h1 {
    font-size: 4.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-parallax p {
    font-size: 1.3rem;
    max-width: 800px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.why-parallax {
    background-image: linear-gradient(rgba(74, 107, 74, 0.85), rgba(74, 107, 74, 0.85)), url('/images/other/image3.jpeg');
}

.test-parallax {
    background-image: linear-gradient(rgba(74, 107, 74, 0.85), rgba(74, 107, 74, 0.85)), url('/images/background/man.jpeg');
}

/* Home Page specific tweaks */
#testimonials .card {
    border-top: 4px solid #4A6B4A;
    font-style: italic;
}

/* --- Overlapping Photo Stack (Origin) --- */
.photo-stack-container {
    position: relative;
    width: 100%;
}

.photo-stack-container img {
    box-shadow: none !important;
}

.photo-stack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stack-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(100% - 20px);
    height: auto;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.8s ease-in-out;
    box-shadow: 0 10px 30px rgba(58, 53, 50, 0.2) !important;
}

.stack-photo.active {
    opacity: 1;
    z-index: 2;
    transform: translate(0, 0);
}

.stack-photo.next {
    opacity: 1;
    z-index: 1;
    transform: translate(-20px, 20px);
    filter: brightness(0.8);
}

.stack-photo:not(.active):not(.next) {
    transform: translate(-40px, 40px);
    z-index: 0;
}

/* --- Blog Pop-Up Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(58, 53, 50, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #FCFAF5;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 8px;
    padding: 3rem 4rem;
    position: relative;
    overflow-y: auto;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #5A5552;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover { color: #8C4A32; }

.modal-header {
    border-bottom: 2px solid #EAE1D3;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.modal-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #4A6B4A;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #3A3532;
    line-height: 1.2;
}

.modal-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #5A5552;
    margin-bottom: 1.5rem;
}

/* --- MOBILE FIXES FOR HOME.CSS --- */
@media (max-width: 900px) {
    .hero-parallax {
        padding: 0 15px;
    }

    .hero-parallax h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 10px;
    }

    .hero-parallax p {
        font-size: 1.1rem;
    }

    /* Stack fixes */
    .photo-stack-container { margin-top: 30px; height: auto; }
    .stack-photo.next { transform: translate(-10px, 10px); }
    .stack-photo:not(.active):not(.next) { transform: translate(-20px, 20px); }

    /* Modal fixes */
    .modal-content { padding: 2rem 1.5rem; width: 95%; }
    .modal-title { font-size: 1.8rem; }
    .modal-close { top: 0.5rem; right: 1rem; }

    /* For home.html's organic grid (Swipe fix) */
    .organic-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important; /* Forces left edge */
        overflow-x: auto !important;
        gap: 20px !important;
        padding-bottom: 20px !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .organic-grid::-webkit-scrollbar { display: none; }
    
    .organic-box {
        flex: 0 0 260px !important; /* Fixed width prevents squishing */
        width: 260px !important;
        scroll-snap-align: center !important;
        padding: 2rem 1.5rem !important;
    }
}