/* =====================================================================
   mobile.css – úpravy pre telefóny (do šírky 767 px)
   Načítava sa ako posledný, takže prepisuje staré pravidlá šablóny.
   Desktopová verzia stránky sa týmto súborom nemení.
   ===================================================================== */

@media only screen and (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    font-size: 15px;
    line-height: 1.65;
    color: #666666;
    -webkit-text-stroke: 0;
    -webkit-tap-highlight-color: rgba(255, 105, 0, 0.15);
  }

  /* --- Mriežka: namiesto pevných 300 px využiť celú šírku displeja --- */
  .container,
  .container.clearfix {
    width: 100% !important;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .container .column,
  .container .columns {
    width: 100% !important;
    float: none;
    display: block;
    margin: 0;
  }

  /* ================= Hlavička ================= */
  header,
  header.fixed {
    position: fixed;
  }

  .mainHeader,
  .mainHeader.default,
  .mainHeader.switchedHeader {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    position: relative;
    display: block !important;
  }

  .mainHeader .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
  }

  .mainHeader .one-third.column,
  .mainHeader .two-thirds.column {
    width: auto !important;
  }

  .logo {
    margin: 0;
  }

  .logo h1 {
    font-size: 20px;
    color: #323232;
  }

  .logo h1 span {
    font-size: 13px;
    color: #ff6900;
  }

  nav#mainNav {
    float: none;
    margin: 0;
    position: static;
  }

  .mobileBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0;
    float: none !important;
    position: static !important;
    box-sizing: border-box;
    border-radius: 6px;
  }

  .mobileBtn i {
    font-size: 20px;
  }

  nav#mainNav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }

  nav#mainNav li {
    display: block;
    font-size: 14px;
  }

  nav#mainNav li a,
  .switchedHeader nav#mainNav li a {
    display: block;
    padding: 15px 20px;
    color: #323232 !important;
    border-top: 1px solid #f0f0f0;
  }

  /* ================= Úvodný obrázok (hero) ================= */
  .mainSlider .slides li {
    height: 78vh !important;
    height: 78svh !important;
    min-height: 460px;
    max-height: 720px;
    position: relative;
    background-position: center center !important;
  }

  .mainSlider .slides li:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.45) 100%
    );
  }

  .caption {
    top: 50%;
    transform: translateY(-50%);
    padding: 0 24px;
    box-sizing: border-box;
    z-index: 2;
  }

  .caption h1 {
    font-size: 28px;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  }

  .caption p {
    font-size: 15px;
    margin-top: 12px;
    letter-spacing: 0.5px;
  }

  .mainSlider .flex-control-nav {
    bottom: 24px !important;
    z-index: 3;
  }

  /* ================= Úvod (O nás) ================= */
  .introBg {
    display: none;
  }

  .offsetBottom {
    margin-bottom: 56px;
  }

  .offsetTop {
    padding-top: 0;
  }

  /* Medzera medzi galériou a tmavým blokom Kontakt */
  #portfolio .secContent {
    padding-bottom: 56px;
  }

  .about.offsetBottom,
  #services.offsetBottom {
    margin-bottom: 0;
  }

  .container .intro.columns {
    background: #f2f2f1;
    margin: 0 -20px !important;
    padding: 48px 20px 44px !important;
    width: auto !important;
  }

  .innerIntro {
    margin: 0;
  }

  h1.mainTitle {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 14px;
  }

  /* Tlačidlá Portfólio / Kontakt – už neprekrývajú text */
  .shortBtn {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: auto;
    margin-top: 28px;
  }

  .innerIntro {
    order: -1;
  }

  .container .intro.columns {
    display: flex;
    flex-direction: column;
  }

  .intro .shortBtn {
    order: 2;
  }

  .shortFolio,
  .shortContact {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    flex: 1 1 140px;
    justify-content: center;
  }

  .shortFolio span,
  .shortContact span,
  .shortFolio:hover span,
  .shortContact:hover span {
    position: static;
    width: auto;
    height: auto;
    line-height: 1;
    padding: 0 16px 0 4px;
    margin: 0;
    background: transparent;
    font-size: 14px;
    font-family: "open_sansbold", Arial, sans-serif;
    letter-spacing: 0.5px;
  }

  .shortFolio i,
  .shortContact i,
  .shortContact img {
    background: transparent;
    width: 22px;
    height: 22px;
    line-height: 22px;
    padding: 0;
    margin: 0 4px 0 0;
    box-sizing: content-box;
  }

  /* Výhody (tmavý blok) */
  .features {
    padding: 44px 0 44px 30px !important;
  }

  .ft {
    display: flex;
    align-items: flex-start;
  }

  .ftIco,
  .ftDet {
    float: none;
  }

  .ftIco span.ico {
    width: 52px;
    height: 52px;
    margin: 0 14px 12px -27px !important;
  }

  .ftIco span.ico img {
    max-width: 32px;
    max-height: 32px;
  }

  .ftDet {
    width: auto !important;
    flex: 1;
    margin-left: 0 !important;
  }

  .ftDet h3 {
    font-size: 15px;
  }

  .features p,
  .secTitle.darkgrey p {
    color: #bdbdbd;
  }

  /* ================= Tím ================= */
  .team {
    padding-top: 56px;
  }

  .team .container {
    display: flex;
    flex-direction: column;
  }

  .teamThumbs {
    order: -1;
    margin-bottom: 24px !important;
  }

  .thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .thumbs li,
  .thumbs li img {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    margin: 0;
  }

  .thumbs li img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 6px;
  }

  .thumbs li a span {
    background: none !important;
    border-radius: 6px;
    box-shadow: inset 0 0 0 3px #ff6900;
  }

  .container .teamDetails {
    margin-bottom: 0;
    min-height: 0;
  }

  .td h3 {
    font-size: 17px;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .td h3 span {
    display: block;
    font-size: 14px;
    color: #ff6900;
  }

  /* ================= Referencie ================= */
  .testimonials {
    padding-top: 56px;
    padding-bottom: 40px;
  }

  .testimonials .testiSlider {
    width: 100% !important;
  }

  .testiSlider li blockquote {
    font-size: 16px;
    line-height: 1.65;
    padding: 0 4px;
  }

  .testiSlider li .testiProfile {
    font-size: 15px;
    padding-bottom: 14px;
  }

  /* ================= Čísla (15 / 50 / 100) ================= */
  .facts {
    padding: 48px 0 8px;
  }

  .pocitadla {
    align-items: flex-start !important;
    gap: 8px;
  }

  .container .fct {
    width: 33.333% !important;
    margin-bottom: 0;
  }

  .fct img {
    width: 72px;
    height: 72px;
    border-width: 8px;
    box-sizing: content-box;
    padding: 0;
  }

  .fct .count {
    font-size: 30px;
    margin: 16px 0 6px;
  }

  .fct .fc {
    font-size: 14px;
  }

  .fct p {
    font-size: 12px;
    line-height: 1.4;
  }

  .fct p br {
    display: none;
  }

  /* ================= Služby ================= */
  #services {
    display: flex;
    flex-direction: column;
  }

  #services .secTitle {
    order: 1;
  }

  #services .imgServices {
    order: 2;
    position: relative;
    top: auto !important;
    width: 100%;
    height: 220px !important;
    min-height: 0;
  }

  #services .secContent {
    order: 3;
  }

  .secTitle.darkgrey {
    padding-top: 48px;
    padding-bottom: 28px;
  }

  .sectitleInner,
  #services .sectitleInner {
    margin: 0 !important;
  }

  .secContent.lightgrey {
    padding-top: 40px;
    padding-bottom: 8px;
  }

  .servicesInner {
    margin: 0 !important;
  }

  .service {
    width: 100% !important;
    margin: 0 0 32px 0;
    float: none;
  }

  .service h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  /* ================= Galéria (Portfólio) ================= */
  #portfolio .secTitle {
    padding-top: 56px;
  }

  .filterNav {
    margin: 4px -20px 20px;
    text-align: left;
  }

  ul#category {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 20px;
    white-space: nowrap;
  }

  ul#category::-webkit-scrollbar {
    display: none;
  }

  /* Náznak, že sa dá lišta s filtrami posúvať do strán */
  .filterNav {
    position: relative;
  }

  .filterNav:before,
  .filterNav:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 56px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.25s ease;
  }

  .filterNav:before {
    left: 0;
    background: linear-gradient(90deg, #ffffff 25%, rgba(255, 255, 255, 0));
    opacity: 0;
  }

  .filterNav:after {
    right: 0;
    background:
      no-repeat right 14px center / 9px 14px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14'%3E%3Cpath d='M1.5 1.5 7 7l-5.5 5.5' fill='none' stroke='%23ff6900' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
      linear-gradient(270deg, #ffffff 45%, rgba(255, 255, 255, 0));
    opacity: 1;
  }

  .filterNav.scrolled:before {
    opacity: 1;
  }

  .filterNav.atEnd:after {
    opacity: 0;
  }

  ul#category li {
    display: inline-block !important;
    flex: 0 0 auto;
  }

  ul#category li a {
    padding: 9px 16px;
    border: 1px solid #dddddd;
    border-radius: 999px;
    font-size: 14px;
    color: #444444;
    background: #ffffff;
  }

  #category .current a {
    background: #ff6900;
    border-color: #ff6900;
    color: #ffffff !important;
  }

  #category .current a:after {
    display: none;
  }

  #works {
    margin-left: 0 !important;
  }

  #portfolio ul.portfolio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #portfolio ul.portfolio:before,
  #portfolio ul.portfolio:after {
    display: none;
  }

  #portfolio .container .item {
    width: auto !important;
    margin: 0 !important;
  }

  #portfolio #works ul.portfolio .item a.folio {
    border-radius: 4px;
    background: #eeeeee;
  }

  #portfolio .item a .desc {
    display: none !important;
  }

  /* ================= Kontakt ================= */
  .contact .secContent {
    padding-bottom: 24px;
  }

  .contactInfo {
    margin-top: 36px;
  }

  .contactInfo h1 {
    font-size: 17px;
    line-height: 1.3;
  }

  .contactInfo ul li {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .contactInfo a {
    color: #ff6900;
    display: inline-block;
    padding: 4px 0;
  }

  .contactInfo a.cBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 4px 0;
    border: 1px solid #ff6900;
    border-radius: 999px;
    font-family: "open_sansbold", Arial, sans-serif;
  }

  /* ================= Pätička ================= */
  .footerholder {
    padding: 36px 0;
  }

  .socialsFooter a {
    border-color: #777777;
    color: #bbbbbb;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    line-height: 38px;
  }

  .footerholder p {
    color: #999999;
    font-size: 12px;
  }
}

/* Kontaktné odkazy aj na desktope */
.contactInfo a {
  color: #ff6900;
}

.contactInfo a:hover {
  color: #323232;
}

/* Rešpektovať nastavenie „menej animácií" */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Odkazy Impressum / Datenschutz v pätičke */
.footerLinks {
  margin-top: 14px;
}

.footerLinks a {
  color: #999999;
  display: inline-block;
  margin: 0 8px;
  padding: 6px 0;
}

.footerLinks a:hover {
  color: #ff6900;
}

/* Odkaz na apes.sk v úvodnom texte */
a.textLink {
  color: #ff6900;
}

a.textLink:hover {
  color: #323232;
}
