/* ==========================================
   MODEL LANDING PAGES  (/modely/:slug)
   BYD Humenné - custom, matches bydhe theme
   ========================================== */

.ml-page {
    --ml-accent: var(--byd-red, #db141c);
    color: var(--text-main, #333);
}

/* ---------- HERO ---------- */
.ml-hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
}
.ml-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    animation: mlHeroZoom 8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.ml-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.15) 100%);
}
@keyframes mlHeroZoom {
    from { transform: scale(1.12); }
    to   { transform: scale(1); }
}
.ml-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 64px;
    padding-top: 140px;
}
.ml-hero-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.72);
    margin-bottom: 14px;
}
.ml-hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 14px;
    text-transform: uppercase;
}
.ml-hero-sub {
    font-size: 1.15rem;
    font-weight: 300;
    max-width: 640px;
    margin: 0 0 30px;
    color: rgba(255,255,255,0.9);
}
.ml-hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.ml-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: var(--transition, all .3s ease);
    text-decoration: none;
    cursor: pointer;
}
.ml-btn-primary {
    background: var(--ml-accent);
    border-color: var(--ml-accent);
    color: #fff;
}
.ml-btn-primary:hover { background: #b31017; border-color: #b31017; color: #fff; }
.ml-btn-ghost {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.55);
    color: #fff;
    backdrop-filter: blur(4px);
}
.ml-btn-ghost:hover { background: #fff; color: #111; border-color: #fff; }

/* ---------- BREADCRUMB ---------- */
.ml-breadcrumb {
    background: var(--bg-light, #f9f9f9);
    border-bottom: 1px solid var(--border-color, #e2e2e2);
    font-size: 0.82rem;
}
.ml-breadcrumb .container {
    padding-top: 12px;
    padding-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.ml-breadcrumb a {
    color: var(--text-dim, #666);
    text-decoration: none;
    transition: color 0.2s ease;
}
.ml-breadcrumb a:hover { color: var(--ml-accent); }
.ml-breadcrumb span[aria-hidden] { color: #bbb; }
.ml-breadcrumb-current { color: var(--black, #111); font-weight: 600; }

/* ---------- SPEC BAR ---------- */
.ml-specs {
    background: var(--black, #111);
    color: #fff;
}
.ml-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.ml-spec {
    padding: 34px 20px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.ml-spec:last-child { border-right: none; }
.ml-spec i {
    font-size: 1.2rem;
    color: var(--ml-accent);
    margin-bottom: 12px;
    display: block;
}
.ml-spec-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}
.ml-spec-value small { font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.7); }
.ml-spec-label {
    display: block;
    margin-top: 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.55);
}

/* ---------- SECTION SHELL ---------- */
.ml-section { padding: 80px 0; }
.ml-section--gray { background: var(--bg-light, #f9f9f9); }
.ml-kicker {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--ml-accent);
    margin-bottom: 12px;
}
.ml-h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 20px;
    color: var(--black, #111);
}
.ml-lead {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-dim, #555);
}

/* ---------- OVERVIEW SPLIT ---------- */
.ml-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.ml-overview-media img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* ---------- FEATURES ---------- */
.ml-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-top: 44px;
}
.ml-feature {
    background: #fff;
    border: 1px solid var(--border-color, #e2e2e2);
    border-radius: 10px;
    padding: 30px 26px;
    transition: var(--transition, all .3s ease);
}
.ml-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.08);
    border-color: transparent;
}
.ml-feature-ico {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(219,20,28,0.08);
    color: var(--ml-accent);
    font-size: 1.2rem;
    margin-bottom: 18px;
}
.ml-feature h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 10px; color: var(--black,#111); }
.ml-feature p { font-size: 0.95rem; line-height: 1.7; color: var(--text-dim,#555); margin: 0; }

/* ---------- SPEC TABLE ---------- */
.ml-spectable-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 60px;
    margin-top: 30px;
}
.ml-spec-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color, #e2e2e2);
}
.ml-spec-row span { color: var(--text-dim, #666); font-size: 0.95rem; }
.ml-spec-row strong { color: var(--black, #111); font-size: 0.95rem; font-weight: 600; text-align: right; }

/* ---------- GALLERY ---------- */
.ml-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 14px;
    margin-top: 44px;
}
.ml-gallery-item {
    overflow: hidden;
    border-radius: 8px;
    display: block;
    position: relative;
}
.ml-gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.ml-gallery-item:hover img { transform: scale(1.06); }
.ml-gallery-item--wide { grid-column: span 2; }
.ml-gallery-item--tall { grid-row: span 2; }

/* ---------- CTA ---------- */
.ml-cta {
    position: relative;
    color: #fff;
    text-align: center;
    padding: 96px 20px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.ml-cta::before {
    content: "";
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.62);
}
.ml-cta > .container { position: relative; z-index: 2; }
.ml-cta h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; margin: 0 0 14px; }
.ml-cta p { font-size: 1.05rem; font-weight: 300; max-width: 620px; margin: 0 auto 30px; color: rgba(255,255,255,0.88); }
.ml-cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- OTHER MODELS ---------- */
.ml-more-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 40px;
}
.ml-more-card {
    display: block;
    border: 1px solid var(--border-color, #e2e2e2);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition, all .3s ease);
    background: #fff;
}
.ml-more-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,0.08); }
.ml-more-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.ml-more-card .ml-more-body { padding: 14px 16px; }
.ml-more-card h4 { font-size: 1rem; font-weight: 600; margin: 0 0 4px; color: var(--black,#111); }
.ml-more-card span { font-size: 0.82rem; color: var(--text-sub, #888); }

/* ==========================================
   NAV DROPDOWN - MODELY (desktop)
   ========================================== */
.nav-has-dropdown { position: relative; }
.nav-caret {
    font-size: 0.58rem;
    margin-left: 5px;
    transition: transform 0.28s ease;
    display: inline-block;
}
.nav-has-dropdown:hover .nav-caret,
.nav-has-dropdown:focus-within .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: -18px;
    margin-top: 16px;
    min-width: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    padding: 22px 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1300;
}
/* neviditeľný "mostík" cez medzeru, aby dropdown nezmizol pri prechode myšou */
.nav-dropdown::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 34px;
}
.nav-dd-title {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--byd-red, #db141c);
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    display: block;
}
.nav-dropdown a {
    color: #222 !important;
    text-transform: none !important;
    font-size: 0.87rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    display: block;
    padding: 8px 10px;
    border-radius: 7px;
    transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
    white-space: nowrap;
}
.nav-dropdown a:hover {
    background: #f5f5f5;
    color: var(--byd-red, #db141c) !important;
    padding-left: 14px;
}
.nav-dd-all {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding-top: 12px !important;
    border-top: 1px solid #eee;
    text-align: center;
    font-weight: 600 !important;
    color: var(--byd-red, #db141c) !important;
    text-transform: uppercase !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.5px !important;
}
.nav-dd-all:hover { background: transparent !important; padding-left: 10px !important; }

/* ==========================================
   MOBILE MENU - MODELY ACCORDION
   ========================================== */
.mobile-nav-group { display: flex; flex-direction: column; }
.mobile-nav-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(1.2rem, 4.8vw, 1.8rem);
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: -0.3px;
    line-height: 1.3;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.25s ease;
}
.mobile-nav-toggle i {
    font-size: 0.75em;
    opacity: 0.65;
    transition: transform 0.3s ease;
}
.mobile-nav-group.open > .mobile-nav-toggle { color: var(--primary, #ed1c24); }
.mobile-nav-group.open > .mobile-nav-toggle i { transform: rotate(180deg); opacity: 1; }

.mobile-submenu {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.mobile-nav-group.open .mobile-submenu { max-height: 760px; }
.mobile-submenu a {
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: rgba(255,255,255,0.68) !important;
    padding: 9px 0 9px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    line-height: 1.3 !important;
}
.mobile-submenu a:hover { color: #fff !important; padding-left: 22px !important; }
.mobile-submenu-all {
    color: var(--primary, #ed1c24) !important;
    font-weight: 700 !important;
}
.mobile-sub-title {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--primary, #ed1c24);
    font-weight: 700;
    padding: 14px 0 4px 16px;
}

/* na menších desktopoch zúžime mega-menu */
@media (max-width: 1120px) {
    .nav-dropdown { min-width: 420px; }
}

/* ---------- /modely CARD SPEC CHIPS ---------- */
.model-card-specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
}
.model-card-specs span {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--detail-dark, #151515);
    background: #f2f2f2;
    border: 1px solid #e6e6e6;
    border-radius: 999px;
    padding: 4px 10px;
    line-height: 1;
    white-space: nowrap;
}

/* ---------- FOOTER MODELS LIST ---------- */
.footer-models {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 30px 0 10px;
    margin-top: 10px;
}
.footer-models-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 26px;
    margin-top: 16px;
}
.footer-models-grid a {
    color: rgba(255,255,255,0.66);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color .2s ease;
}
.footer-models-grid a:hover { color: #fff; }
@media (max-width: 991px) {
    .footer-models-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .footer-models-grid { grid-template-columns: 1fr; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
    .ml-overview-grid { grid-template-columns: 1fr; gap: 32px; }
    .ml-features-grid { grid-template-columns: repeat(2, 1fr); }
    .ml-specs-grid { grid-template-columns: repeat(2, 1fr); }
    .ml-spec:nth-child(2) { border-right: none; }
    .ml-spec { border-bottom: 1px solid rgba(255,255,255,0.08); }
    .ml-spectable-grid { grid-template-columns: 1fr; gap: 0; }
    .ml-more-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .ml-hero { min-height: 76vh; }
    .ml-hero-inner { padding-top: 120px; padding-bottom: 44px; }
    .ml-section { padding: 56px 0; }
    .ml-features-grid { grid-template-columns: 1fr; }
    .ml-specs-grid { grid-template-columns: 1fr; }
    .ml-spec { border-right: none; }
    .ml-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
    .ml-gallery-item--wide { grid-column: span 2; }
    .ml-cta { background-attachment: scroll; }
    .ml-hero-btns .ml-btn { flex: 1 1 auto; justify-content: center; }
}
