/* ==========================================================================
   Dubai Car Recovery — style.css
   Mobile-first, responsive, premium design
   --------------------------------------------------------------------------
   Table of contents:
   1.  Design tokens (CSS variables)
   2.  Reset & base
   3.  Utilities & layout helpers
   4.  Buttons
   5.  Header / Navigation
   6.  Hero
   7.  Section heads / About
   8.  Services
   9.  Why Choose Us
   10. CTA Banner
   11. Blog
   12. FAQ Accordion
   13. Contact + Form + Map
   14. Footer
   15. Floating buttons / Back to top / Loader
   16. Animations (Intersection Observer targets)
   17. Responsive breakpoints
   18. Accessibility / reduced motion
   ========================================================================== */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
    --yellow: #FFC107;
    --yellow-dark: #e0a800;
    --black: #111111;
    --white: #FFFFFF;
    --light: #F5F5F5;
    --accent: #E53935;
    --whatsapp: #25D366;

    --text: #1d1d1d;
    --muted: #5b5b5b;
    --border: #e6e6e6;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 50px;

    --shadow-sm: 0 4px 14px rgba(0, 0, 0, .06);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .10);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, .16);

    --container: 1200px;
    --header-h: 74px;

    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: .3s cubic-bezier(.4, 0, .2, 1);
}

/* 2. RESET & BASE -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; font-size: 1rem; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; color: var(--black); }

/* 3. UTILITIES & LAYOUT -------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.section { padding: 72px 0; }
.section--light { background: var(--light); }

.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section__head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section__title { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.section__lead { color: var(--muted); margin-top: 14px; }

/* Skip link (a11y) */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--black);
    color: var(--yellow);
    padding: 12px 18px;
    z-index: 2000;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* 4. BUTTONS ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 600;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    white-space: nowrap;
    line-height: 1;
    text-align: center;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn--primary { background: var(--yellow); color: var(--black); box-shadow: 0 8px 20px rgba(255, 193, 7, .35); }
.btn--primary:hover { background: var(--yellow-dark); }

.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: #000; box-shadow: var(--shadow-md); }

.btn--whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, .35); }
.btn--whatsapp:hover { background: #1fb457; }

.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* 5. HEADER / NAVIGATION ------------------------------------------------- */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    z-index: 1000;
    transition: box-shadow var(--transition), background var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-sm); }

.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--black); }
.logo__icon {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: var(--yellow); color: var(--black);
    border-radius: 10px; font-size: 1.1rem;
}
.logo__text span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__link {
    font-weight: 500; color: var(--black); position: relative; padding: 6px 0;
    transition: color var(--transition);
}
.nav__link::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 0; height: 2px; background: var(--yellow);
    transition: width var(--transition);
}
.nav__link:hover, .nav__link.active { color: var(--accent); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }
.nav__cta { padding: 10px 20px; }

/* Hamburger */
.hamburger { display: none; width: 42px; height: 42px; flex-direction: column; justify-content: center; gap: 6px; padding: 0 8px; }
.hamburger span { display: block; height: 3px; width: 100%; background: var(--black); border-radius: 3px; transition: var(--transition); }
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* 6. HERO ---------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 40px) 0 60px;
    background: url("https://images.unsplash.com/photo-1567789884554-0b844b597180?auto=format&fit=crop&w=1600&q=70") center/cover no-repeat;
    background-color: var(--black);
    color: var(--white);
}
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(120deg, rgba(17, 17, 17, .90) 0%, rgba(17, 17, 17, .70) 55%, rgba(17, 17, 17, .55) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 780px; }

.hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 193, 7, .15);
    border: 1px solid rgba(255, 193, 7, .5);
    color: var(--yellow);
    padding: 8px 16px; border-radius: var(--radius-pill);
    font-weight: 600; font-size: .85rem; margin-bottom: 22px;
}
.hero__title { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800; color: #fff; margin-bottom: 18px; }
.hero__subtitle { font-size: clamp(1rem, 2.2vw, 1.15rem); color: rgba(255, 255, 255, .88); max-width: 620px; margin-bottom: 30px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 50px; }

.hero__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 720px;
}
.stat {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    padding: 20px 14px; text-align: center;
    backdrop-filter: blur(4px);
}
.stat__num { font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 800; color: var(--yellow); }
.stat__suffix { font-size: 1.1rem; font-weight: 700; color: var(--yellow); }
.stat__label { font-size: .82rem; color: rgba(255, 255, 255, .8); margin-top: 4px; }

