/* ==========================================================================
   German Experts — premium UI polish layer
   Loaded LAST on every page. Refinements only: spacing, type, the icon-based
   service cards, modal CTAs, hero treatment. No layout rewrites, same palette.
   ========================================================================== */

:root {
    --ge-yellow: #FFD700;
    --ge-yellow-soft: rgba(255, 215, 0, 0.14);
    --ge-black: #0b0b0d;
    --ge-panel: #141418;
    --ge-hairline: rgba(255, 255, 255, 0.08);
}

/* ---- Universal language toggle for components added in this layer ---------- */
html[lang="ar"] .lang-en { display: none !important; }
html[lang="en"] .lang-ar,
html:not([lang="ar"]) .lang-ar { display: none !important; }

/* ---- Dormant cart: Products are "Coming Soon", so hide the cart entry ------ */
.cart-link { display: none !important; }

/* ==========================================================================
   1. HERO  (index.php .banner)
   ========================================================================== */
.banner {
    background: linear-gradient(rgba(11, 11, 13, 0.42), rgba(11, 11, 13, 0.68)),
                url('../images/hero-home.png?v=3') center center / cover no-repeat !important;
}

.banner-content {
    gap: 4px;
}

/* Blog hero: clean workshop photo behind the site's own heading */
.blog-hero {
    background: #000 url('../images/blog-hero.png?v=3') center 40% / cover no-repeat !important;
}

.blog-hero .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.8) 100%) !important;
}

/* Contact hero: dark workshop photo, heavy overlay for text readability.
   Yellow bottom border stays (contact-us.css). */
.contact-hero {
    background: #0d0d0f url('../images/about-us.png?v=3') center 62% / cover no-repeat !important;
}

.contact-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 11, 13, 0.62) 0%, rgba(11, 11, 13, 0.8) 100%);
    z-index: 1;
}

@media screen and (max-width: 600px) {
    .contact-hero { background-position: 58% center !important; }
}

.hero-brand-title {
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.hero-tagline {
    max-width: 34ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.hero-specs {
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.6px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 26px;
}

html[dir="rtl"] .hero-actions { flex-direction: row-reverse; }

.hero-btn-book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 30px;
    background: var(--ge-yellow);
    color: #111 !important;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-btn-book:hover {
    background: #ffdf33;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 215, 0, 0.28);
}

/* Make the existing "Explore Services" button the secondary (outline) action */
.hero-actions .explore-btn {
    background: transparent !important;
    border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-actions .explore-btn:hover {
    border-color: var(--ge-yellow) !important;
    background: rgba(255, 215, 0, 0.08) !important;
    color: var(--ge-yellow) !important;
}

/* ==========================================================================
   2. SERVICE CARDS  (services.php .header-images / .header-image)
   Photo-based: existing image on top, then title + short description + link.
   Full detail lives in the modal that opens on click. Images kept intact
   (their baked-in text is part of the artwork) — not cropped, not overlaid.
   ========================================================================== */
/* Intro line: keep it short and quiet so the cards carry the section */
.services-intro {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 640px !important;
    margin: 26px auto 4px !important;
    padding: 0 20px !important;
}

.services-intro p {
    font-size: 15px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
    color: #666 !important;
}

html.dark-theme .services-intro p { color: #9a9aa4 !important; }

.header-images {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 20px !important;
    padding: 26px 15px 8px !important;
    max-width: 960px !important;
    flex: 1 1 auto;
    align-content: flex-start;
}

.header-image {
    height: auto !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #17171c 0%, #101014 100%) !important;
    border: 1px solid var(--ge-hairline) !important;
    border-radius: 16px !important;
}

.header-image:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.35) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important;
}

.header-image:focus-visible {
    outline: 2px solid var(--ge-yellow);
    outline-offset: 3px;
}

/* Media: clean automotive photos (no embedded text) in a 16:9 frame,
   consistent across all six cards. */
.service-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0d0d10;
}

.header-image .workshop-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
                filter 0.5s ease !important;
    filter: none !important;
}

.header-image:hover .workshop-image {
    transform: scale(1.04) !important;
    filter: brightness(1.03) !important;
}

/* Text block below the image */
.card-content {
    gap: 5px !important;
    padding: 14px 16px 16px !important;
    transform: none !important;
}

