:root {
    --primary: gold;  /* Žlutá místo defaultní modré */
    --secondary: #333333; /* Tmavě šedá */
    --success: #28a745;
    --danger: #dc3545;
    --warning: gold;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #212529;
}

body {
    /*background-color: #1e1e1e;*/
    background: linear-gradient(135deg, #1e1e1e, #101010);
    color: #ddd;
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "XROT" 0,
        "YROT" 0;
    margin: 0;
    padding: 0;
}
/* poloprůhledný header */
.header {
    position: absolute;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 15px;
}
h1, h2, .car-price .fw-bold {
    font-family: "Bruno Ace", sans-serif;
}

.header h1 {
    font-family: "Bruno Ace", sans-serif;
    font-size: 20pt;
    font-weight: 600;
    color: white;
    margin: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* dvojitý heading */

.heading-section {
    position: relative;
}
.heading-section h1.big {
    font-family: "Black Ops One", system-ui;
    position: absolute;
    bottom: -20px;
    left: -20px;
    font-size: 60pt;
    color: rgba(255, 255, 255, 0.05);
    z-index: -1;
    font-weight: 200;
}

.heading-section h2 {
    font-size: 17pt;
    font-weight: 700;
}
.heading-section h2 span {
    font-weight: 400;
}
@media (max-width: 767.98px) {
    .heading-section h2 {
        font-size: 18pt;
    }
    .heading-section h1.big {
        font-size: 45pt;
    }
}


h2 {
    color: #f2f2f2;
}

.header nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-size: 12pt;
}
/* Hero sekce */
.hero {
    /* Místo 100vh použijeme výšku vypočítanou v JS */
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    position: relative;
}
.hero img {
    width: 110%;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    /* Přiblížení, aby bylo vždy vyplněno pozadí */
    transform: scale(1.2);
}
.hero-content {
    z-index: 2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.hero-content h1 {
    /*font: 100% / 1.5 Raleway, sans-serif;
    font-family: "Quicksand", sans-serif;*/
    color: white;
    margin: auto;
    font-size: 2.5rem;
    font-weight: 600;
    animation: lights 5s 750ms linear infinite;
    line-height: 1;
}

section:not(#cars) p {
    text-align: justify;
    font-size: 12pt;
}
.hero-content p.lead {
    text-align: left !important;
    font-size: 11pt !important;
    color: #eee;
}

#hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 100vh;
    overflow: hidden;
}

#hero-bg-container img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(1.2); /* Zajišťuje přiblížení, aby byl viewport vyplněn */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/*socialni ikonky*/
.hero-social {
    position: absolute;
    bottom: 20px; /* 20px od spodního okraje hero sekce */
    right: 20px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-social a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.hero-social a:hover {
    transform: scale(1.2);
}

/*průhledné tlačítko*/
@keyframes fadeInBg {
    0% {
        background-color: rgba(50,50,50,0.5);
        color: inherit;
    }
    100% {
        background-color: rgba(0,0,0,0.9);
        color: white;
    }
}

@keyframes fadeOutBg {
    0% {
        background-color: rgba(0,0,0,0.9);
        color: white;
    }
    100% {
        background-color: rgba(50,50,50,0.5);
        color: inherit;
    }
}

.btn-transparent {
    border-width: medium;
    background-color: rgba(50,50,50,0.5);
    color: inherit;
    transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out;
}

.btn-transparent:hover {
    animation: fadeInBg 0.5s forwards;
}

.btn-transparent:not(:hover) {
    animation: fadeOutBg 0.5s forwards;
}

/*úvodní nadpis animace*/
@keyframes lights {
    0% {
        color: hsl(230, 40%, 80%);
        text-shadow:
            0 0 1em hsla(320, 100%, 50%, 0.2),
            0 0 0.125em hsla(320, 100%, 60%, 0.3),
            -1em -0.125em 0.5em hsla(40, 100%, 60%, 0),
            1em 0.125em 0.5em hsla(200, 100%, 60%, 0);
    }

    30% {
        color: hsl(230, 80%, 90%);
        text-shadow:
            0 0 1em hsla(320, 100%, 50%, 0.5),
            0 0 0.125em hsla(320, 100%, 60%, 0.5),
            -0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2),
            0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4);
    }

    40% {
        color: hsl(230, 100%, 95%);
        text-shadow:
            0 0 1em hsla(320, 100%, 50%, 0.5),
            0 0 0.125em hsla(320, 100%, 90%, 0.5),
            -0.25em -0.125em 0.125em hsla(40, 100%, 60%, 0.2),
            0.25em 0.125em 0.125em hsla(200, 100%, 60%, 0.4);
    }

    70% {
        color: hsl(230, 80%, 90%);
        text-shadow:
            0 0 1em hsla(320, 100%, 50%, 0.5),
            0 0 0.125em hsla(320, 100%, 60%, 0.5),
            0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2),
            -0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4);
    }

    100% {
        color: hsl(230, 40%, 80%);
        text-shadow:
            0 0 1em hsla(320, 100%, 50%, 0.2),
            0 0 0.125em hsla(320, 100%, 60%, 0.3),
            1em -0.125em 0.5em hsla(40, 100%, 60%, 0),
            -1em 0.125em 0.5em hsla(200, 100%, 60%, 0);
    }

}

