body {
    background-color: #F6F7F9;
}

.content-wrapper {
    display: grid;
    justify-items: center;
}

#hero-content {
    width: 100%;
    height: 92vh;
    background-color: #2983FF;
    position: relative;
    overflow: hidden;
}

.hero-stage {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-vector {
    position: absolute;
    left: 650px;
    top: 213px;
    height: 750px;
    width: auto;
    z-index: 2;
    max-width: 100%;
    overflow: hidden;
    object-fit: cover;
}

.main-img {
    position: absolute;
    top: 0;
    right: 130px;
    width: 1300px;
    height: auto;
    z-index: 1;
    max-width: 100%;
    filter: brightness(0.7) contrast(1.05);
}

.hero-text {
    left: 130px;
    top: 100px;
    position: relative;
    z-index: 5;
    width: 48%;
}

.main-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 4.5rem;
    color: white;
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    line-height: 1.05;
}

.main-text-line {
    display: block;
}

.main-text-sub {
    display: block;
    font-size: 0.36em;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    margin-top: 0.15em;
}

.our-services-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    padding: 18px 34px;
    color: #fff;
    font-weight: 600;
    font-size: 1.32rem;
    cursor: pointer;
    background-color: #39CF99;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Ensure anchors keep button-like look */
.our-services-button:link,
.our-services-button:visited {
    color: #fff;
    text-decoration: none;
}

.our-services-button:hover {
    background-color: #30aa7d;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.our-services-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

.our-services-button:focus {
    outline: none;
}

.our-services-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(48, 170, 125, 0.35);
}

.main-p {
    position: absolute;
    z-index: 5;
    left: 130px;
    bottom: 11cqh;
    margin: 0;
    color: white;
    width: min(42%, 34rem);
    font-size: 1.34rem;
    font-weight: 400;
    line-height: 1.45;
}

.main-p-highlight {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* FAQs button */
.faqs-button {
    position: absolute;
    top: 850px;
    right: 130px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 14px 28px;
    border: 2px solid #ffffff;
    border-radius: 14px;
    color: #ffffff;
    background: transparent;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    z-index: 4;
}

.faqs-button:link,
.faqs-button:visited {
    color: #ffffff;
}

.faqs-button:hover {
    background: #ffffff;
    color: #2983FF; /* page blue */
    box-shadow: 0 8px 18px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.faqs-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.faqs-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
}

#two-choices {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
    justify-items: center;
}

.choice-window {
    height: 360px;
    width: 100%;
    max-width: 450px;
    margin-top: 32px;
    margin-bottom: 32px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, background 0.25s ease, filter 0.25s ease;
}

.choice-click {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.choice-window:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.18);
    filter: saturate(1.05);
}