/* 7. ABOUT --------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 50px; align-items: center; }
.about__media { position: relative; }
.about__img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
.about__badge {
    position: absolute; bottom: -18px; left: 18px;
    background: var(--black); color: #fff;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); font-weight: 600; font-size: .9rem;
}
.about__badge i { color: var(--yellow); font-size: 1.3rem; }

.about__text p { color: var(--muted); margin-bottom: 18px; }
.about__list { margin: 22px 0 28px; display: grid; gap: 12px; }
.about__list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.about__list i { color: var(--yellow); font-size: 1.1rem; }

/* 8. SERVICES ------------------------------------------------------------ */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

.service-card {
    padding: 34px 28px; text-align: center;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative; overflow: hidden;
}
.service-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform var(--transition);
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }

.service-card__icon {
    width: 74px; height: 74px; margin: 0 auto 20px;
    display: grid; place-items: center;
    background: var(--light); color: var(--black);
    border-radius: 50%; font-size: 1.8rem;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.service-card:hover .service-card__icon { background: var(--yellow); transform: rotate(-6deg) scale(1.05); }
.service-card__title { font-size: 1.2rem; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }

.link-more { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 600; font-size: .92rem; transition: gap var(--transition); }
.link-more:hover { gap: 12px; }

/* 9. WHY CHOOSE US ------------------------------------------------------- */
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why__box {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 22px; text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}
.why__box:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.why__box i {
    font-size: 2rem; color: var(--black);
    background: var(--yellow); width: 66px; height: 66px;
    display: grid; place-items: center; border-radius: 16px; margin: 0 auto 16px;
}
.why__box h3 { font-size: 1.05rem; margin-bottom: 6px; }
.why__box p { color: var(--muted); font-size: .88rem; }

/* 10. CTA BANNER --------------------------------------------------------- */
.cta-banner { background: var(--yellow); color: var(--black); padding: 48px 0; }
.cta-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-banner h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.cta-banner p { font-weight: 500; margin-top: 6px; }
.cta-banner__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* 11. BLOG --------------------------------------------------------------- */
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card { overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.blog-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.blog-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.blog-card:hover .blog-card__media img { transform: scale(1.08); }
.blog-card__cat {
    position: absolute; top: 14px; left: 14px;
    background: var(--accent); color: #fff;
    padding: 5px 12px; border-radius: var(--radius-pill);
    font-size: .74rem; font-weight: 600; letter-spacing: .03em;
}
.blog-card__body { padding: 22px 22px 26px; }
.blog-card__meta { color: var(--muted); font-size: .82rem; margin-bottom: 10px; }
.blog-card__body h3 { font-size: 1.12rem; margin-bottom: 10px; }
.blog-card__body > p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }

/* 12. FAQ ACCORDION ------------------------------------------------------ */
.accordion { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.accordion__item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.accordion__trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 20px 22px; text-align: left; font-weight: 600; font-size: 1.02rem; color: var(--black);
    transition: background var(--transition);
}
.accordion__trigger:hover { background: var(--light); }
.accordion__trigger i { color: var(--accent); transition: transform var(--transition); flex-shrink: 0; }
.accordion__item.open .accordion__trigger i { transform: rotate(45deg); }
.accordion__panel { max-height: 0; overflow: hidden; transition: max-height var(--transition); }
.accordion__panel p { padding: 0 22px 20px; color: var(--muted); }

/* 13. CONTACT ------------------------------------------------------------ */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.contact__list { display: grid; gap: 22px; margin-bottom: 28px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__ic {
    width: 48px; height: 48px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--yellow); color: var(--black);
    border-radius: 12px; font-size: 1.15rem;
}
.contact__list strong { display: block; font-size: 1rem; color: var(--black); }
.contact__list p { color: var(--muted); font-size: .95rem; }
.contact__list a:hover { color: var(--accent); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Form */
.contact__form { padding: 30px; }
.form__row { margin-bottom: 18px; }
.form__row label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; }
.form__row input, .form__row textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--white); transition: border-color var(--transition), box-shadow var(--transition);
    resize: vertical;
}
.form__row input:focus, .form__row textarea:focus {
    outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 193, 7, .2);
}
.form__row input.invalid, .form__row textarea.invalid { border-color: var(--accent); }
.form__error { display: block; color: var(--accent); font-size: .8rem; margin-top: 5px; min-height: 1em; }
.form__success {
    display: flex; align-items: center; gap: 8px;
    background: rgba(37, 211, 102, .12); color: #1a8f47;
    padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 14px; font-weight: 600; font-size: .92rem;
}
.form__errbox {
    display: flex; align-items: center; gap: 8px;
    background: rgba(220, 53, 69, .1); color: #c0392b;
    padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 14px; font-weight: 600; font-size: .92rem;
}
/* The hidden attribute must beat the display:flex above, otherwise both
   the success and error messages show before the form is ever submitted. */
