/* ZÁKLADNÍ NASTAVENÍ */
:root {
    --primary-color: #d90429; /* Záchranářská červená */
    --primary-dark: #ef233c;
    --secondary-color: #072f69; /* Tmavošedá / modrá */
    --light-bg: #f8f9fa;
    --text-color: #2d3142;
    --white: #ffffff;
}

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

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

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

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* 1. HORNÍ STRIP BAR */
.top-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 20;
}

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

.top-contacts a {
    color: var(--white);
    text-decoration: none;
    margin-right: 20px;
}

.top-contacts a i {
    color: var(--primary-color);
    margin-right: 5px;
}

.top-buttons .btn-sm {
    padding: 4px 12px;
    font-size: 0.8rem;
    margin-left: 5px;
}

/* TLAČÍTKA */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

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

.btn-accent {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    border: 1px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--secondary-color);
}

.btn-lg {
    font-size: 1.1rem;
    padding: 15px 35px;
}

/* HERO ÚVODNÍ BLOK (S SLIDESHOW) */
.hero-section {
    position: relative;
    color: var(--white);
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65));
}

.main-nav {
    position: relative;
    z-index: 10;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.logo-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: var(--white) !important;
    text-decoration: none !important;
    font-size: 1.3rem !important;
    line-height: 1 !important;
}

.logo-img {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.logo-link span {
    font-size: 1.2rem;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.hero-content {
    position: relative;
    z-index: 10;
    margin: auto;
    text-align: center;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

/* O NÁS */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    text-align: center;
}

.about-content p {
    margin-bottom: 20px;
}

/* KARTY SLUŽEB (NABÍZÍME) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
}

.cta-box {
    margin-top: 30px;
}

/* NÁŠ TÝM & TECHNIKA */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.team-card {
    background: var(--white);
    border: 1px solid #eee;
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
}

.team-avatar {
    width: 90px;
    height: 90px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.team-role {
    display: block;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* CAROUSEL / SLIDER (NEKONEČNÝ PLYNULÝ PÁS) */
.carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    padding: 20px 0;
    /* Efekt postupné ztráty do ztracena na okrajích */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    /* Plynulá CSS animace - posun o polohu celé jedné sady karet */
    animation: smoothScroll 25s linear infinite;
}

/* Pozastavení pásu při najetí myší (pro přečtení) */
.carousel-container:hover .carousel-track {
    animation-play-state: paused;
}

.carousel-card {
    width: 300px; /* Pevná šířka karty pro stabilní výpočet */
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.carousel-card img {
    max-width: 100%;
    height: 80px;            /* Sjednocená výška pro loga a obrázky */
    object-fit: contain;     /* Zachová poměr stran a obrázek nedeformuje */
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Skrytí manuálních tlačítek (u plynulého pásu nejsou potřeba) */
.carousel-btn {
    display: none;
}

/* Definice plynulého posunu */
@keyframes smoothScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* KONTAKTY & FORMULÁŘ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.contact-info i {
    width: 25px;
    color: var(--primary-color);
}

.map-container {
    margin-top: 25px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input, 
.form-group textarea {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.full-width {
    width: 100%;
}

.text-center {
    text-align: center;
}

/* DĚKOVNÁ HLÁŠKA */
.form-success-message {
    text-align: center;
    padding: 30px 20px;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
}

.form-success-message .success-icon {
    font-size: 3rem;
    color: #22c55e;
    margin-bottom: 15px;
}

.form-success-message h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #15803d;
}

.form-error-message {
    padding: 10px 15px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.9rem;
}

/* STRÁNKA POPTÁVKY */
.hero-section-sm {
    padding-bottom: 40px;
}

.poptavka-box {
    background: #ffffff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-title {
    margin-bottom: 5px;
    color: #1a1a1a;
}

.form-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 25px;
}

.form-section-header {
    font-size: 1.15rem;
    font-weight: bold;
    color: #d90429;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.custom-poptavka-form select,
.custom-poptavka-form input[type="datetime-local"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #fff;
}

.custom-poptavka-form select:focus,
.custom-poptavka-form input:focus,
.custom-poptavka-form textarea:focus {
    outline: none;
    border-color: #d90429;
    box-shadow: 0 0 5px rgba(217, 4, 41, 0.2);
}

/* PATKA */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 20px 0;
    font-size: 0.9rem;
}

/* RESPONSIVITA PRO TABLETY A MOBILY */
@media (max-width: 992px) {
    .carousel-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .top-bar-content, .nav-container, .contact-wrapper {
        flex-direction: column;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .top-contacts {
        margin-bottom: 10px;
    }

    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links li a {
        margin: 5px 10px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .carousel-card {
        flex: 0 0 100%;
    }

    .carousel-container {
        padding: 0 35px;
    }

    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .poptavka-box {
        padding: 20px;
    }
}

.top-contacts .social-icon {
    margin-left: 10px;
    margin-right: 0;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.top-contacts .social-icon:hover {
    color: var(--primary-color);
}