/* Definice animací */
@keyframes slideLeft {
    from {
        transform: scale(1.2) translateX(0);
    }
    to {
        transform: scale(1.2) translateX(-8%);
    }
}

@keyframes slideRight {
    from {
        transform: scale(1.2) translateX(0);
    }
    to {
        transform: scale(1.2) translateX(8%);
    }
}

@keyframes zoomInSlide {
    from {
        transform: scale(1.2) translateX(0);
    }
    to {
        transform: scale(1.4) translateX(-8%);
    }
}

@keyframes zoomOutSlide {
    from {
        transform: scale(1.4) translateX(0);
    }
    to {
        transform: scale(1.2) translateX(8%);
    }
}

@keyframes arcLeft {
    from {
        transform: scale(1.2) translate(0, 0);
    }
    to {
        transform: scale(1.2) translate(-8%, 8%);
    }
}

@keyframes arcRight {
    from {
        transform: scale(1.2) translate(0, 0);
    }
    to {
        transform: scale(1.2) translate(8%, 8%);
    }
}

@keyframes rotate {
    from {
        transform: scale(1.2) rotate(0deg);
    }
    to {
        transform: scale(1.4) rotate(30deg);
    }
}
/* Karty vozů*/
#cars a {
    text-decoration: none;
}
.car-card {
    background-color: transparent;
    border: none;
    transition: transform 0.3s ease;
}

.car-card:hover {
    transform: translateY(-3px) !important;
    cursor: pointer;
}
.car-card .card-body {
    padding: 10px 0;
}
.car-info-left h3 {
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 0.2rem;
}
.car-info-left p {
    font-size: 0.7rem;
    margin-bottom: 0;
}
.car-info-right h3 {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.2rem;
    font-size: 10pt;
}
.car-info-right p {
    font-size: 0.7rem;
    color: goldenrod;
    margin-bottom: 0;
}
/* Footer */
footer {
    background-color: #2a2a2a;
    padding: 20px 0;
}

@supports (background-blend-mode: multiply) {
  footer {
    /* obrázek na pozadí */
    background-image: url("../img/footer/tires.jpg");
    background-position: right bottom;
    background-repeat: no-repeat;
    background-size: contain; /* nebo „contain“, podle toho, jak chcete obrázek škálovat */
    
    /* propojení obrázku a barvy pozadí pomocí multiply */
    background-blend-mode: multiply;
  }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .lead {
        font-size: 0.8rem !important;
    }
}

#about img {
    transition: transform 0.3s ease-in-out;
}

#about img:hover {
    transform: scale(1.05);
}
/*offset borders*/
.offset-border {
    position: relative;
    background-color: #1e1e1e;
    padding: 10px 20px;
    border-radius: 10px;
}
.offset-border:after {
    content: '';
    background: transparent;
    border: 1px solid grey;
    border-radius: 10px;
    top: 7px;
    right: 7px;
    bottom: -7px;
    left: -7px;
    position: absolute;
    z-index: -1;
}

/* ----------------- detail inzerátu ---------------------- */
/* Carousel kontejner */
#car-carousel {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Obrázky – zajistí vycentrování a oříznutí */
#car-carousel img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.car-name {
    line-height: 1;
}

.car-name h1{
    font-size: 26pt;
    margin-bottom: 0;
}
.car-price > div{
    font-size: 18pt;
}

/* Navigační šipky */
.carousel-nav {
    z-index: 2;
}

/* Spodní overlay pro název vozu a cenu */
.carousel-bottom-overlay {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

/* Příklad přizpůsobení safe area, pokud je potřeba */
@supports(padding: max(0px)) {
    #car-carousel {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

@media (orientation: portrait) {
    /* Upraví carousel – nebude mít výšku viewportu, ale se přizpůsobí obsahu */
    #car-carousel {
        height: auto;
    }
    /* Obrázek se bude roztahovat do šířky a ořízne se, pokud je potřeba */
    #car-carousel img {
        width: 100%;
        height: 50vh;
        object-fit: cover;
    }
    /* Přesuneme overlay s názvem a cenou pod obrázek */
    .carousel-bottom-overlay {
        position: static;
        background: transparent;
        padding: 10px 0 !important;
    }
    /* Měníme velikost textu v overlay */
    .carousel-bottom-overlay h2 {
        font-size: 1.2rem;
    }
    .carousel-bottom-overlay small {
        font-size: 0.7rem;
    }
    .car-name h1{
        font-size: 16pt;
    }
    .car-price{
        padding: 0 !important;
        line-height: 1 !important;
    }

    .car-price > div{
        font-size: 14pt;
    }
}