.header-image:hover .card-content { transform: none !important; }

.card-title-en,
.card-title-ar {
    font-size: 15px !important;
    line-height: 1.3 !important;
    letter-spacing: 0.4px;
    text-shadow: none !important;
    color: #fff !important;
    margin: 0 !important;
}

html[dir="rtl"] .card-title-ar { font-size: 16px !important; }

.card-desc-en,
.card-desc-ar {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    color: #a3a3ad !important;
    text-shadow: none !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

.card-more {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--ge-yellow);
}

.header-image:hover .card-more { color: #ffdf33; }

/* Closing prompt under the service grid */
.services-footnote {
    text-align: center;
    max-width: 560px;
    margin: 18px auto 40px;
    padding: 0 20px;
}

.services-footnote p {
    font-size: 15px;
    color: #555;
    margin: 0 0 14px;
}

.services-footnote-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 24px;
    background: #111;
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 9px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.services-footnote-btn:hover { background: #000; transform: translateY(-2px); }
.services-footnote-btn svg { width: 16px; height: 16px; }

html.dark-theme .services-footnote p { color: #b7b7bf; }

/* ==========================================================================
   3. SERVICE DETAIL MODAL
   ========================================================================== */
/* Consistent footprint for every service: same width always, one fixed
   height, body scrolls if a service runs long, content vertically centred
   when it is short so there is no dead space at the bottom. */
.service-modal-content {
    width: min(560px, 92vw) !important;
    height: min(560px, 86vh) !important;
    min-width: 0 !important;
    max-width: 92vw !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
}

.service-modal-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding: 24px 30px 26px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: safe center !important;
    -webkit-overflow-scrolling: touch;
}

.service-modal-body h2 {
    font-size: 22px !important;
    margin: 0 0 14px !important;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ge-yellow);
    display: inline-block;
}

.service-modal-body > div > p:first-of-type { margin-top: 0 !important; }

.service-modal-body p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 10px 0 !important;
    color: #333;
}

.service-modal-body ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 14px 0 !important;
}

.service-modal-body ul li {
    position: relative;
    padding: 6px 0 6px 30px !important;
    margin: 0 !important;
    font-size: 14.5px;
    line-height: 1.5;
    color: #2b2b2b;
}

.service-modal-body ul li::before {
    content: "" !important;
    position: absolute;
    left: 0;
    top: 9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ge-yellow);
    /* checkmark drawn with a background image so it needs no extra markup */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

html[dir="rtl"] .service-modal-body ul li {
    padding: 6px 30px 6px 0 !important;
}

html[dir="rtl"] .service-modal-body ul li::before {
    left: auto;
    right: 0;
}

/* Clean close button */
.service-modal-close {
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    border-radius: 50% !important;
    background: #f1f1f1 !important;
    color: #333 !important;
    font-size: 20px !important;
    border: none !important;
    top: 16px !important;
    right: 16px !important;
    transition: background 0.2s ease, transform 0.2s ease;
}

html[dir="rtl"] .service-modal-close { right: auto !important; left: 16px !important; }

.service-modal-close:hover {
    background: var(--ge-yellow) !important;
    transform: rotate(90deg);
}

/* CTA row */
.service-modal-cta {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #ececec;
}

.service-modal-cta a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 9px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.service-modal-cta .cta-book {
    background: #111;
    color: #fff;
}

.service-modal-cta .cta-book:hover {
    background: #000;
    transform: translateY(-2px);
}

.service-modal-cta .cta-wa {
    background: var(--ge-yellow);
    color: #111;
}

.service-modal-cta .cta-wa:hover {
    background: #ffdf33;
    transform: translatey(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.service-modal-cta svg { width: 16px; height: 16px; flex: none; }

/* ==========================================================================
   4. TYPOGRAPHY & SPACING (light global rhythm)
   ========================================================================== */
.content { padding-top: 26px; padding-bottom: 26px; }

.section-title {
    letter-spacing: 0.4px;
}

/* ==========================================================================
   5. ABOUT — feature card consistency
   ========================================================================== */
.features-grid { gap: 20px !important; }

.feature-card {
    border: 1px solid var(--ge-hairline);
    border-radius: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.3);
}

/* ==========================================================================
   6. PRODUCTS — top hero + "Coming Soon" made intentional
   ========================================================================== */

/* Top hero, consistent with About / Blog / Contact heroes */
.products-hero {
    position: relative;
    width: 100%;
    height: 300px;
    background: #0d0d0f url('../images/products-parts.png?v=1') center 52% / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-bottom: 3px solid var(--ge-yellow);
}

.products-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 11, 13, 0.5) 0%, rgba(11, 11, 13, 0.78) 100%);
    z-index: 1;
}

