@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
    --red:        #e00000;
    --red-dark:   #8a0000;
    --red-deep:   #3d0000;
    --black:      #0a0a0a;
    --gray-dark:  #1a1a1a;
    --gray-mid:   #2e2e2e;
    --gray-light: #f5f5f5;
    --white:      #ffffff;
    --text:       #111111;
    --text-muted: #555555;
    --nav-width:  240px;
    --font-head:  'Rajdhani', sans-serif;
    --font-body:  'DM Sans', sans-serif;
    --transition: 0.22s ease;
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in.visible {
    animation: fadeIn 0.8s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(224, 0, 0, 0.1);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading for cards */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Page hero animation */
.page-hero h1 {
    animation: slideInLeft 0.8s ease-out;
}

.page-hero .tagline {
    animation: slideInRight 0.8s ease-out 0.2s backwards;
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--black);
    color: var(--text);
    min-height: 100vh;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: var(--gray-dark); }
*::-webkit-scrollbar-thumb { background: var(--red); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: #ff2020; }

/* ─── Navigation (left sidebar) ─────────────────────────────── */
nav#leve-menu {
    position: fixed;
    top: 0; left: 0;
    width: var(--nav-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--black) 0%, var(--gray-dark) 100%);
    border-right: 1px solid #2a0000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    z-index: 100;
    overflow-y: auto;
}

nav#leve-menu .logo-wrap {
    margin-bottom: 28px;
    text-align: center;
}

nav#leve-menu .logo-wrap img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(224,0,0,0.4));
    transition: filter var(--transition);
}

nav#leve-menu .logo-wrap img:hover {
    filter: drop-shadow(0 0 20px rgba(224,0,0,0.75));
}

nav#leve-menu ul {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

nav#leve-menu ul li a {
    display: block;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: #cccccc;
    padding: 10px 16px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

nav#leve-menu ul li a:hover {
    background: rgba(224,0,0,0.15);
    border-left-color: var(--red);
    color: var(--white);
    padding-left: 20px;
}

nav#leve-menu ul li a.aktivni {
    background: rgba(224,0,0,0.2);
    border-left-color: var(--red);
    color: var(--white);
}

/* ─── Main Content Area ──────────────────────────────────────── */
div#obsah {
    margin-left: var(--nav-width);
    min-height: 100vh;
    background-color: var(--white);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    overflow-x: hidden;
}

/* ─── Hero / Page Header ─────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--black) 0%, var(--red-deep) 50%, var(--black) 100%);
    padding: 60px 48px 48px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 30px,
        rgba(255,255,255,0.012) 30px,
        rgba(255,255,255,0.012) 32px
    );
}

.page-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    position: relative;
}

.page-hero h1 span {
    color: var(--red);
}

.page-hero .tagline {
    font-family: var(--font-body);
    font-size: 18px;
    color: rgba(255,255,255,0.6);
    margin-top: 10px;
    letter-spacing: 0.04em;
    position: relative;
}

/* ─── Content sections ───────────────────────────────────────── */
.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 48px;
    border-bottom: 1px solid #ebebeb;
}

.section:last-child { border-bottom: none; }

.section h2 {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

.section h3 {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 10px;
}

.section p {
    font-size: 17px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 14px;
    max-width: 720px;
}

.section ul {
    padding-left: 0;
    list-style: none;
}

.section ul li {
    padding: 8px 0 8px 20px;
    font-size: 17px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.section ul li::before {
    content: '▸';
    color: var(--red);
    position: absolute;
    left: 0;
}

/* ─── Index page specifics ───────────────────────────────────── */
.home-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 28px;
    max-width: 900px;
}

.home-card {
    background: var(--gray-light);
    border-radius: 10px;
    padding: 28px 32px;
    border-left: 4px solid var(--red);
    transition: transform var(--transition), box-shadow var(--transition);
    opacity: 0;
    transform: translateX(100px);
}

.home-card.visible {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.home-card:nth-child(1).visible { animation-delay: 0s; }
.home-card:nth-child(2).visible { animation-delay: 0.1s; }
.home-card:nth-child(3).visible { animation-delay: 0.2s; }
.home-card:nth-child(4).visible { animation-delay: 0.3s; }
.home-card:nth-child(5).visible { animation-delay: 0.4s; }

.home-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.home-card h3 {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    color: var(--text);
}

.home-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
}

.home-card a {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.home-card a:hover { border-bottom-color: var(--red); }

/* ─── Contact Cards ──────────────────────────────────────────── */
.contact-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 28px;
}

.contact-card {
    background: var(--black);
    color: var(--white);
    border-radius: 12px;
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100px);
}

.contact-card.visible {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.contact-cards .contact-card:nth-child(1).visible { animation-delay: 0s; }
.contact-cards .contact-card:nth-child(2).visible { animation-delay: 0.15s; }

.contact-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--red);
}

.contact-card .role-badge {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
    border: 1px solid var(--red-dark);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.contact-card h3 {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 15px;
    color: rgba(255,255,255,0.8);
}

.contact-item:last-child { border-bottom: none; }

.contact-item .icon {
    width: 32px;
    height: 32px;
    background: rgba(224,0,0,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.contact-item a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color var(--transition);
}

.contact-item a:hover { color: var(--red); }

.contact-note {
    background: #fff9f0;
    border: 1px solid #f0d070;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 32px;
    font-size: 15px;
    color: #555;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.contact-note .note-icon { font-size: 22px; flex-shrink: 0; }

/* ─── Car Listings (Koupe) ───────────────────────────────────── */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.car-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.car-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #eee;
    transition: opacity 0.2s;
}

.car-card:hover .car-card-img { opacity: 0.9; }

.car-card-body {
    padding: 16px 18px 18px;
}

.car-card-body .car-name {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 4px;
}

.car-card-body .car-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.car-card-body .car-price {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--red);
    background: rgba(224, 0, 0, 0.08);
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    margin-top: 6px;
}

/* Zvýrazněné "Chci Koupit!" v levém menu (hlavní akce pro kupující) */
nav#leve-menu ul li a.nav-cta {
    background: var(--red);
    color: #fff;
    border-left-color: #fff;
}
nav#leve-menu ul li a.nav-cta:hover {
    background: #c00000;
    color: #fff;
}

