@font-face {
    font-family: 'OpenSans';
    src: url('fonts/OpenSans-Regular.ttf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'OpenSans';
    src: url('fonts/OpenSans-Bold.ttf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'OpenSans';
    src: url('fonts/OpenSans-BoldItalic.ttf') format('opentype');
    font-weight: 700;
    font-style: italic;
}
@font-face {
    font-family: 'OpenSans';
    src: url('fonts/OpenSans-Italic.ttf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

/* výběr textu pro všechny elementy */
::selection {
    background-color: rgba(224,104,90,0.73); /* barva pozadí výběru */
    color: #FFF;            /* barva textu při výběru */
}

a{
    color: rgba(224,104,90,0.73);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'OpenSans', sans-serif;
    text-align: justify;
    line-height: 1.6;
    padding-top: 96px; /* výška navbaru */
    background: #fff;
    color: #333333;
    /*background-color: rgba(224,104,90,0.73);*/
    background-image: url('images/peri.png');
    /*background-repeat: no-repeat;*/ /* zabrání opakování obrázku */
    background-size: 50%;       /* obrázek vyplní celý prvek */
    /*background-position: center;*/  /* obrázek bude vystředěn */
    
    
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 86px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #ddd;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.nav-container {
    max-width: 1100px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 12px;
}

nav a {
    font-size: 16px;
    margin-left: 25px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
    line-height: 1;       /* relativní k font-size */
    display: inline-block; /* zajistí kontrolu výšky */
    vertical-align: middle; /* nebo top */
    padding: 6px 14px;
    border-radius: 20px;
    background-color: #EFEFEF;
}

nav a:hover {
    color: #2e7d32;
}

nav a.active {
    color: #FFF;
    font-weight: bold;
    position: relative;
    background-color: rgba(224,104,90,0.73);
}
/*podtržení aktivní navigace*/
/*nav a.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #000;
    border-radius: 2px;
}*/
nav a:active {
    background-color: rgba(0,0,0,0.08);
}
/* SECTIONS */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 0px;                  /* nastavení MEZERY MEZI PODNADPISY */
    padding-bottom: 0px;                  /* nastavení MEZERY MEZI PODNADPISY */
    border: 2px solid rgba(0,0,0,0.08);
    background-color: #FFF;
    box-shadow: 0 0 30px 15px rgba(255,255,255,0.9); /* bílá záře kolem */
    scroll-margin-top: 80px;

}



.section h1 {
    font-size: 22px;
    margin-bottom: 0px;
    text-align: left;
    position: relative;
    color: white;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    position: relative;
    color: white;
}

.section p {
    font-size: 18px;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 0px 20px;
}

/* NABÍDKA */
.offer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.offer-item {
    text-align: center;
    flex: 0 1 180px;
}

.offer-item img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ddd;
    transition: transform 0.3s, border-color 0.3s;
}

.offer-item img:hover {
    transform: scale(1.08);
    border-color: #2e7d32;
}

.offer-title {
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* BAREVNÉ BUBLINY */
/* Wrapper pro bubliny */
.wrapper {
  display: flex;
  width: 100%;
  margin: 1em 0;
}

/* Zarovnání vlevo / vpravo */
.wrapper-left {
  justify-content: flex-start;
}

.wrapper-right {
  justify-content: flex-end;
}

/* Samotná bublina */
.bubble {
  display: inline-block;
  font-size: 2rem;
  color: #000;
  background-color: rgba(224,104,90,0.73);
}
.bubble.from-left{
    padding: 0.4em 3em 0.4em 2em;
    border-radius: 0 50px 50px 0;
}
.bubble.from-right{
    padding: 0.4em 2em 0.4em 3em;
    border-radius: 50px 0 0 50px;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    margin-top: 60px;
}

/* RESPONSIVITA */
@media (max-width: 768px) {
    .section h1 {
        font-size: 18px;
    }
    .section h2 {
        font-size: 28px;
    }
    .offer-item {
        flex: 0 1 140px;
    }
    .offer-item img {
        width: 130px;
        height: 130px;
    }
    .bubble-left, .bubble-right {
        float: none;
        text-align: center;
        padding: 0.4em 2em;
        border-radius: 50px;
    }
    nav a {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    nav a {
        font-size: 10px;
    }
    .section h1 {
        font-size: 14px;
    }
    .section h2 {
        font-size: 22px;
    }
    .offer-item img {
        width: 100px;
        height: 100px;
    }
    .offer-item {
        flex: 0 1 100px;
    }
}

/* HAMBURGER MENU */
.hamburger {
    display: none; /* skryto na desktopu */
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    margin-right: 20px; /* odsazení od kraje obrazovky */
}

.hamburger span {
    display: block;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: 0.3s;
}

/* Aktivní stav (X) */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 86px;
        left: -100%;
        width: 100%;
        height: calc(100% - 86px); /* stále výška viewportu minus navbar */
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 0.3s ease;
        z-index: 9998;

        /* Nové: povolit scroll pokud menu přesáhne viewport */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* pro plynulý scroll na iOS */
    }

    nav a {
        display: block;
        margin: 15px 0;
        font-size: 18px;
        font-weight: 500;
        color: #333;
        text-decoration: none;
        padding: 10px 20px;
        border-radius: 8px;
        transition: background-color 0.2s, color 0.2s;
        text-align: center;
    }

    nav a:hover {
        background-color: #2e7d32;
        color: #fff;
    }

    nav.active {
        left: 0;
    }

    .hamburger {
        display: flex;
        margin-right: 20px;
    }
}

/* Okno pro zvětšení obrázků */
.thumb {
    transition: transform 0.3s ease; /* plynulý přechod */
    cursor: pointer; /* ukazuje, že jde kliknout */
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
}
.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80vh;
}
.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

