/* 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;
}

/* 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: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--color-gray-bg);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.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;
}