/* First card: gradient (swapped from former partner style) */
.borrower {
    color: white;
    position: relative;
    background: linear-gradient(135deg, #2983FF 0%, #39CF99 100%);
    overflow: hidden;
}

.borrower:hover {
    background: linear-gradient(135deg, #1f73e6 0%, #2fb788 100%);
}

.choice-bg-svg {
    position: absolute;
    z-index: 0;
}

/* Decorative SVG: scaled up, anchored from top center to avoid clipping */
.partner .choice-bg-svg {
    top: 0;
    left: 50%;
    width: 140%;
    max-width: none;
    height: auto;
    transform: translateX(-50%) scale(1.1);
    transform-origin: top center;
    pointer-events: none;
}


.lender {
    background-color: #39CF99;
    color: white;
}

.lender:hover {
    background-color: #2fb788;
}

.lender .choice-container button {
    background-color: #2983FF;
}

/* Middle card: solid blue + BG.svg (swapped from former borrower style) */
.partner {
    background-color: #2983FF;
    color: white;
    position: relative;
    overflow: hidden;
    height: 420px;
    max-width: 560px;
    align-self: center;
}

.partner:hover {
    background-color: #1f73e6;
}

.partner .choice-container button {
    background-color: #39CF99;
}

.choice-container {
    position: relative;
    z-index: 1;
    top: 0;
    margin: 0;
    padding: 22px 24px 34px;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.choice-container h3 {
    font-size: 32px;
    margin: 0;
    line-height: 1.2;
}

.choice-container p {
    width: 100%;
    font-size: 17.5px;
    margin: 0;
    line-height: 1.45;
}

.choice-points {
    width: 100%;
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    align-items: center;
    font-size: 1.05rem;
    line-height: 1.35;
}

.choice-points li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.choice-point-icon {
    width: 18px;
    min-width: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
}

.choice-container button {
    border: none;
    background-color: #39CF99;
    padding: 10px 20px;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.choice-container button[disabled] {
    opacity: 0.8;
    cursor: not-allowed;
}

.choice-container button:hover {
    background-color: #24996e;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(41, 131, 255, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lender .choice-container button:hover {
    background-color: #4fa3ff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(57, 207, 153, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}


.filters {
    width: 100%;
    background-color: #2983FF;
    height: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position:relative;
    overflow: hidden;
}

.filters-bg {
    position: absolute;
    width: auto;
    height: auto;
    z-index: 0;
    pointer-events: none; /* So it doesn't block clicks */
    object-fit: none;
    transform: rotate(15deg);
}

.filters > *:not(.filters-bg) {
    position: relative;
    z-index: 1;
}

.filters h3 {
    font-size: 32px;
    color: white;
    margin-top: 81px;
}

.search-form {
    width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vehicle-tabs {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 2px;
    background-color: white;
    border-radius: 8px;
}

.vehicle-tabs input[type="radio"] {
    display: none;
}

.vehicle-tabs .tab {
    width: 32.6%;
    border-radius: 8px;
    color: #1A202C;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border 0.2s;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    gap: 8px;
    align-items: center;
}

.vehicle-tabs input[type="radio"]:checked + .tab {
    background: #2983FF;
    color: white;
    z-index: 1;
}

.vehicle-tabs input[type="radio"]:checked + .tab .tab-icon {
    filter: invert(1) brightness(2);
}

.vehicle-tabs .tab .tab-icon {
    filter: invert(0) brightness(1);
}

.vehicle-tabs input[type="radio"]:not(:checked) + .tab .tab-icon[src*="taxi"] {
    filter: invert(1) brightness(2);
}

.vehicle-tabs input[type="radio"]:checked + .tab .tab-icon[src*="taxi"] {
    filter: invert(0) brightness(2);
}

.search-fields {
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(4, auto); /* 4 rows */
    grid-auto-flow: column;
    column-gap: 24px;
    row-gap: 8px; 
}

.search-fields select,
.search-fields input[type="number"],
.search-fields input[type="text"],
.search-fields input[type="checkbox"] {
    font-size: 16px;
    font-weight:500;
    padding: 10px;
    border-radius: 8px;
    border: none;
    height: 46px;
    box-sizing: border-box;
}

.search-fields select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff; /* or your existing background */
    background-image: url('/static/images/arrow-down.svg');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: white;
    margin-bottom: 8px;
    cursor: pointer;
    user-select: none;
}

.switch-container input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    background-color: #84B7FF;
    border-radius: 24px;
    transition: background 0.2s;
}

.slider:before {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

input[type="checkbox"]:checked + .slider {
    background-color: white;
}

input[type="checkbox"]:checked + .slider:before {
    transform: translateX(20px);
    background: #2983FF;
}

.search-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 4fr;
    gap: 24px;
    margin-top: 16px;
}

.advanced-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 10px;
    padding: 10px 28px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.advanced-btn i {
    font-size: 18px;
}

.advanced-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: #fff;
}

.results-btn {
    background-color: #39CF99;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.results-btn:hover {
    background-color: #82cfb3;
}

h4 {
    color: #2983FF;
    font-size: 32px;
    margin-top: 76px;
    margin-bottom: 35px;
}

.partner-vehicles-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.35em;
    row-gap: 0.1em;
}

.partner-heading-count {
    white-space: nowrap;
}

.vehicle-list {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    row-gap: 20px;
    column-gap: 24px;
    margin-bottom: 75px;
}

.vehicle-section {
    max-width: 1350px;
}

.list-text {
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 25px;
}

.list-text p {
    margin: 0;
    color: #969696;
}

.list-text a {
    color: #3563E9;
    cursor: pointer;
}

.vehicle-list-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 24px auto 75px;
}

.show-more-btn {
    display: inline-block;
    margin: 0;
    padding: 10px 32px;
    border-radius: 8px;
    background: #2983FF;
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    background-color: #2983FF;
}

.show-less-btn {
    background: #fff;
    color: #2983FF;
    border: 2px solid #2983FF;
}

.show-less-btn:hover {
    background: rgba(41, 131, 255, 0.08);
}


#faq {
    min-height: 700px;
    padding-bottom: 48px;
    padding-left: clamp(16px, 5vw, 130px);
    padding-right: clamp(16px, 5vw, 130px);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: #39CF99;
    justify-items: center;
}