.products-hero-content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

.products-hero-title {
    font-family: 'Oswald', Arial, sans-serif;
    font-size: 3.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.85);
}

html[dir="rtl"] .products-hero-title { font-family: 'Cairo', 'Tajawal', sans-serif; }

.products-hero-sub {
    font-size: 1.2rem;
    color: var(--ge-yellow);
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1.5;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

@media screen and (max-width: 768px) {
    .products-hero { height: 230px; }
    .products-hero-title { font-size: 2.2rem; }
    .products-hero-sub { font-size: 1rem; }
}

@media screen and (max-width: 480px) {
    .products-hero { height: 180px; background-position: 62% center; }
    .products-hero-title { font-size: 1.5rem; letter-spacing: 0.5px; margin-bottom: 8px; }
    .products-hero-sub { font-size: 0.9rem; }
}

.parts-hero {
    max-width: 620px;
    margin: 44px auto 0;
    text-align: center;
}

.parts-status {
    display: inline-block;
    padding: 7px 20px;
    background: var(--ge-yellow-soft);
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #a8850a;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

html.dark-theme .parts-status { color: var(--ge-yellow); }

.parts-cta-line { font-size: 15px; margin: 0 0 14px; opacity: 0.85; }

.parts-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: var(--ge-yellow);
    color: #111 !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 9px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.parts-wa-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 215, 0, 0.28); }
.parts-wa-btn svg { width: 18px; height: 18px; }

/* Four product categories */
.parts-categories {
    max-width: 1000px;
    margin: 44px auto 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.parts-cat {
    text-align: center;
    padding: 26px 18px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    background: #fafafa;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.parts-cat:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.55);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

html.dark-theme .parts-cat {
    border-color: var(--ge-hairline);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

html.dark-theme .parts-cat:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }

.parts-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--ge-yellow-soft);
    color: var(--ge-yellow);
    margin-bottom: 14px;
}

.parts-cat-icon svg { width: 24px; height: 24px; }

.parts-cat h3 {
    margin: 0 0 6px !important;
    font-size: 15px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.parts-cat p {
    margin: 0 !important;
    max-width: none !important;
    font-size: 13px;
    line-height: 1.55;
    opacity: 0.75;
}

@media screen and (max-width: 900px) {
    .parts-categories { grid-template-columns: 1fr 1fr; gap: 14px; }
}

@media screen and (max-width: 560px) {
    .parts-categories { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
    .parts-cat { padding: 20px 16px; }
    .parts-cat-icon { width: 42px; height: 42px; margin-bottom: 10px; }
}

/* ==========================================================================
   7. CONTACT — WhatsApp / Call as primary CTAs
   ========================================================================== */
.contact-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 6px 0 30px;
}

.contact-cta a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 9px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-cta .cc-wa { background: var(--ge-yellow); color: #111; }
.contact-cta .cc-wa:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 215, 0, 0.28); }
.contact-cta .cc-call { background: transparent; border: 1.5px solid currentColor; }
.contact-cta .cc-call:hover { color: var(--ge-yellow); }
.contact-cta svg { width: 17px; height: 17px; }

/* ==========================================================================
   8. FOOTER — tighter alignment
   ========================================================================== */
.footer-business { max-width: 460px; margin-left: auto; margin-right: auto; }
.footer-business-line { margin: 3px 0; }

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 768px) {
    .header-images { grid-template-columns: 1fr 1fr; gap: 16px; }
    .card-content { padding: 16px 18px 20px !important; }
    .hero-actions { margin-top: 22px; }
}

@media screen and (max-width: 560px) {
    .header-images { grid-template-columns: 1fr; }

    .service-modal-content { padding: 26px 20px 22px !important; }
    .service-modal-cta { flex-direction: column; }
    .contact-cta a, .hero-btn-book, .hero-actions .explore-btn { width: 100%; text-align: center; justify-content: center; }
}