.form__success[hidden], .form__errbox[hidden] { display: none; }

/* Map */
.contact__map { margin-top: 48px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.contact__map iframe { display: block; width: 100%; }

/* 14. FOOTER ------------------------------------------------------------- */
.footer { background: var(--black); color: rgba(255, 255, 255, .75); padding-top: 60px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; gap: 40px; padding-bottom: 40px; }
.logo--footer { color: #fff; margin-bottom: 16px; }
.footer__col > p { font-size: .92rem; margin-bottom: 18px; }
.footer__col h3 { color: #fff; font-size: 1.1rem; margin-bottom: 18px; }
.footer__links a, .footer__contact a { transition: color var(--transition); }
.footer__links li { margin-bottom: 10px; }
.footer__links a:hover, .footer__contact a:hover { color: var(--yellow); }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .92rem; }
.footer__contact i { color: var(--yellow); margin-top: 4px; }
.footer__social { display: flex; gap: 12px; }
.footer__social a {
    width: 42px; height: 42px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .1); border-radius: 50%; color: #fff;
    transition: background var(--transition), transform var(--transition);
}
.footer__social a:hover { background: var(--yellow); color: var(--black); transform: translateY(-3px); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 20px 0; text-align: center; font-size: .88rem; }

/* 15. FLOATING BUTTONS / BACK TO TOP / LOADER ---------------------------- */
.float-btn {
    position: fixed; right: 20px; z-index: 900;
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-size: 1.5rem;
    box-shadow: var(--shadow-md); transition: transform var(--transition);
}
.float-btn:hover { transform: scale(1.1); }
.float-btn--whatsapp { bottom: 90px; background: var(--whatsapp); animation: pulse 2.2s infinite; }
.float-btn--call { bottom: 20px; background: var(--accent); }

.back-to-top {
    position: fixed; right: 20px; bottom: 158px; z-index: 900;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--black); color: var(--yellow); font-size: 1rem;
    display: grid; place-items: center; box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Loader */
.loader {
    position: fixed; inset: 0; z-index: 3000;
    background: var(--white); display: grid; place-items: center;
    transition: opacity .4s ease, visibility .4s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader__spinner {
    width: 54px; height: 54px; border-radius: 50%;
    border: 5px solid var(--light); border-top-color: var(--yellow);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 16. ANIMATIONS (Intersection Observer targets) ------------------------- */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
/* Stagger children within a grid for a nicer reveal */
.services__grid .fade-up.visible,
.why__grid .fade-up.visible,
.blog__grid .fade-up.visible { transition-delay: var(--delay, 0s); }

/* 17. RESPONSIVE BREAKPOINTS --------------------------------------------- */

/* Large tablets / small laptops */
@media (max-width: 1024px) {
    .services__grid, .blog__grid { grid-template-columns: repeat(2, 1fr); }
    .why__grid { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* Tablets and below — mobile nav kicks in */
@media (max-width: 860px) {
    .hamburger { display: flex; }
    .nav {
        position: fixed; inset: var(--header-h) 0 auto 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--white); padding: 10px 20px 24px;
        box-shadow: var(--shadow-md);
        transform: translateY(-140%);
        transition: transform var(--transition);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .nav.open { transform: translateY(0); }
    .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav__list li { border-bottom: 1px solid var(--border); }
    .nav__link { display: block; padding: 15px 4px; }
    .nav__link::after { display: none; }
    .nav__cta { margin-top: 16px; justify-content: center; }

    .about__grid, .contact__grid { grid-template-columns: 1fr; }
    .about__media { max-width: 520px; margin: 0 auto; }
    .about__badge { left: 50%; transform: translateX(-50%); text-align: center; }

    .cta-banner__inner { flex-direction: column; text-align: center; }
    .cta-banner__actions { justify-content: center; }
}

/* Phones */
@media (max-width: 620px) {
    .section { padding: 56px 0; }
    .hero { min-height: auto; padding-top: calc(var(--header-h) + 50px); }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
    .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }

    .services__grid, .blog__grid, .why__grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .contact__actions .btn { flex: 1 1 auto; }
    .contact__form { padding: 22px; }
}

/* Very small phones (320px) */
@media (max-width: 360px) {
    .container { padding-inline: 16px; }
    .logo__text { font-size: 1rem; }
    .hero__stats { grid-template-columns: 1fr 1fr; }
    .float-btn { width: 52px; height: 52px; font-size: 1.35rem; }
}

/* Large desktop */
@media (min-width: 1440px) {
    :root { --container: 1280px; }
    .section { padding: 90px 0; }
}

/* 18. ACCESSIBILITY / REDUCED MOTION ------------------------------------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .fade-up { opacity: 1; transform: none; }
}