#faq h3 {
    text-align: center;
    color: white;
    font-size: 36px;
    margin-top: 70px;
    margin-bottom: 50px;
}

#faq > *:not(.faq-bg):not(.faq-bg-2) {
    position: relative;
    z-index: 1;
}

.faq-bg, .faq-bg-2 {
    position: absolute;
    z-index: 0;
    pointer-events: none; /* So it doesn't block clicks */
    object-fit: cover;
}

.faq-bg {
    margin-top: 200px;
    width: 100%;
}

.faq-bg-2 {
    margin-top: 150px;
    left: -100px;
    transform: rotate(-5deg);
}

.faq-subtitle {
    color: #fff;
    font-size: 18px;
    margin-bottom: 32px;
}

.faq-list {
    width: min(900px, 100%);
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1;
}

/* FAQ styles */
.faq-item {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.faq-question {
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    list-style: none; /* Remove default summary arrow */
}

.faq-question::-webkit-details-marker {
    display: none; /* Remove default summary arrow in webkit browsers */
}

.faq-arrow {
    flex-shrink: 0;
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    transition: transform 0.3s;
    background: url('/static/images/arrow-down.svg') center/contain no-repeat;
}

details[open] .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    font-size: 17px;
    color: #444;
    margin-bottom: 0;
    padding-top: 12px;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-answer a {
    color: #2983FF;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-answer a:hover {
    color: #1f73e6;
}

/* Desktop: full-width stage, 130px gutters (matches header). */
@media (min-width: 1201px) {
    .hero-stage {
        container-type: size;
        width: 100%;
        height: 100%;
    }

    .main-vector {
        left: 33.854cqw;
        top: auto;
        bottom: 0;
        height: 100cqh;
        width: auto;
        object-fit: contain;
        object-position: left bottom;
        overflow: visible;
    }

    .main-img {
        right: 130px;
        width: min(67.708cqw, calc(100cqw - 260px));
        max-height: 86cqh;
        object-fit: contain;
        object-position: right top;
    }

    .hero-text {
        position: absolute;
        left: 130px;
        top: 10.060cqh;
        width: min(50%, 44rem);
        z-index: 5;
    }

    .main-text {
        font-size: clamp(2.35rem, 3.6cqw, 4.5rem);
        line-height: 1.08;
        margin-bottom: 1.309cqw;
    }

    .our-services-button {
        width: fit-content;
    }

    .main-p {
        left: 130px;
        bottom: 11cqh;
        width: min(42%, 34rem);
        font-size: clamp(1rem, 1.1cqw, 1.34rem);
    }

    .faqs-button {
        top: auto;
        bottom: 4cqh;
        right: 130px;
    }
}

/* Slightly tighter on medium desktops only */
@media (min-width: 1201px) and (max-width: 1550px) {
    .main-img {
        max-height: 82cqh;
    }

    .main-text {
        font-size: clamp(2.15rem, 3.25cqw, 3.4rem);
    }
}

@media (max-width: 1200px) {
    #hero-content {
        max-width: 100%;
    }

    /* Remove wrapper from layout so mobile matches pre–hero-stage behavior */
    .hero-stage {
        display: contents;
    }

    .main-img {
        display: none;
    }

    .faqs-button {
        display: none;
    }

    .main-p {
        left: 130px;
        bottom: 10vh;
        width: min(85%, 28rem);
        font-size: 1.05rem;
    }

    .hero-text {
        top: 115px;
    }

    .main-vector {
        left: 100px;
        top: 100px;
        transform: rotate(80deg);
        overflow: visible;
        height: 92vh;
    }

    .main-text {
        font-size: 3rem;
    }
    
    #two-choices {
        grid-template-columns: 1fr;
        gap: 0;
        width: 80%;
    }

    .choice-window {
        height: 200px;
        margin: 15px;
        display: flex;
    }

    .partner.choice-window {
        height: 240px;
        max-width: 100%;
    }

    .lender.choice-window {
        height: 230px;
        max-width: 100%;
    }

    .choice-container {
        top: 0;
        padding: 16px 14px;
        justify-content: center;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
    }

    .choice-container h3 {
        margin: 0;
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .choice-container p {
        margin: 0;
    }

    .vehicle-list {
        grid-template-columns: 1fr;
    }

    .search-form {
        width: 80%;
    }

    .filters h3 {
        margin-top: 40px;
    }

    .filters {
        height: 750px;
    }

    .search-actions {
        grid-template-columns: 1fr 1fr;
    }
    
    .search-actions .advanced-btn,
    .search-actions .results-btn {
        width: 100%;
        min-width: 0;
    }

    .advanced-btn {
        flex-direction: column;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    #hero-content {
        /* Stable hero height across iOS browsers and in-app webviews */
        height: 100svh;
        min-height: 100svh;
        height: calc(var(--hero-vh, 1vh) * 100);
        min-height: calc(var(--hero-vh, 1vh) * 100);
        background-color: #1a4f99;
    }

    /* Restore stage so the hero image can fill the viewport */
    .hero-stage {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .main-img {
        display: block;
        position: absolute;
        inset: 0;
        top: 0;
        right: auto;
        left: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: center 35%;
        z-index: 1;
        filter: brightness(0.62) contrast(1.05);
        pointer-events: none;
    }

    .main-vector {
        display: none;
    }

    .hero-text {
        top: auto;
        left: 20px;
        bottom: 18vh;
        width: calc(100% - 40px);
        padding: 0 20px;
        padding-top: 8vh;
        box-sizing: border-box;
        position: absolute;
        z-index: 5;
    }

    .main-text {
        font-size: 2.3rem;
    }

    .main-text-sub {
        font-size: 0.55em;
        margin-top: 0.2em;
    }

    h4 {
        text-align: center;
        padding: 0 16px;
        box-sizing: border-box;
        margin-top: 28px;
        margin-bottom: 8px;
        font-size: 1.55rem;
        line-height: 1.25;
    }

    #two-choices {
        margin-top: 0;
        gap: 8px;
    }

    .choice-window {
        height: 168px;
        min-height: 168px;
        margin: 8px 12px;
        display: flex;
    }

    .partner.choice-window {
        height: 210px;
        min-height: 210px;
        max-width: 100%;
    }

    .lender.choice-window {
        height: 196px;
        min-height: 196px;
        max-width: 100%;
    }

    .choice-container {
        top: 0;
        padding: 14px 16px 20px;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
    }

    .choice-container h3 {
        margin: 0;
        font-size: 1.15rem;
        line-height: 1.25;
        font-weight: 700;
    }

    .choice-container p {
        margin: 0;
        font-size: 0.96rem;
        line-height: 1.4;
        opacity: 0.95;
    }

    .choice-points {
        margin: 0;
        padding-left: 0;
        gap: 6px;
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .main-p {
        display: none;
    }

    .vehicle-tabs .tab {
        flex-direction: column;
        gap: 4px;
    }

    /* Shorten tab labels on mobile */
    .vehicle-tabs label[for="tab-taxi"]::after {
        content: "Taxi";
    }
    
    .vehicle-tabs label[for="tab-delivery"]::after {
        content: "Rozvoz";
    }
    
    .vehicle-tabs label[for="tab-other"]::after {
        content: "Ostatné";
    }
    
    /* Hide original text on mobile */
    .vehicle-tabs label[for="tab-taxi"] {
        font-size: 0;
    }
    
    .vehicle-tabs label[for="tab-delivery"] {
        font-size: 0;
    }
    
    .vehicle-tabs label[for="tab-other"] {
        font-size: 0;
    }
    
    /* Show shortened text */
    .vehicle-tabs label[for="tab-taxi"]::after,
    .vehicle-tabs label[for="tab-delivery"]::after,
    .vehicle-tabs label[for="tab-other"]::after {
        font-size: 16px;
        display: block;
    }

    .search-fields {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 725px) {
    .hero-text {
        top: auto;
        left: 15px;
        bottom: 16vh;
        width: calc(100% - 30px);
        padding: 0 15px;
        padding-top: 8vh;
        box-sizing: border-box;
    }

    .main-p {
        display: none;
    }

    .main-text {
        font-size: 2.3rem;
    }

    .main-text-sub {
        font-size: 0.55em;
    }

    .main-img {
        object-position: center 32%;
    }

    .main-vector {
        display: none;
    }
}

/* Additional mobile-specific fixes */
@media (max-width: 480px) {
    .hero-text {
        left: 10px;
        width: calc(100% - 20px);
        padding: 0 10px;
        padding-top: 8vh;
        bottom: 14vh;
    }

    .main-text-sub {
        font-size: 0.58em;
    }

    .main-img {
        object-position: center 30%;
    }

    .main-vector {
        display: none;
    }

    .main-text {
        font-size: 2rem;
    }

    .main-p {
        display: none;
    }
}