* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

header {
    background: #0a3d62;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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


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

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: #82ccdd;
}

.hero {
    background: linear-gradient(to right, #0a3d62, #3c6382);
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background: #82ccdd;
    color: #0a3d62;
    border: none;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #60a3bc;
}

.section {
    padding: 80px 20px;
}

.grey-bg {
    background: #f2f2f2;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #0a3d62;
    text-align: center;
}

h3 {
    margin-bottom: 10px;
    color: #3c6382;
}



.values, .services {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

/* ✅ KDO JSME = vždy 3 vedle sebe */
.values {
    grid-template-columns: repeat(2, 1fr);
}

/* ✅ SLUŽBY = klidně responsivní */
.services {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}




@media (max-width: 768px) {
    .values {
        grid-template-columns: 1fr;
    }
}



.values div, .services div {
    display: flex;
    flex-direction: column;
    align-items: center; /* Ikony na střed horizontálně */
    justify-content: flex-start; /* Zarovnání obsahu (textu a ikon) vertikálně nahoru */
    text-align: center; /* Pokud je text vpravo od ikony, bude také zarovnaný na střed */
}

.values div img, .services div img {
    margin-bottom: 15px; /* Mezera mezi ikonou a textem */
}

/* Pokud chcete, aby ikonky měly určitou velikost, můžete přidat: */
.values div img, .services div img {
    width: 100px; /* Nastavení velikosti ikony */
    height: auto; /* Udržení poměru stran obrázku */
}

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

.contact-form input, .contact-form textarea {
    padding: 10px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
}

footer {
    background: #0a3d62;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    margin-top: 40px;
}
a.footer {
	color:white;
	text-decoration:none;
}
.contact-info {
    text-align: center;
    margin-top: 20px;
}

/* Responsivita */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        background: #0a3d62;
        position: absolute;
        right: 0;
        top: 60px;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }
}

/* Reference detail: obrázek vlevo, text vpravo */
#reference {
    padding: 50px 0;
    background-color: #ffffff;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
}

/* Detailní reference: obrázek vlevo, název firmy a text vpravo */
.reference-detail {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    margin-bottom: 30px;
}

.reference-img {
    width: 350px; /* Nastavení šířky obrázku */
    height: 200px; /* Nastavení výšky obrázku */
    object-fit: cover; /* Zajištění, že obrázek bude vyplňovat prostor bez deformace */
    margin-right: 20px; /* Mezera mezi obrázkem a textem */
    border: 1px solid #f2f2f2;
}

.reference-info {
    max-width: 600px;
    text-align: left;
}

.reference-info h3 a {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #0a3d62;
    font-weight: bold;
    text-decoration:none;
}

.reference-info p {
    font-size: 1rem;
    color: #333;
    text-align: center;
}

/* Efekt pozastavení rotace při hoveru */
.carousel:hover {
    animation-play-state: paused;
}

/* Pro první slide: všechny reference na jednom řádku */
.all-references {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.all-references img {
    width: 23%; /* Čtyři obrázky na jednom řádku */
    height: auto; /* Zajistí, že obrázky nebudou deformované */
    margin: 0 10px;
}

.carousel-slide p {
    font-size: 16px;
    color: #333;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    max-width: 200px;
    margin: 20px auto;
}

/* Zajištění responzivního chování pro menší obrazovky */
@media (max-width: 768px) {
    .reference-detail {
        flex-direction: column;
        text-align: center;
    }

    .reference-img {
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    .reference-info {
        max-width: 100%;
    }

    .all-references {
        flex-direction: column;
    }

    .all-references img {
        width: 80%;
        margin-bottom: 20px;
    }
}


#dynamic-background {
    background: linear-gradient(45deg, #0a3d62, #3c6382, #82ccdd, #0a3d62); /* Více barev pro "wave" efekt */
    background-size: 300% 300%;  /* Zvýšení velikosti pozadí pro lepší efekt */
    color: white;
    text-align: center;
    padding: 40px 20px;  /* Snížená výška sekce */
    animation: waveEffect 10s ease-in-out infinite;  /* Plynulý vlnový efekt */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);  /* Mírný lesk pro efekt */
}

#dynamic-background h1 {
    font-size: 2.5rem;  /* Menší font pro nadpis */
    margin-bottom: 8px;  /* Zkrácení mezery mezi titulkem a textem */
}

.dynamic-text {
    font-size: 1.25rem;  /* Menší velikost textu */
    margin-bottom: 15px;  /* Snížená mezera mezi textem a tlačítkem */
    font-weight: 500;
    animation: textAnimation 5s ease-in-out infinite; /* Animace textu */
}

.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;  /* Menší tlačítko */
    background: #82ccdd;
    color: #0a3d62;
    border: none;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #60a3bc;
}

/* Vlnový efekt pro pozadí */
@keyframes waveEffect {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animace pro text */
@keyframes textAnimation {
    0% {
        content: "Poskytujeme kompletní IT podporu a zabezpečení pro vaši firmu";
    }
    25% {
        content: "Specializujeme se na kybernetickou bezpečnost";
    }
    50% {
        content: "Optimalizujeme IT infrastrukturu pro efektivní růst";
    }
    75% {
        content: "Zajistíme bezpečný a spolehlivý provoz vašich systémů";
    }
    100% {
        content: "Poskytujeme kompletní IT podporu a zabezpečení pro vaši firmu";
    }
}


#kontakt a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

#kontakt a:hover {
    text-decoration: underline;
}

