/* ============================================================
   Avtomaktab — sayt dizayni
   ============================================================ */

:root {
    --primary: #0b4fa8;
    --primary-dark: #083c80;
    --primary-light: #e8f0fb;
    --navy: #0a1f3d;
    --accent: #f5b301;
    --accent-dark: #d99e00;
    --text: #1f2937;
    --muted: #6b7280;
    --light: #f5f8fc;
    --border: #e5e9f0;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(10, 31, 61, 0.08);
    --shadow-lg: 0 20px 50px rgba(10, 31, 61, 0.15);
}

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
* { min-width: 0; }
p, a, span, li, h1, h2, h3, h4, h5 { overflow-wrap: anywhere; }

body {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 800; letter-spacing: -0.01em; color: var(--navy); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

.btn { font-weight: 700; border-radius: 999px; padding: 0.7rem 1.6rem; transition: all .2s ease; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--navy); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--navy); transform: translateY(-2px); }
.btn-outline-light:hover { color: var(--navy); }
.btn-sm-pill { padding: 0.45rem 1.1rem; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s, border-color .25s;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(10,31,61,.08); border-color: var(--border); }
.site-header .navbar { padding: 0.5rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.3rem; color: var(--navy); }
.navbar-brand img.brand-logo { height: 74px; width: auto; }
.footer-logo { display: inline-block; background: #fff; border-radius: 12px; padding: 8px 14px; }
.footer-logo img { height: 76px; width: auto; display: block; }
.brand-icon {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), #1976d2); color: #fff; font-size: 1.25rem;
}
.site-footer .brand-icon { background: var(--accent); color: var(--navy); }
.navbar-nav .nav-link { font-weight: 600; color: var(--navy); padding: .5rem .9rem !important; position: relative; }
.navbar-nav .nav-link:hover { color: var(--primary); }
.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }
.header-phone { font-weight: 700; color: var(--navy); white-space: nowrap; }
.header-phone:hover { color: var(--primary); }
.lang-switch { display: inline-flex; background: var(--light); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: .3rem .75rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--muted); }
.lang-switch a.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.offcanvas { max-width: 320px; }
@media (min-width: 992px) {
    .offcanvas { position: static; transform: none !important; visibility: visible !important; background: transparent; width: auto; max-width: none; border: 0; flex-grow: 1; }
    .offcanvas-header { display: none; }
    .offcanvas-body { display: flex; align-items: center; padding: 0; }
    .navbar-nav .nav-link, .lang-switch a, .header-actions .btn { white-space: nowrap; }
    .navbar-nav .nav-item { flex-shrink: 0; }
}
/* Tor desktop: header elementlari bir qatorga sig'ishi uchun */
@media (min-width: 992px) and (max-width: 1399px) {
    .navbar-nav .nav-link { padding: .5rem .55rem !important; font-size: .95rem; }
    .navbar-brand img.brand-logo { height: 60px; }
    .header-actions { gap: .75rem !important; }
    .header-phone { font-size: .95rem; }
    .lang-switch a { padding: .3rem .6rem; }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-nav .nav-link { padding: .5rem .45rem !important; font-size: .9rem; }
    .navbar-brand img.brand-logo { height: 54px; }
    .header-phone-text { display: none; }
    .header-phone .bi { margin-right: 0 !important; font-size: 1.1rem; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: clamp(620px, 92vh, 900px); display: flex; flex-direction: column; justify-content: center;
    padding: 150px 0 150px; background: var(--navy) center/cover no-repeat; background-image: var(--hero-bg); color: #fff;
}
.hero-stats { position: relative; z-index: 2; margin-top: -105px; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(8,30,70,.92) 0%, rgba(8,30,70,.75) 45%, rgba(8,30,70,.25) 100%);
}
.hero-content { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; }
.hero-badge {
    display: inline-block; padding: .4rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
    background: rgba(245,179,1,.18); color: var(--accent); border: 1px solid rgba(245,179,1,.4); margin-bottom: 1.25rem;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.12; color: #fff; margin-bottom: 1.25rem; }
.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,.85); max-width: 560px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-perks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .92rem; color: rgba(255,255,255,.85); }
.hero-perks i { color: var(--accent); margin-right: .4rem; }
.btn-pulse { animation: pulse 2s infinite; }
.stats-bar {
    position: relative; z-index: 1; color: #fff;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden;
}
.stat-item { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: rgba(10,31,61,.88); }
.stat-item i { font-size: 1.9rem; color: var(--accent); }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: .85rem; color: rgba(255,255,255,.75); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-light { background: var(--light); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary); margin-bottom: .75rem;
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
.section-text { color: var(--muted); font-size: 1.05rem; }