/* ------------ loader ----------------*/
#loader {
    opacity: 1;
    transition: opacity 0.5s ease-out;
    background-color: black !important;
}

.spinner-border {
    color: var(--primary) !important;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.car-thumb {
    width: 100%;
    height: 250px; /* nebo jakou výšku chceš */
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
}

.footer-link {
    color: #f8f9fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--warning);
}

.social-icon {
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    text-align: center;
    color: #fff;
    display: inline-block;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: #fff;
}

/* MENU */
/* 1) Odkazy v uppercase */
.navbar-nav .nav-link {
    text-transform: uppercase;
    font-weight: 600;
}

/* 2) Odstranění rámečku u toggle buttonu */
.navbar-toggler {
    border: none !important;    /* bez rámečku */
    background: transparent;     /* průhledné pozadí */
    padding: 0.5rem;
    z-index: 1051;
}

/* 3) Předefinování ikonky: zrušíme výchozí SVG a nakreslíme tři čárky */
.navbar-toggler-icon {
    background-image: none;      /* smaže default SVG */
    display: block;
    width: 30px;
    height: 2px;
    margin: 6px auto;
    background-color: #fff;
    position: relative;
    transition: all 0.3s ease;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: #fff;
    left: 0;
    transition: all 0.3s ease;
}
.navbar-toggler-icon::before {
    top: -8px;
}
.navbar-toggler-icon::after {
    top: 8px;
}

/* 4) Animace hamburger → křížek při otevřeném menu */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: translateY(8px) rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Odstranění focus outline a shadow u navbar-toggler */
.navbar-toggler:focus,
.navbar-toggler:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Pro modernější prohlížeče, když se používá focus-visible */
.navbar-toggler:focus-visible {
    outline: none;
    box-shadow: none;
}

/* 5) Centrované odkazy na mobilu pod sebou */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
    }
    .navbar-nav .nav-item {
        padding: 0.5rem 0;
    }
}

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: #000;    /* barva pozadí */
    color: #fff;               /* barva šipky */
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1100;
}

/* Když se přidá třída show, tlačítko se zobrazí */
#backToTop.show {
    opacity: 0.7;
    visibility: visible;
}

#backToTop:hover {
    opacity: 1;
}

/* Rezítko PRODÁNO */
/* Styl pro razítko „Prodáno“ */
.stamp-sold {
    font-family: 'Black Ops One';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(5deg);
    color: rgba(220, 0, 0, 0.9);
    /* Velikost písma na 8 % šířky viewportu, ale maximálně 6rem pro desktop */
    font-size: clamp(2rem, 8vw, 6rem);
    /* Tloušťka orámování 0.15em – proporčně k font-size */
    border: 0.15em solid transparent;
    /* Padding 0.2em na vrchní/dolní, 0.6em vlevo/vpravo */
    padding: 0.2em 0.6em;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 0 0.10em rgba(220, 0, 0, 0.9), 0 0 0 0.04em rgba(220, 0, 0, 0.9) inset;
    /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 2;
    white-space: nowrap;
    pointer-events: none;
    border-radius: 0.2em;
}

.stamp-preview{
    top: 50%;
    left: 50%;
    font-family: 'Black Ops One';
    transform: translate(-50%, -50%) rotate(5deg);
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 0 0.10em rgba(220, 0, 0, 0.9), 0 0 0 0.04em rgba(220, 0, 0, 0.9) inset;
    color: rgb(220, 0, 0);
    font-size: 1.5rem;
    border: 0.15em solid transparent;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    letter-spacing: 0.1em;
    border-radius: 0.2em;
}

#car-carousel,
#carousel-current {
    touch-action: pan-y;
    -ms-touch-action: pan-y; /* pro starší Edge/IE mobilní variany */
}
/* 2) Zakáž overscroll (pull-to-refresh) horizontálně, 
aby swipe vlevo/vpravo nezachytával browser jako scroll */
body, html {
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
}
@media (max-width: 768px) {
    .stamp-sold {
        font-size: 1.5rem;
        border-width: 3px;
        padding: 0.3rem 0.8rem;
    }
}

#load-more-sold, #load-more-active {
    border: none;
    transition: color 0.3s ease; /* plynulý přechod */
}

#load-more-sold:hover, #load-more-active:hover {
    background: transparent;
}