.car-card-cta {
    display: block;
    margin-top: 12px;
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 9px;
    border-radius: 6px;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background var(--transition);
}

.car-card:hover .car-card-cta { background: var(--red); }

/* ─── Modal / Slideshow ──────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--white);
    border-radius: 14px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--black);
    color: var(--white);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}

.modal-close:hover { background: var(--red); }

.modal-slideshow {
    position: relative;
    background: var(--black);
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    height: 360px;
}

.modal-slideshow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transition: opacity 0.3s;
}

.modal-slideshow img.active { display: block; }

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.55);
    color: white;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
    z-index: 5;
}

.slide-btn:hover { background: var(--red); }
.slide-btn.prev { left: 14px; }
.slide-btn.next { right: 14px; }

.slide-dots {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.slide-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background var(--transition);
}

.slide-dot.active { background: var(--white); }

.modal-details {
    padding: 28px 32px 32px;
}

.modal-details h2 {
    font-family: var(--font-head);
    font-size: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.modal-details .modal-price {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 20px;
}

.modal-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.spec-item {
    background: var(--gray-light);
    padding: 10px 14px;
    border-radius: 8px;
}

.spec-item .spec-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.spec-item .spec-val {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.modal-desc {
    font-size: 15px;
    color: #444;
    line-height: 1.75;
    margin-bottom: 20px;
}

.modal-contact-btn {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    padding: 13px 28px;
    border-radius: 8px;
    transition: background var(--transition);
}

.modal-contact-btn:hover { background: var(--red-dark); }

/* ─── Prodej – Process Steps ─────────────────────────────────── */
.steps-list {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-item {
    display: flex;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid #ebebeb;
    position: relative;
    opacity: 0;
    transform: translateX(100px);
}

.step-item.visible {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.step-item:nth-child(1).visible { animation-delay: 0s; }
.step-item:nth-child(2).visible { animation-delay: 0.1s; }
.step-item:nth-child(3).visible { animation-delay: 0.15s; }
.step-item:nth-child(4).visible { animation-delay: 0.2s; }
.step-item:nth-child(5).visible { animation-delay: 0.25s; }

.step-item:last-child { border-bottom: none; }

.step-num {
    font-family: var(--font-head);
    font-size: 48px;
    font-weight: 700;
    color: rgba(224,0,0,0.15);
    line-height: 1;
    min-width: 56px;
    user-select: none;
}

.step-body h3 {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 8px;
}

.step-body p {
    font-size: 16px;
    color: #444;
    line-height: 1.75;
    max-width: 620px;
    margin: 0;
}

/* ─── Terms / Podminky ───────────────────────────────────────── */
.terms-section {
    padding: 40px 48px;
    border-bottom: 1px solid #ebebeb;
}

.terms-section:last-child { border-bottom: none; }

.terms-section h2 {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 6px;
    border-bottom: 2px solid var(--red);
    padding-bottom: 8px;
    display: inline-block;
}

.terms-section .terms-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: block;
    margin-top: 6px;
}

.terms-section h3 {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 22px 0 8px;
}

.terms-section p {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 10px;
    max-width: 800px;
}

.terms-section ul {
    padding-left: 0;
    list-style: none;
    margin: 8px 0 14px;
}

.terms-section ul li {
    font-size: 15px;
    color: #444;
    padding: 5px 0 5px 20px;
    position: relative;
    line-height: 1.7;
}

.terms-section ul li::before {
    content: '▸';
    color: var(--red);
    position: absolute;
    left: 0;
}

/* ─── Footer strip ───────────────────────────────────────────── */
.page-footer {
    background: var(--gray-light);
    padding: 20px 48px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.page-footer a { color: var(--text-muted); text-decoration: none; }
.page-footer a:hover { color: var(--red); }

/* ─── Responsive – Portrait / Mobile ────────────────────────── */
@media screen and (max-width: 768px) {
    nav#leve-menu {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 16px 12px;
        border-right: none;
        border-bottom: 1px solid #2a0000;
    }

    nav#leve-menu .logo-wrap { margin-bottom: 12px; }
    nav#leve-menu .logo-wrap img { width: 80px; height: 80px; }

    nav#leve-menu ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    nav#leve-menu ul li a {
        font-size: 12px;
        padding: 7px 12px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    nav#leve-menu ul li a:hover,
    nav#leve-menu ul li a.aktivni {
        padding-left: 12px;
        border-left: none;
        border-bottom-color: var(--red);
    }

    div#obsah { margin-left: 0; }

    .page-hero { padding: 32px 20px 28px; }

    .section,
    .terms-section { padding: 28px 20px; }

    .home-grid,
    .contact-cards { grid-template-columns: 1fr; }

    .modal-specs { grid-template-columns: 1fr; }

    .modal-details { padding: 20px; }
}

@media print {
    nav#leve-menu { display: none; }
    div#obsah { margin-left: 0; }
}
