/* location-details.css */

.hero-bg-video2 {
    width: 100%;
    height: 400px;
    object-fit: cover;
    z-index: 0; /* Keeps it behind the text (z-index: 1 & 2) */
    border-radius: 15px;
}

.details-page-wrapper {
    padding: 8rem 2rem 4rem; /* Accounts for fixed navbar */
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
}

/* Header */
.details-header {
    text-align: center;
    margin-bottom: 4rem;
}

.details-header h1 {
    color: #00346b;
    font-size: 3rem;
    margin: 0 0 10px 0;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.details-badge {
    font-size: 1rem;
    padding: 5px 15px;
}

/* Split Section */
.details-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 5rem;
}

.details-text h2 {
    color: #00346b;
    font-size: 1.8rem;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.details-text p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.details-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.doc_links {
    margin: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
}
.doc_links_secondary {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.doc_links a {
    padding: 1rem;
}

/* Specs Chart */
.details-specs {
    margin-bottom: 5rem;
    background: #f8f9fa;
    padding: 3rem;
    border-radius: 15px;
}

.details-specs h2 {
    color: #00346b;
    text-align: center;
    margin-bottom: 2rem;
}

.details-specs h4 {
    color: #00346b;
}

.details-specs p, li {
    color: #555;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

/* Updated spec-card with hover effect */
.spec-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.spec-card.clickable {
    cursor: pointer;
}

.spec-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.spec-card h4 {
    color: #00346b;
    margin: 0 0 5px 0;
}

.spec-card p {
    color: #666;
    margin: 0;
    font-weight: 600;
}

/* --- COLLAPSIBLE BUTTON & AREA --- */
.vezi-mai-mult-btn {
    background-color: #00346b;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.vezi-mai-mult-btn:hover {
    background-color: #00234a;
}

.specs-collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
}

.specs-collapsible.expanded {
    max-height: 100%; /* 100% should work for a very long and narrow column*/
}

/* Configuration Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-top: 2.5rem;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.config-table th, .config-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 0.95rem;
}

.config-table th {
    background-color: #00346b;
    color: #fff;
    font-weight: 500;
}

.config-table tr:hover {
    background-color: #f0f4f8;
}

.pdf-link {
    color: #d9534f;
    text-decoration: none;
    font-weight: 600;
}

.pdf-link:hover {
    color: #c9302c;
}

/* Slider Section */
.details-gallery {
    margin-bottom: 5rem;
}

.details-gallery h2 {
    color: #00346b;
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    background: #000;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-prev, .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.gallery-prev:hover, .gallery-next:hover {
    background: #00346b;
}

.gallery-prev { left: 0; }
.gallery-next { right: 0; }

/* Thumbnail Slider */
.gallery-thumbnails {
    display: flex;
    justify-content: start;
    gap: 15px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    padding: 10px 5px;
}

.thumbnail {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease, border 0.3s ease;
    border: 3px solid transparent;
}

.thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    border: 3px solid #00346b;
    transform: scale(1.05);
}

/* Inquiry Section */
.details-inquiry {
    margin-bottom: 2rem;
}

.inquiry-box {
    background: #fff;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.inquiry-box h2 {
    color: #00346b;
    margin-top: 0;
}

.inquiry-box p {
    color: #666;
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

/* Mobile Responsiveness */
/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* 1. Remove side padding from the main wrapper to allow edge-to-edge elements */
    .details-page-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 6rem; /* Keeps space for the navbar */
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* 2. Add padding back to text/headers so they don't touch the screen edge */
    .details-header, 
    .details-text, 
    .details-gallery h2 {
        padding: 0 1.5rem;
        box-sizing: border-box;
    }

    .details-header h1 {
        font-size: 2rem;
    }

    /* 3. Split Layout: Stack items, remove border-radius from the hero image */
    .details-split {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .details-image {
        order: -1; /* Puts image above text on mobile */
        width: 100%;
    }
    
    .details-image img {
        border-radius: 0 !important; /* Square edges */
        height: 300px;
    }

    /* 4. Specs Container: Edge-to-edge, square edges, reduced margins */
    .details-specs {
        padding: 2.5rem 1.5rem !important;
        border-radius: 0 !important; /* Square edges */
        margin-bottom: 3rem;
    }

    /* 5. Gallery Container: Edge-to-edge, square edges */
    .gallery-container {
        height: 300px;
        border-radius: 0 !important; /* Square edges */
    }

    .gallery-thumbnails {
        justify-content: flex-start; /* Better scrolling on mobile */
        padding: 10px 1.5rem;
    }
    
    .thumbnail {
        width: 80px;
        height: 55px;
    }

    /* 6. Inquiry Box: Edge-to-edge, square edges, clean borders */
    .details-inquiry {
        margin-bottom: 0;
    }

    .inquiry-box {
        padding: 2.5rem 1.5rem !important;
        border-radius: 0 !important; /* Square edges */
        box-shadow: none !important;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }

    .form-row {
        flex-direction: column;
    }
    
    /* Make the captcha container fill the screen but keep its pill shape */
    .captcha-container {
        width: 100% !important;
    }
    
    .checkbox-group label {
        min-width: auto;
    }
/* --- MOBILE TABLE CONVERSION (CARD VIEW) --- */
    
    /* Remove the horizontal scroll from the wrapper */
    .table-responsive {
        overflow-x: hidden; 
    }

    /* Force table elements to stack as blocks */
    .config-table, 
    .config-table tbody, 
    .config-table tr, 
    .config-table td { 
        display: block; 
        width: 100%; 
        box-sizing: border-box;
    }
    
    /* Hide the traditional desktop table headers */
    .config-table thead { 
        display: none; 
    }
    
    /* Turn each row into a distinct, elevated card */
    .config-table tr { 
        margin-bottom: 2rem;
        border: 2px solid #00346b; /* Brand color border */
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }
    
    /* Style each cell as a flex row (Label on left, Data on right) */
    .config-table td { 
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-bottom: 1px solid #eee;
        padding: 12px 15px !important;
        font-size: 0.95rem;
    }
    
    .config-table td:last-child {
        border-bottom: none;
        background-color: #fcfcfc;
    }

    /* Set up the injected labels */
    .config-table td::before { 
        font-weight: 700;
        color: #00346b;
        text-align: left;
        padding-right: 15px;
    }
    
    /* Inject the column names based on their position! */
    .config-table td:nth-of-type(1)::before { content: "Spațiu:"; }
    .config-table td:nth-of-type(2)::before { content: "Arie Utilă:"; }
    .config-table td:nth-of-type(3)::before { content: "Balcon:"; }
    .config-table td:nth-of-type(4)::before { content: "Boxă:"; }
    .config-table td:nth-of-type(5)::before { content: "Total Supr. Utilă:"; }
    .config-table td:nth-of-type(6)::before { content: "Terasă:"; }
    .config-table td:nth-of-type(7)::before { content: "Status:"; }
    .config-table td:nth-of-type(8)::before { content: "Plan:"; }
    
    /* Make the first row (Apartment Name) look like a card header */
    .config-table td:nth-of-type(1) {
        background-color: #00346b;
        color: white;
        font-size: 1.1rem;
        font-weight: bold;
    }
    
    /* Ensure the injected label on the header is also white */
    .config-table td:nth-of-type(1)::before {
        color: white;
    }
    .hero-bg-video2 {
    width: 100vw;
    height: 100vw;
    object-fit: cover;
    z-index: 0; /* Keeps it behind the text (z-index: 1 & 2) */
    border-radius: 0px;
}
}