/* ---------- About ---------- */
.about-image { position: relative; }
.about-image img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.about-image-badge {
    position: absolute; bottom: -20px; right: 24px; background: var(--accent); color: var(--navy);
    padding: 1rem 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center;
}
.about-image-badge strong { display: block; font-size: 2rem; line-height: 1; }
.about-image-badge span { font-size: .8rem; font-weight: 600; }
.advantage { display: flex; flex-direction: column; gap: .35rem; }
.advantage-icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: .5rem;
    background: var(--primary-light); color: var(--primary); font-size: 1.5rem;
}
.advantage h5 { font-size: 1.05rem; margin: 0; }
.advantage p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.step {
    position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.5rem 1.5rem;
    transition: transform .25s, box-shadow .25s;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step-num {
    position: absolute; top: -16px; left: 1.5rem; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--navy); font-weight: 800; font-size: .95rem; box-shadow: 0 4px 12px rgba(245,179,1,.4);
}
.step-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); font-size: 1.6rem; margin-bottom: 1rem; }
.step h5 { font-size: 1.1rem; margin-bottom: .5rem; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 1199px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .steps { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- FAQ ---------- */
.faq-accordion .accordion-item { border: 1px solid var(--border); border-radius: 14px !important; margin-bottom: .75rem; overflow: hidden; background: #fff; }
.faq-accordion .accordion-button { font-weight: 700; color: var(--navy); padding: 1.1rem 1.4rem; background: #fff; box-shadow: none; }
.faq-accordion .accordion-button:not(.collapsed) { color: var(--primary); background: var(--primary-light); }
.faq-accordion .accordion-button:focus { box-shadow: none; }
.faq-accordion .accordion-body { color: var(--muted); padding: 1rem 1.4rem 1.3rem; }

/* ---------- CTA strip ---------- */
.cta-strip { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 2.5rem 0; }
.cta-strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-strip h3 { color: #fff; font-size: 1.6rem; margin-bottom: .35rem; }
.cta-strip p { margin: 0; color: rgba(255,255,255,.85); max-width: 640px; }
.cta-strip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.cta-phone { color: #fff; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.cta-phone:hover { color: var(--accent); }

/* ---------- Courses ---------- */
.course-card {
    position: relative; height: 100%; display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem;
    transition: transform .25s, box-shadow .25s;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.course-card.popular { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,179,1,.2); }
.course-popular {
    position: absolute; top: -13px; right: 20px; padding: .3rem .85rem; border-radius: 999px;
    background: var(--accent); color: var(--navy); font-size: .75rem; font-weight: 800;
}
.course-category {
    display: inline-grid; place-items: center; min-width: 56px; height: 56px; padding: 0 .75rem; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #1976d2); color: #fff; font-size: 1.4rem; font-weight: 800; margin-bottom: 1rem;
}
.course-title { font-size: 1.25rem; margin-bottom: .5rem; }
.course-desc { color: var(--muted); font-size: .92rem; }
.course-duration { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.course-features { list-style: none; padding: 0; margin: 0 0 1.25rem; flex: 1; }
.course-features li { display: flex; gap: .5rem; font-size: .92rem; padding: .3rem 0; }
.course-features i { color: #22a06b; flex-shrink: 0; margin-top: .15rem; }
.course-price { margin-top: auto; margin-bottom: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.course-price s { color: var(--muted); font-size: .95rem; margin-right: .5rem; }
.course-price strong { font-size: 1.6rem; color: var(--navy); }
.course-price small { color: var(--muted); font-weight: 600; }

/* ---------- Apply ---------- */
.apply-section { background: linear-gradient(135deg, var(--navy), var(--primary-dark)); }
.section-head-light .section-eyebrow { color: var(--accent); }
.section-head-light .section-title { color: #fff; }
.section-head-light p { color: rgba(255,255,255,.8); font-size: 1.05rem; }
.apply-box { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.apply-info { background: var(--primary); color: #fff; padding: 3rem 2.5rem; }
.apply-info h3 { color: #fff; font-size: 1.5rem; margin-bottom: 1.5rem; }
.apply-contacts li { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.1rem; font-weight: 600; }
.apply-contacts li > i { font-size: 1.2rem; color: var(--accent); margin-top: .15rem; }
.apply-contacts small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); font-weight: 700; }
.apply-contacts a, .apply-contacts span { color: #fff; }
.apply-socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.apply-socials a { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: .85rem; font-weight: 600; }
.apply-socials a:hover { background: var(--accent); color: var(--navy); }
.apply-note { margin: 1rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }
.apply-form { padding: 3rem 2.5rem; }
.apply-form .form-group, .apply-form .mb-3 { margin-bottom: 0 !important; }
.apply-form .row.g-3 { margin-bottom: .25rem; }
.apply-form .form-select { padding-right: 2.5rem; }
.apply-form .form-label, .apply-form label { font-weight: 700; font-size: .9rem; margin-bottom: .35rem; display: block; }
.apply-form button[type=submit] { margin-top: 1rem; }
.apply-form .form-control, .apply-form .form-select {
    border-radius: 12px; padding: .75rem 1rem; border-color: var(--border); background: var(--light);
}
.apply-form .form-control:focus, .apply-form .form-select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(11,79,168,.12); background: #fff;
}
.invalid-feedback { display: block; color: #dc3545; font-size: .85rem; margin-top: .35rem; font-weight: 500; }
/* Majburiy maydon to'ldirilmagan holat */
.apply-form .form-control.is-invalid, .apply-form .form-select.is-invalid {
    border-color: #dc3545; background-color: #fff5f5; background-image: none;
}
.apply-form .form-control.is-invalid:focus, .apply-form .form-select.is-invalid:focus {
    border-color: #dc3545; box-shadow: 0 0 0 4px rgba(220,53,69,.15);
}
.apply-form .form-control.is-valid, .apply-form .form-select.is-valid { background-image: none; border-color: var(--border); }
@media (max-width: 991px) { .apply-info, .apply-form { padding: 2rem 1.5rem; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 60px 0 0; }
.site-footer h6 { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.7); }
.footer-links a:hover { color: var(--accent); }
.social-links { display: flex; gap: .6rem; margin-top: 1rem; }
.social-links a {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(255,255,255,.08); color: #fff; font-size: 1.1rem; transition: background .2s;
}
.social-links a:hover { background: var(--accent); color: var(--navy); }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
    margin-top: 3rem; padding: 1.25rem 0; border-top: 1px solid rgba(255,255,255,.1);
    font-size: .85rem; color: rgba(255,255,255,.55);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--accent); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(245,179,1,.6); }
    70% { box-shadow: 0 0 0 16px rgba(245,179,1,0); }
    100% { box-shadow: 0 0 0 0 rgba(245,179,1,0); }
}

.floating-bar.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
.floating-bar { transition: transform .3s, opacity .3s; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1020; display: flex; gap: .6rem; }
.floating-call { width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--primary); font-size: 1.3rem; box-shadow: 0 10px 25px rgba(0,0,0,.2); }
.floating-apply { flex: 1; display: flex; align-items: center; justify-content: center; height: 54px; border-radius: 999px; background: var(--accent); color: var(--navy); font-weight: 800; box-shadow: 0 10px 25px rgba(0,0,0,.25); animation: pulse 2s infinite; }
.floating-apply:hover { color: var(--navy); background: var(--accent-dark); }
@media (max-width: 991px) { body { padding-bottom: 80px; } }

/* ---------- Error page ---------- */
.error-page { padding-top: 160px; min-height: 70vh; }
.error-code { font-size: 6rem; font-weight: 800; color: var(--primary-light); line-height: 1; }

/* ---------- Mobil moslashuv ---------- */
@media (max-width: 991px) {
    .site-header .navbar { padding: .4rem 0; }
    .navbar-brand { margin-right: 0; }
    .navbar-brand img.brand-logo { height: 52px; }
    .navbar-toggler { padding: .25rem .4rem; }
    .offcanvas-body .navbar-nav .nav-link { font-size: 1.1rem; padding: .6rem 0 !important; border-bottom: 1px solid var(--border); }
    .header-phone { font-size: 1.05rem; }
}
@media (max-width: 767px) {
    .section { padding: 56px 0; }
    .hero { padding: 100px 0 40px; min-height: 0; }
    .hero-stats { margin-top: 0; background: var(--navy); padding: 14px 0 18px; }
    .stats-bar { border-color: rgba(255,255,255,.1); }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 1.5rem; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .btn-pulse { animation: none; }
    .hero-perks { flex-direction: row; gap: .35rem .9rem; font-size: .82rem; margin-top: 1rem; }
    .hero-actions { flex-direction: row; flex-wrap: nowrap; gap: .6rem; }
    .hero-actions .btn { width: auto; flex: 1; padding: .8rem .6rem; font-size: .95rem; white-space: nowrap; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .stat-item { padding: .9rem; gap: .7rem; }
    .stat-item i { font-size: 1.5rem; }
    .stat-value { font-size: 1.35rem; }
    .stat-label { font-size: .78rem; }
    .section-title { font-size: 1.65rem; }
    .section-head { margin-bottom: 2rem; }
    .about-image-badge { bottom: -14px; right: 14px; padding: .7rem 1.1rem; }
    .about-image-badge strong { font-size: 1.5rem; }
    .advantage-icon { width: 46px; height: 46px; font-size: 1.3rem; }
    .cta-strip { padding: 2rem 0; }
    .cta-strip h3 { font-size: 1.3rem; }
    .cta-strip-actions { width: 100%; flex-direction: column; align-items: stretch; gap: .75rem; }
    .cta-strip-actions .btn { width: 100%; }
    .cta-phone { text-align: center; }
    .course-card { padding: 1.4rem; }
    .apply-box { border-radius: 18px; }
    .apply-info, .apply-form { padding: 1.6rem 1.25rem; }
    .apply-info h3 { font-size: 1.3rem; margin-bottom: 1.1rem; }
    .apply-contacts li { margin-bottom: .85rem; }
    .site-footer { padding-top: 44px; }
    .site-footer .col-6 { width: 100%; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
/* Telefonlar: vertikal hero rasmi, matn tepada, mashina pastda */
@media (max-width: 575px) {
    .hero {
        /* Bir ekran balandligi; suzuvchi panel (≈80px) uchun pastdan joy qoldiriladi */
        min-height: max(100vh, calc(100vw * 1.78)); min-height: max(100svh, calc(100vw * 1.78));
        padding: 88px 0 90px; justify-content: flex-start;
        background-size: auto calc(100% - 72px); background-position: center bottom 72px; background-color: var(--navy);
        background-image: var(--hero-bg-m, var(--hero-bg)); background-position: center bottom;
    }
    .hero-overlay { background: linear-gradient(180deg, rgba(8,30,70,.9) 0%, rgba(8,30,70,.65) 35%, rgba(8,30,70,.15) 55%, rgba(8,30,70,0) 75%, rgba(8,30,70,0) 90%, rgba(10,31,61,1) 100%); }
    .hero-content { flex: 0 0 auto; align-items: flex-start; }
    .hero-badge { font-size: .78rem; padding: .3rem .8rem; margin-bottom: .9rem; }
    .hero-title { font-size: 1.85rem; margin-bottom: .8rem; }
    .hero-subtitle { font-size: .95rem; margin-bottom: 1.2rem; }
    .hero-perks { display: none; }
    .hero-actions .btn-outline-light { display: none; }
    .hero-actions .btn { flex: 0 0 auto; width: 100%; white-space: normal; }
}
/* Kichik va past ekranlar (masalan 360x640): matn ixcham, hero rasmga qarab o'sadi */
@media (max-width: 575px) and (max-height: 700px) {
    .hero { min-height: max(100vh, calc(100vw * 1.78 + 72px)); min-height: max(100svh, calc(100vw * 1.78 + 72px)); padding-top: 80px; }
    .hero-badge { display: none; }
    .hero-title { font-size: 1.6rem; margin-bottom: .6rem; }
    .hero-subtitle { font-size: .88rem; margin-bottom: 1rem; }
    .hero-actions .btn { padding: .7rem .5rem; font-size: .9rem; }
}
@media (max-width: 400px) {
    .navbar-brand img.brand-logo { height: 46px; }
    .btn-sm-pill { padding: .4rem .8rem; font-size: .82rem; }
    .stat-value { font-size: 1.2rem; }
    .course-price strong { font-size: 1.4rem; }
}
