/* --- GLOBAL STYLES --- */
:root {
    --primary-blue: #296CA8;
    --sidebar-width: 280px;
    --text-main: #333;
    --bg-grey: #f4f4f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    /* Your font */
    color: var(--text-main);
    background-color: white;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* --- LAYOUT CONTAINER --- */
.layout-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR (Fixed Left) --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
    border-right: 1px solid #eee;
    /* Optional subtle divider */
}

.logo-area {
    margin-bottom: 40px;
}

.logo {
    width: 80px;
    margin-bottom: 15px;
    display: block;
}

/* Adjust size as needed */

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.brand-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.architect-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 1px;
    margin-top: 8px;
}

/* NAVIGATION */
.main-nav li {
    margin-bottom: 18px;
}

.main-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #222;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-blue);
    font-weight: 800;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
    font-size: 0.75rem;
    color: #888;
}

.lang-switch {
    cursor: pointer;
    margin-bottom: 10px;
    font-weight: 600;
}

/* --- MAIN CONTENT AREA --- */
.content-area {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

/* --- HERO & SECTIONS --- */
.page-hero {
    height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 60px;
}

/* Page Specific Hero Backgrounds */
.hero-atelier {
    background-image: url('images/bg-atelier.jpg');
    height: 400px;
    /* Specific height override from inline style */
}

.hero-vas-domov {
    background-image: url('images/bg-vas-domov.jpg');
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50vh;
    /* Balanced height */
    margin-bottom: 30px;
    /* Reduced gap below hero */
}

/* ... existing code ... */

.intro-text {
    font-size: 1.1rem;
    max-width: 800px;
    margin-bottom: 30px;
    /* Reduced margin */
}



.content-padding {
    padding: 0 80px 80px 80px;
    max-width: 1200px;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

h2 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    text-transform: uppercase;
}

p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

/* --- PORTFOLIO GRID (Seamless) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 0;
    /* SEAMLESS like Atelier Barka */
}

.project-card {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    display: block;
    /* Ensure anchor behaves like block */
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.project-meta {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #444;
}

/* Hover Effects */
.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-title {
    transform: translateY(0);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

/* --- FORMS & CONTACT --- */
.contact-split {
    display: flex;
    gap: 60px;
}

.contact-left,
.contact-right {
    flex: 1;
}

input,
textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    background: #fcfcfc;
    font-family: inherit;
}

button.btn-submit {
    padding: 15px 40px;
    background: var(--primary-blue);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

/* --- MOBILE --- */
@media (max-width: 900px) {
    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .content-area {
        margin-left: 0;
        width: 100%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .content-padding {
        padding: 40px 20px;
    }

    .contact-split {
        flex-direction: column;
        gap: 40px;
    }

    /* Mobile Typography & Hero Adjustments */
    .page-hero {
        height: 40vh;
        /* Reduce height on mobile */
        min-height: 250px;
    }

    .hero-atelier {
        height: 300px;
        /* Specific adjustment for atelier */
    }

    h1 {
        font-size: 1.8rem;
    }

    /* FIX: Force scroll attachment on mobile to prevent image disappearance */
    body,
    .page-hero,
    .hero-atelier,
    .hero-vas-domov {
        background-attachment: scroll !important;
        background-position: center top !important;
    }

    /* FIX: Explicitly force background for vas-domov on mobile */
    .hero-vas-domov {
        background-image: url('images/bg-vas-domov.jpg') !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    .main-quote {
        font-size: 1.5rem !important;
        /* Smaller quote on index */
    }

    .content-padding {
        padding: 40px 20px;
        /* Reduced padding */
    }
}

/* --- ADDED FOR MUSIC & EXTRAS --- */
.audio-btn.active {
    color: var(--primary-blue);
}

/* --- ATELIER GRID --- */
.atelier-grid {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .atelier-grid {
        gap: 30px;
        /* Smaller gap on mobile */
        margin-top: 20px;
    }

    .atelier-image {
        max-width: 100%;
        /* Ensure it fits constraints */
        width: 100%;
        /* Take available space up to constraint */
    }

    .atelier-image img {
        max-width: 250px;
        /* Limit maximum width of the image itself */
        width: 100%;
        margin: 0 auto;
        /* Center if container is wider */
        display: block;
    }
}



.atelier-image {
    flex: 0 1 auto;
    /* Don't grow, just take image width */
    max-width: 100%;
}

.atelier-image img {
    max-width: 380px;
    /* Global limit for desktop as well */
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 2px;
}

.atelier-info {
    flex: 1;
    min-width: 300px;
}

.atelier-info h2 {
    margin-top: 0;
    margin-bottom: 25px;
}

.atelier-info p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.btn-collaborate {
    width: auto;
    cursor: pointer;
    padding: 15px 30px;
    background: #111;
    color: white;
    border: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-collaborate:hover {
    background: #333;
}

.atelier-specs {
    display: grid;
    grid-template-columns: 1fr;
    /* Stacked layout 1 column */
    gap: 30px;
}

/* Removed media query as it's now always 1 column */

.atelier-specs h4 {
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.divider {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.hero-title {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}



/* --- PROJECT DETAIL SLIDESHOW --- */
#detail-overlay {
    display: none;
    /* Only used if overlay logic is active, but here we use direct page */
}

/* For project.html specifically */
.detail-visuals {
    position: relative;
    width: 100%;
    height: 60vh;
    background: #f4f4f4;
    overflow: hidden;
    margin-bottom: 40px;
}

.detail-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.detail-slide.active {
    opacity: 1;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: none;
}

.gallery-nav {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.gallery-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.gallery-btn:hover {
    background: #eee;
}

/* Case Study Blocks */
.case-study-block {
    margin-bottom: 20px;
}

strong {
    font-weight: 700;
}