/* Base styles for R V Stavby */

:root {
    --color-orange-light: #E26421;
    --color-orange-dark: #DE621D;
    --color-blue-dark: #044474;
    --color-blue-light: #2996C8;
    --color-white: #ffffff;
    --color-gray-bg: #f8f9fa;
    --color-text: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-gray-bg);
    color: var(--color-text);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: var(--color-blue-dark);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-orange-light);
    color: var(--color-white);
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--color-orange-dark);
}

.btn-secondary {
    background-color: var(--color-blue-light);
}

.btn-secondary:hover {
    background-color: var(--color-blue-dark);
}

/* Forms */
input, textarea, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

input[type="submit"], button {
    width: auto;
}

/* Typography & Layout */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

* {
    font-family: 'Outfit', sans-serif;
}

/* Header */
.header {
    background: var(--color-white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.nav a {
    text-decoration: none;
    color: var(--color-blue-dark);
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--color-orange-light);
}

.logo img {
    height: 50px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue-light) 100%);
    color: var(--color-white);
    padding: 100px 0;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero h1 {
    color: var(--color-white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.about-box p {
            line-height: 1.6;
            
            /* 1. ODSAZENÍ PRVNÍHO ŘÁDKU (INDENT) */
            text-indent: 2.5rem; /* Můžeš použít i pixely, např. 40px */
            
            /* 2. Zarovnání a dělení slov (typické pro knihy) */
            text-align: justify; 
            hyphens: auto;
            
            /* 3. U klasického odsazení se většinou nedělají mezery mezi odstavci */
            margin-top: 0;
            margin-bottom: 0; 
        }

/* Services */
.services-section {
    padding: 80px 0;
    background: var(--color-white);
}

.services-section h2, .references-section h2, .about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.service-card {
    max-width: 200px;
    width: 100%;
    background: var(--color-gray-bg);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Dropdown Menu in Header */
.dropdown {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}
.dropbtn {
    text-decoration: none;
    color: var(--color-blue-dark);
    font-weight: 600;
    cursor: pointer;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-white);
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 2000;
    border-radius: 5px;
    top: 100%;
}
.dropdown-content a {
    color: var(--color-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin-left: 0;
    font-weight: 400;
}
.dropdown-content a:hover {
    background-color: #f9f9f9;
    color: var(--color-orange-light);
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* References */
.references-section {
    padding: 80px 0;
    background: #f0f4f8;
}

/* Slider / Gallery */
.gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 30px;
    padding-bottom: 20px;
}
.gallery::-webkit-scrollbar {
    height: 8px;
}
.gallery::-webkit-scrollbar-thumb {
    background: var(--color-blue-light);
    border-radius: 4px;
}

.reference-card {
    flex: 0 0 300px;
    scroll-snap-align: center;
    background: var(--color-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.ref-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    cursor: pointer;
    overflow: hidden;
    background: var(--color-blue-dark);
}
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}
.ref-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.ref-img.active {
    opacity: 1;
}

.ref-content {
    padding: 20px;
}

.ref-content hr {
    margin: 15px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.ref-content blockquote {
    font-style: italic;
    color: #555;
    border-left: 4px solid var(--color-orange-light);
    padding-left: 10px;
}

.ref-content blockquote footer {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
    font-weight: 600;
}

/* Contact */
.contact-section {
    padding: 80px 0;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.info-item {
    margin-bottom: 20px;
    background: var(--color-white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Footer */
footer {
    background: var(--color-blue-dark);
    color: var(--color-white);
    padding: 10px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-to-top {
    background: var(--color-orange-light);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--color-white);
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* --- New UI / UX Enhancements --- */

/* Services Clickability */
.clickable {
    cursor: pointer;
}
.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    background: #fff;
    border-color: var(--color-orange-light);
}

/* Detail Modal */
.detail-modal-wrapper {
    background-color: rgba(0,0,0,0.85);
}
.detail-modal-content {
    width: 90vw;
    height: 90vh; /* Exactly 90% */
    max-width: none;
    margin: 5vh auto;
    text-align: left;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 15px;
}
.detail-modal-content .close {
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 100;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.modal-split-container {
    display: flex;
    width: 100%;
    flex: 1 1 auto;
    overflow: hidden;
    height: 95%; /* Top 95% */
}
.modal-half-left {
    width: 50%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.modal-half-left img {
    max-width: 100%;
    max-height: calc(100% - 40px); /* Leave room for title */
    object-fit: contain;
}
.modal-half-right {
    width: 50%;
    height: 100%;
    padding: 40px 40px 40px 20px;
    overflow-y: auto;
}

.modal-bottom-bar {
    width: 100%;
    flex: 0 0 5%;
    min-height: 60px;
    display: none;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}
.modal-bottom-left, .modal-bottom-right {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.popup-btn {
    background: var(--color-blue-light);
    padding: 8px 20px;
    font-size: 14px;
}

/* Mobile Nav - Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}
.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--color-blue-dark);
    transition: 0.3s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .header-container {
        flex-wrap: wrap;
    }
    .nav {
        display: none; /* hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        background: var(--color-white);
        margin-top: 15px;
    }
    .nav.show-mobile {
        display: flex;
    }
    .nav a {
        margin: 10px 0;
        text-align: center;
        padding: 15px;
        background: var(--color-gray-bg);
        border-radius: 5px;
    }
    .dropdown {
        margin: 0;
        text-align: center;
    }
    .dropdown-content {
        position: static;
        box-shadow: none;
        display: none; /* hidden by default */
        background: transparent;
    }
    .dropdown.active-mobile .dropdown-content {
        display: block;
    }
    
    .detail-split {
        flex-direction: column;
        overflow-y: auto; /* Allow scrolling whole content on mobile */
    }
    .detail-gallery, .detail-text {
        flex: none;
        max-width: 100%; /* Reset from 50% */
        width: 100%;
        height: auto;
    }
    .detail-gallery {
        height: 50vh; /* Allocate 50% height for gallery on mobile */
    }
    .detail-text {
        overflow-y: visible; /* Scroll happens on .detail-split instead */
    }
    .detail-modal-content {
        padding: 40px 20px 20px 20px;
        margin: 5% auto;
    }
}

