/* ----------------- VARIABLES ----------------- */
:root {
    --color-bg-dark: #0f0f11;
    --color-bg: #1c1c1f;
    --color-concrete: #2e2e33;
    --color-concrete-light: #45454b;
    --color-wood: #d37c35;
    --color-wood-dark: #a95b1e;
    --color-text: #eaeaea;
    --color-text-muted: #a3a3a3;
    --color-white: #ffffff;
    
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
    --radius: 12px;
}

/* ----------------- RESET & BASICS ----------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: 100px 0;
}

.bg-dark {
    background-color: var(--color-bg-dark);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--color-wood);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ----------------- BUTTONS ----------------- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-wood);
    color: var(--color-white);
    border: 2px solid var(--color-wood);
    box-shadow: 0 4px 15px rgba(211, 124, 53, 0.3);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-wood);
    box-shadow: 0 6px 20px rgba(211, 124, 53, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-concrete-light);
}

.btn-outline:hover {
    border-color: var(--color-wood);
    transform: translateY(-2px);
}

/* ----------------- NAVBAR ----------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 15, 17, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 120px; /* Mnohem větší dle zadání */
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.navbar.scrolled .logo-img {
    height: 80px; /* Zmenšení po zascrollování, aby velká lišta pak nezavázela */
}

.logo:hover .logo-img {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--color-text);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-wood);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--color-white);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-phone {
    font-weight: 600;
    color: var(--color-text);
    font-size: 1.1rem;
    transition: var(--transition);
}

.nav-phone:hover {
    color: var(--color-wood);
}

/* ----------------- HERO ----------------- */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    /* Will be overridden by main.js with generated image */
    background-image: url('../img/hero.png'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(15,15,17,0.9) 0%, rgba(15,15,17,0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-top: 50px;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--color-white);
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* ----------------- ABOUT ----------------- */
.about {
    background-color: var(--color-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    gap: 40px;
}

.stat {
    background: var(--color-concrete);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    flex: 1;
    border-bottom: 4px solid var(--color-wood);
}

.stat h3 {
    font-size: 3rem;
    color: var(--color-white);
    font-weight: 800;
}

.stat span {
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ----------------- SERVICES ----------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    background-color: var(--color-concrete);
    padding: 40px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(211, 124, 53, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-white);
}

.card p {
    color: var(--color-text-muted);
}

/* ----------------- PORTFOLIO / REFERENCES ----------------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 400px;
    cursor: pointer;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    transform: translateY(20px);
    opacity: 0.8;
    transition: var(--transition);
    z-index: 3;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-hover-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(211, 124, 53, 0.85); /* var(--color-wood) trochu průhledná */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.portfolio-item:hover .portfolio-hover-overlay {
    opacity: 1;
}

.portfolio-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.portfolio-info p {
    color: var(--color-wood);
    font-size: 0.95rem;
    font-weight: 600;
}

.portfolio-grid-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.portfolio-item-small {
    height: 200px;
}

.portfolio-item-small .portfolio-hover-overlay {
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .portfolio-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 500px) {
    .portfolio-item-small {
        height: 150px;
    }
}

/* ----------------- MODAL GALLERY ----------------- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(15, 15, 17, 0.95); 
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--color-white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.close-modal:hover {
    color: var(--color-wood);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.modal-nav:hover {
    background: var(--color-wood);
}

.prev-btn { left: -60px; }
.next-btn { right: -60px; }

.modal-caption {
    margin-top: 20px;
    font-size: 1.2rem;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}

/* ----------------- FOOTER ----------------- */
.footer {
    background-color: #000000;
    padding: 80px 0 20px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    margin-bottom: 15px;
}

.footer-logo-img {
    height: 160px;
    filter: brightness(0) invert(1);
}

.footer-col h3 {
    color: var(--color-white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col p {
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-concrete);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ----------------- ANIMATIONS (SCROLL REVEAL) ----------------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 768px) {
    .nav-links, .nav-phone { display: none; }
    .logo-img { height: 70px; } /* Zmenšení loga na telefonu, aby lišta nebyla tak vysoká */
    .hero-content { margin-top: 120px; } /* Posunutí úvodního textu níže, aby ho lišta nepřekrývala */
    .hero-btns { flex-direction: column; }
    .about-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
}