.contact-form {
    max-width: 800px;
    margin: 60px auto 0 auto;
    text-align: center;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    transition: 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #0077cc;
    box-shadow: 0 0 10px rgba(0,119,204,0.15);
}

.contact-form textarea {
    resize: vertical;
    min-height: 160px;
}

.contact-form .btn {
    align-self: center;
    cursor: pointer;
}

.hidden-field {
    display: none;
}

.form-success,
.form-error {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
}

.form-success {
    background: #e8f7ed;
    color: #1f7a3d;
}

.form-error {
    background: #fdeaea;
    color: #b42323;
}


/* lepší čitelnost textu */
#onas .container {
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.9;
}


/* karty (values + services) */
.values div, 
.services div {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    transition: 0.25s ease;
}

/* jemný hover */
.values div:hover, 
.services div:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.reference-fade-box {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    transition: opacity 0.5s ease;
}

.reference-fade-box img {
    width: 150px;
    height: auto;
}

.reference-info {
    text-align: left;
}


/* čitelnost */
.narrow {
    max-width: 1200px;
    margin: auto;
    line-height: 1.7;
}

/* karty */
.values div, .services div {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    transition: 0.2s;
}

.values div:hover,
.services div:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* reference */
.reference-fade-box {
    display: flex;
    align-items: center;
    gap: 25px;
    max-width: 700px;
    margin: 50px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: opacity 1s ease;
}

.reference-fade-box img {
    width: 120px;
}

.reference-info h3 {
    margin-bottom: 6px;
    color: #0a3d62;
}


/* EXPAND CARDS */
.card-expand {
    cursor: pointer;
    position: relative;
}

.card-expand .full {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.card-expand.active .full {
    max-height: 350px;
    opacity: 1;
    margin-top: 10px;
	font-size:12px;
	text-align:justify;
	
	
}

/* optional highlight */
.card-expand.active {
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}


.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
	
	
}

.reference-fade-box {
    border-left: 4px solid #82ccdd;
}

p {
    line-height: 1.6;
	text-align:justify;
}

section {
    padding: 90px 20px;
}



.card-expand {
    cursor: pointer;
}

.card-expand .full {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.card-expand.active .full {
    max-height: 400px;
    opacity: 1;
    margin-top: 10px;
}

.references-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 50px auto;
}

/* mobile */
@media (max-width: 768px) {
    .references-grid {
        grid-template-columns: 1fr;
    }
}

/* CARD */

.reference-card {
    position: relative;

    background: #ffffff;
    border-radius: 12px;

    padding: 30px 20px;

    height: 240px; /* FIX výška */
    min-height: 240px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);

    overflow: hidden; /* ✅ zabrání skoku */

    transition: opacity 1.2s ease;
	will-change: opacity;
}


/* ✅ modrý proužek vlevo */
.reference-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    background: #82ccdd;
    border-radius: 4px;
}

/* logo */
.reference-card img {
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* text */
.reference-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #0a3d62;
}

.reference-card p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.4;

    max-width: 300px; /* 👉 aby text nelezl ven */
}






.reference-card > * {
    width: 100%;
}


.reference-card p {
    height: 60px;
    overflow: hidden;
}


/* fade */
.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}


.reference-card:hover {
    transform: translateY(-4px);
    transition: 0.3s ease;
}


/* ===== DEFINITIVNÍ FIX PRO REFERENCE ===== */

.reference-card {
    height: 240px !important;      /* 🔥 přebije vše */
    min-height: 240px !important;
    max-height: 240px !important;

    overflow: hidden;
}

/* 👉 fix zalamování textu */
.reference-card p {
    line-height: 1.4;
    max-height: calc(1.4em * 3);   /* max 3 řádky */
    overflow: hidden;
	width:100%;
}

/* 👉 fix názvu */
.reference-card h3 {
    height: 2.5em;                 /* fix místo pro title */
    overflow: hidden;
}

/* 👉 zabrání přepočtu layoutu */
.reference-card {
    contain: layout;               /* 🔥 KLÍČOVÉ */
}

/* ✅ FIX – stabilní layout */
.reference-card {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ✅ animujeme jen vnitřek */
.ref-inner {
    width: 100%;
    transition: opacity 1s ease;
	 transform: translateZ(0);
}

/* fade */
.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}



.reference-card p {
    width: 100%;
    max-width: none;        /* zruší staré omezení */
    text-align: justify;       /* text vlevo */

}



.reference-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* hover efekt */
.reference-link:hover .reference-card {
    transform: translateY(-5px);
}



/* sjednocení všech karet */
.values div,
.services div {
    position: relative;

    background: #ffffff;
    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);

    transition: 0.3s ease;
}

/* hover */
.values div:hover,
.services div:hover {
    transform: translateY(-4px);
}

/* modrý proužek jako reference */
.values div::before,
.services div::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    background: #82ccdd;
}


.icon {
    width: 60px;
    height: 60px;

    color: #0a3d62;   /* 🔥 barva z tvého webu */
    display: block;
    margin: 0 auto 10px auto;
	
 stroke-linecap: round;
    stroke-linejoin: round;

}



.reference-card {
    will-change: opacity;
    transform: translateZ(0);
}