/* ============================================
   HOME - PAGE STYLES (Split Horizontal Layout)
   ============================================ */

@import url('../assets/css/global.css');

/* Reset */
body {
    padding-top: 0 !important;
    overflow-x: hidden;
    background: #000; /* Fallback */
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Prevent scrolling if everything fits */
}

/* ===== BACKGROUND LAYER ===== */
.background-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./images/Home-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Dim overlay to make cards pop */
.background-fullscreen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}


/* ===== PAGE CONTAINER (On Top) ===== */
.page-container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Header top, Cards middle/center, Footer bottom */
    pointer-events: none; /* Let clicks pass through to cards, but enable for container children */
}

/* Header */
.home-header {
    pointer-events: auto;
    width: 100%;
    padding: 24px 0;
    text-align: center;
    color: white;
}

.brand-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.brand-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
}

.brand-sub .group {
    font-family: "Inter", sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.4rem;
    font-weight: 300;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.brand-sub .line {
    height: 1px;
    width: 40px;
    background: rgba(255, 255, 255, 0.7);
}

/* Cards Container */
.cards-container {
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    height: 100%;
    position: absolute; /* Occupy full space, overlaying header/footer logically spacing wise */
    top: 0;
    left: 0;
    align-items: center; /* Vertical Center */
    justify-items: center; /* Horizontal Center per column */
    padding: 120px 0 60px 0; /* Space for Header and Footer */
}

/* Card */
.card {
    position: relative;
    width: 85%; /* Responsive width within column */
    max-width: 320px;
    height: 55vh; /* Height relative to viewport */
    min-height: 400px;
    perspective: 1500px;
    cursor: pointer;
    text-decoration: none;
}

.face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Front Face */
.face.front {
    background-color: white;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transform: rotateY(0deg);
}

/* Specific Card Front Images (Restoring them) */
.card-vacations .face.front {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/vacations-front.jpg');
}
.card-living .face.front {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/living-front.jpg');
}
.card-construction .face.front {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/construction-front.jpg');
}
.card-investments .face.front {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/investments-front.jpg');
}

.front-content {
    /* Transparent background, text directly on image */
    background: transparent;
    padding: 0;
    text-align: center;
    box-shadow: none;
}

.front-eden {
    font-family: "Cormorant Garamond", serif;
    font-size: 3rem; /* Slightly larger since no box constraining it */
    font-weight: 700;
    line-height: 1;
    color: white; /* Switch to white for better visibility on images */
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.front-sub {
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}


/* Back Face */
/* Back Face */
.face.back {
    background: var(--airbnb-dark);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: flex-end; /* Align to bottom */
    justify-content: center;
    padding: 32px 32px 64px 32px; /* Extra bottom padding */
    text-align: center;
    position: relative; /* Needed for overlay */
}

/* Dark overlay for readability */
.face.back::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); /* Slightly lighter overlay if text is big */
    z-index: 1;
}

.hover-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.kicker {
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    opacity: 0.9;
}

.headline {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem; /* Initial size, maybe user wants bigger? */
    font-weight: 600;
    line-height: 1.1;
}

/* Specific Card Back Images (Moved from BG cols) */
.card-vacations .face.back {
    background-image: url('../assets/images/vacations-back.jpg');
    background-size: cover;
    background-position: center;
}
.card-living .face.back {
    background-image: url('../assets/images/living-back.jpg');
    background-size: cover;
    background-position: center;
}
.card-construction .face.back {
    background-image: url('../assets/images/construction-back.jpg');
    background-size: cover;
    background-position: center;
}
.card-investments .face.back {
    background-image: url('../assets/images/investments-back.jpg');
    background-size: cover;
    background-position: center;
}

/* Hover Flip */
.card:hover .face.front {
    transform: rotateY(-180deg);
}

.card:hover .face.back {
    transform: rotateY(0deg);
}

/* Hover Effect on Background Column (Optional polish) */
.bg-col {
    transition: filter 0.4s;
}
/* When hovering a card, maybe brighten the corresponding background? 
   Hard to target "sibling's parent sibling" in CSS. layout structure:
   BG is separate sibling. 
   We can just leave it static.
*/


/* Footer */
.home-footer {
    pointer-events: auto;
    width: 100%;
    padding-bottom: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}


/* Responsive */
@media (max-width: 1024px) {
    .brand-title { font-size: 3.5rem; }
    .cards-container { padding: 100px 10px; gap: 10px; }
    .card { width: 95%; min-height: 300px; }
}

@media (max-width: 768px) {
    /* Stack layout for mobile */
    body { height: auto; overflow-y: auto; }
    
    .brand-title {
        font-size: 3rem; /* Smaller title for mobile */
    }

    .cards-container {
        position: relative;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        padding: 40px 24px 40px; /* Reduced top padding */
        gap: 40px;
    }
    
    .card {
        height: 400px;
        width: 100%;
        max-width: 400px; /* Slightly wider on mobile */
    }
}
