/*
Theme Name: Alfars Global
Theme URI: https://alfars.global/
Author: Alfars Global
Author URI: https://alfars.global/
Description: Custom WordPress theme (no page builder) for Alfars Global. Dynamic country meta for programmatic SEO.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alfars-global
Tags: rtl-language-support, custom-background, custom-logo, custom-menu
*/

/* Base resets and RTL setup */
html[dir="rtl"] body { direction: rtl; }
body { font-family: 'IBM Plex Sans Arabic', 'Expo Arabic', Arial, Helvetica, sans-serif; margin: 0; color: #1f2937; background: #fff; }
a { color: #D88401; text-decoration: none; }
a:hover { color: #b86e01; }
img { max-width: 100%; height: auto; }

/* Typography */
h1, h2, h3, h4, h5, h6 { color: #0f172a; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.015em; }
p { line-height: 1.9; }

/* Layout helpers */
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }

/* Header */
.site-header { background: #FFFFFF; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(0,0,0,0.05); }
.site-header .header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.site-header .header-inner.header-grid { display: grid; }
.header-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; }
/* Logo left (col 1), CTA right (col 2) */
.brand-left { grid-column: 1; justify-self: start; }
.actions-right { grid-column: 2; justify-self: end; }
.site-header .brand .site-title { display: inline-flex; align-items: center; line-height: 0; }
.site-header .brand img,
.site-header img.custom-logo,
.site-header img.brand-logo { height: 64px; max-height: 72px; width: 300px; max-width: 100%; object-fit: contain; image-rendering: -webkit-optimize-contrast; }

/* Explicit sizing for anchor wrapper */
.site-header .site-title > img { height: 64px; max-height: 72px; width: 300px; max-width: 100%; object-fit: contain; }
@media (min-width: 1024px) { .site-header .brand img { height: 64px; max-height: 72px; } }
@media (max-width: 640px) { .site-header .brand img { height: 64px; max-height: 72px; } }
.site-header .cta { display: inline-flex; align-items: center; gap: 8px; background: #E31B23; color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.site-header .cta:hover { background: #c61a21; color: #fff; }
.site-header .cta * { color: #fff !important; }
.site-header .cta .phone-ltr { color: #fff !important; }
@media (max-width: 640px) { .site-header .cta { display: none; } }

@media (max-width: 768px) {
  .site-header .header-inner.header-grid { grid-template-columns: 1fr; row-gap: 8px; }
  .header-grid .actions-right { grid-column: 1; justify-self: start; }
}

/* Center brand/logo on mobile */
@media (max-width: 768px) {
  .header-grid .brand-left { grid-column: 1; justify-self: center; text-align: center; }
  .site-header .brand { display: flex; justify-content: center; }
  .site-header .brand a, .site-header .brand .site-title { display: inline-block; }
  .site-header .brand img { display: block; margin-inline: auto; }
}

body > header > div > div.brand.brand-right > a > img{ height: 64px; max-height: 72px; width: 300px; max-width: 100%; object-fit: contain; }
/* Hero */
.hero { background: linear-gradient(135deg, rgba(227,27,35,0.05), #ffffff 60%); padding: 96px 0 64px; position: relative; overflow: hidden; }
.hero.has-bg::before { content: ""; position: absolute; inset: 0; background-image: var(--hero-bg); background-size: cover; background-position: center; opacity: 0.22; z-index: 0; }
.hero::after { content: ""; position: absolute; inset-inline-end: -15%; top: -20%; width: 55%; height: 140%; background: radial-gradient(ellipse at center, rgba(216,132,1,0.08), transparent 60%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; }
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; } }
/* Higher-contrast badge */
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #E31B23; color: #ffffff; font-size: 14px; margin-bottom: 10px; }
/* Hero on light background tweaks (clone-like) */
.hero .badge { background: rgba(216,132,1,0.1); color: #D88401; }
.hero .hero-title { color: #111827; }
.hero .hero-sub { color: #6b7280; }
.hero .phone-chip { background: #E31B23; color: #ffffff; }
.hero .phone-chip i { color: inherit; }
.hero .btn-outline { border-color: #D88401; color: #111827; }
.hero .btn-outline:hover { background: rgba(216,132,1,0.1); }
.hero-title { color: #0f172a; font-weight: 800; font-size: 44px; line-height: 1.15; }
@media (max-width: 767px) { .hero-title { font-size: 34px; } }
.hero-title span { display: block; }
.hero-sub { font-size: 18px; color: #475569; margin: 4px 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.phone-chip { display: inline-flex; align-items: center; gap: 10px; background: #E31B23; color: #fff; padding: 14px 18px; border-radius: 12px; font-weight: 800; letter-spacing: 0.02em; }
.phone-chip i { opacity: 0.95; color: #fff; }
.phone-chip .label { color: #ffffff; opacity: 0.95; }
.phone-chip .phone-ltr { color: #ffffff; }
.phone-chip * { color: #fff !important; }
.hero-media { display: flex; justify-content: center; }
.hero-media-wrap { position: relative; width: 100%; max-width: 720px; }
.hero-orb { position: absolute; border-radius: 9999px; filter: blur(32px); opacity: 0.4; }
.hero-orb.red { width: 60%; height: 60%; left: 20%; top: 10%; background: rgba(16,185,129,0.22); }
.hero-orb.orange { width: 50%; height: 50%; right: 0; bottom: -5%; background: rgba(59,130,246,0.20); }
.hero-media img { width: 100%; height: auto; border-radius: 18px; position: relative; z-index: 1; }

/* WOW hero variant */
.hero--wow {
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(227,27,35,0.12), transparent 45%),
    radial-gradient(700px 400px at 90% 80%, rgba(59,130,246,0.12), transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #1f2937 40%, #E31B23 100%);
}
.hero--wow::before {
  content: "";
  position: absolute; inset-inline-end: -18%; top: -25%; width: 70%; height: 140%;
  background: radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.08), transparent 60%);
  transform: rotate(-12deg);
}
.hero--wow .badge { background: rgba(255,255,255,0.14); color: #fff; }
.hero--wow .hero-title { color: #fff; }
.hero--wow .hero-title .highlight { color: #ffdade; }
.hero--wow .hero-sub { color: rgba(255,255,255,0.85); }
.hero--wow .phone-chip { box-shadow: 0 14px 30px rgba(227,27,35,0.45); }
.hero--wow .hero-media img { filter: drop-shadow(0 30px 40px rgba(0,0,0,0.45)); }
.hero--wow .hero-orb.red { background: rgba(255,210,214,0.22); }
.hero--wow .hero-orb.orange { background: rgba(153,197,255,0.22); }

@media (min-width: 1024px) {
  .hero--wow .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

/* Scroll hint */
.scroll-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2; color: #fff; opacity: 0.95; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.scroll-hint .dot { width: 10px; height: 10px; border-radius: 50%; background: #ffffff; animation: dotBeat 1.4s infinite; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
.scroll-hint .label { font-size: 12px; color: #ffffff; opacity: 0.9; letter-spacing: 0.02em; }
@keyframes dotBeat { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.6);} 50% { transform: scale(1.3); box-shadow: 0 0 0 8px rgba(255,255,255,0); } }

/* Buttons polish */
.btn-glow { box-shadow: 0 12px 25px rgba(227,27,35,0.25); }
.btn-glow:hover { box-shadow: 0 16px 30px rgba(227,27,35,0.35); }
.btn-outline.orange { border-color: #D88401; color: #111827; }
.btn-outline.orange:hover { background: rgba(216,132,1,0.1); }

/* Micro animations (clone-like) */
@keyframes floatMedium { 0% { transform: translateY(0); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
.animate-float-medium { animation: floatMedium 5s ease-in-out infinite; }
@keyframes bounceSmall { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.bounce-small { animation: bounceSmall 1.4s infinite; }
.hero .container-wide { position: relative; z-index: 1; }
.hero-title .highlight { color: #E31B23; }
.btn-red { display: inline-flex; gap: 8px; align-items: center; background: #E31B23; color: #fff; padding: 14px 18px; border-radius: 12px; font-weight: 700; }
.btn-red:hover { background: #d01a21; color: #fff; }
.btn-red--inverted { background: #fff; color: #E31B23; border: 2px solid #fff; }
.btn-red--inverted:hover { background: #fff; color: #c61a21; }
.btn-outline { display: inline-flex; gap: 8px; align-items: center; border: 2px solid #D88401; color: #111; padding: 12px 18px; border-radius: 12px; font-weight: 700; }
.btn-outline:hover { background: rgba(216,132,1,0.1); }

/* Cards grid */
.grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 8px 22px rgba(2,6,23,0.06); border: 1px solid rgba(2,6,23,0.06); }
.card h3 { color: #363636; }
.muted { color: #6b7280; }

/* Services (clone look) */
.service-grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(4, 1fr); } }
.service-card { position: relative; background: #ffffff; border-radius: 16px; padding: 24px 18px 24px; box-shadow: 0 8px 22px rgba(2,6,23,0.06); border: 1px solid rgba(2,6,23,0.06); text-align: center; transition: transform 0.25s ease, box-shadow 0.25s ease; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(2,6,23,0.08); }
.service-card::after { content: ""; position: absolute; inset-inline: 14px; bottom: 0; height: 3px; background: #E31B23; transform: scaleX(0); transform-origin: right; transition: transform 0.25s ease; border-radius: 2px; }
.service-card:hover::after { transform: scaleX(1); }
.service-card .icon-box { width: 140px; height: 140px; border-radius: 16px; background: #ffffff; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; box-shadow: none; border: 1px solid rgba(2,6,23,0.06); padding: 10px; }
.service-card .icon-box i { font-size: 44px; color: #E31B23; }
.service-card .icon-box img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; object-fit: contain; }
.service-card h3 { margin: 8px 0 6px; color: #111827; font-weight: 800; font-size: 18px; }
.service-card h3 .service-title-icon { color: #E31B23; margin-inline-start: 6px; }
.service-card p { color: #6b7280; font-size: 14px; margin: 0; }

/* Footer */
.site-footer { background: #F8F8F8; padding: 35px 0; margin-top: 30px; color: #363636; }
.animate-fade-in { animation: fadeIn 0.6s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.site-footer .footer-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .site-footer .footer-grid { grid-template-columns: 30% 20% 20% 30%; } }
.site-footer .social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 206, 0, 0.43); color: #363636; margin-inline-start: 8px; }
/* Footer links touch targets */
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin: 0 0 0px; }
.site-footer ul li a { display: block; text-decoration: none; color: #111827; background: transparent; }
.site-footer ul li a:hover { background: rgba(227,27,35,0.06); color: #111827; }

/* Service Areas (clone-like) */
.related-services-widget { margin: 20px 0; padding: 16px; background: #ffffff; border: 1px solid rgba(2,6,23,0.06); border-radius: 14px; box-shadow: 0 8px 22px rgba(2,6,23,0.06); }
.related-services-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .related-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .related-services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .related-services-grid { grid-template-columns: repeat(4, 1fr); } }
.related-service-item { display: block; padding: 16px 20px; line-height: 1.25; border: 1px solid rgba(2,6,23,0.06); border-radius: 12px; text-decoration: none; color: #111827; background: #fff; text-align: center; font-size: 16px; font-weight: 800; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.related-service-item:hover { background: rgba(227,27,35,0.06); border-color: rgba(227,27,35,0.35); transform: translateY(-1px); color: #111827; }

/* Contact form basic styles */
.contact-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); padding: 22px; height: 100%; }
.contact-card input, .contact-card textarea { width: 100%; border-radius: 8px; border: 1px solid #e5e7eb; padding: 10px 12px; font-family: inherit; box-sizing: border-box; display: block; margin-bottom: 5px; }
.contact-card textarea { min-height: 120px; }
.contact-card button, .contact-card input[type="submit"], .contact-card .wpcf7 .wpcf7-submit { width: 100%; background: #E31B23; color: #fff; border: none; padding: 12px 18px; border-radius: 12px; font-weight: 700; cursor: pointer; }
.contact-card button:hover, .contact-card input[type="submit"]:hover, .contact-card .wpcf7 .wpcf7-submit:hover { background: #c61a21; }
.contact-card .wpcf7-form p { margin: 0 0 5px; }
.contact-card .wpcf7-form p:last-child { margin-bottom: 0; }
.contact-card .wpcf7-form br { display: none; }
.contact-card .wpcf7-form-control-wrap { display: block; }

/* Contact section */
.contact-grid { display: grid; gap: 28px; align-items: stretch; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1.2fr 1fr; } }
.info-item { display: flex; align-items: flex-start; gap: 14px; padding: 8px 0; }
.info-icon { width: 48px; height: 48px; border-radius: 999px; background: rgba(227,27,35,0.1); color: #E31B23; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.contact-card h3 { font-size: 20px; font-weight: 800; }
.info-item h4 { margin: 0 0 4px; font-weight: 800; color: #111827; font-size: 17px; }
.info-item p { margin: 0; color: #6b7280; }

/* Ensure phone numbers render left-to-right inside RTL layouts */
.phone-ltr { direction: ltr; unicode-bidi: embed; font-weight: 700; color: #111827; }

/* Ensure phone numbers in buttons are white */
.btn-red .phone-ltr,
.btn-red--inverted .phone-ltr,
.phone-chip .phone-ltr,
.site-header .cta .phone-ltr { color: #fff !important; }

/* Note: custom webfont declarations removed to avoid external host references. Configure locally if needed. */

/* Floating action buttons */
.floating-whatsapp, .floating-call { position: fixed; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.2); z-index: 60; right: 18px; }
.floating-whatsapp { bottom: 18px; background: #25D366; }
.floating-call { bottom: 80px; background: #E31B23; }
.floating-whatsapp:hover, .floating-call:hover { opacity: 0.9; color: #fff; }

/* Simple marquee for brand names */
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee { white-space: nowrap; }
.brand-videos { display: grid; gap: 16px; }
@media (min-width: 768px) { .brand-videos { grid-template-columns: 1fr 1fr; } }
.brand-card video { width: 100%; border-radius: 12px; display: block; }
.stars { color: #F59E0B; font-size: 18px; display: inline-flex; gap: 2px; }

/* App section */
.app-section { background: linear-gradient(180deg, #f8f8f8, #fff); }
.app-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 1024px) { .app-grid { grid-template-columns: 1fr 1.1fr; } }
.app-shot { background: transparent; border-radius: 0; padding: 0; box-shadow: none; display: flex; justify-content: center; }
.app-shot img { display: block; margin: 0 auto; width: 100%; max-width: 380px; border-radius: 16px; }
.app-heading { color: #363636; font-weight: 800; position: relative; display: inline-block; }
.app-heading::after { content: ""; position: absolute; right: 0; bottom: -6px; width: 35%; height: 3px; background: #E31B23; border-radius: 2px; }
.app-features { display: grid; gap: 14px; margin: 18px 0 22px; }
@media (min-width: 640px) { .app-features { grid-template-columns: 1fr 1fr; } }
.feature-item { display: flex; gap: 10px; align-items: flex-start; }
.feature-bullet { background: rgba(227,27,35,0.1); color: #E31B23; width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.store-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* Feedback (Reviews + Guarantee) */
.feedback-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) { .feedback-grid { grid-template-columns: 1fr 1fr; } }
.feedback-card { background: #f8f8f8; border-radius: 14px; padding: 18px; box-shadow: 0 8px 22px rgba(2,6,23,0.06); border: 1px solid rgba(2,6,23,0.06); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.feedback-icon { font-size: 40px; color: #E31B23; line-height: 1; }
.feedback-title { font-weight: 800; color: #111827; }
.feedback-meta { font-size: 12px; color: #6b7280; }
.feedback-emphasis { color: #fff; background: #E31B23; padding: 8px 12px; border-radius: 8px; font-weight: 800; }
.feedback-card .btn-outline { margin-top: 8px; }

/* Emergency section adjustments */
.section--emergency .info-item .info-icon, .section--emergency .feedback-icon, .section--emergency .stars i { color: #fff; }
.section--emergency .info-item h3, .section--emergency .info-item p { color: #fff; }
.section--emergency i { color: #fff; }
.section--emergency .btn-red--inverted i { color: #E31B23; }
.section--emergency .btn-red--inverted .phone-ltr { color: #fff !important; }
.section--emergency .btn-red--inverted { color: #fff; }
.section--emergency .btn-red--inverted * { color: #fff !important; }
/* Heading icon spacing (RTL aware) */
.section--emergency h2 i,
.section--emergency h3 i { margin-inline-end: 8px; }

/* Why choose us (icons above text) */
.why-grid { display: grid; gap: 18px; }
@media (min-width: 768px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
.why-item { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 8px 22px rgba(2,6,23,0.06); border: 1px solid rgba(2,6,23,0.06); text-align: center; }
.why-item .why-icon { width: 56px; height: 56px; border-radius: 999px; background: rgba(227,27,35,0.08); color: #E31B23; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 10px; }
.why-item h3 { margin: 6px 0 6px; font-size: 18px; color: #111827; font-weight: 800; }
.why-item p { margin: 0; font-size: 14px; color: #6b7280; }

/* Scroll-reveal: slide-in from top */
.sr { opacity: 0; transform: translate3d(0, var(--sr-from, -36px), 0); transition-property: opacity, transform; transition-duration: var(--sr-duration, 1000ms); transition-timing-function: var(--sr-ease, cubic-bezier(0.22, 1, 0.36, 1)); transition-delay: var(--sr-delay, 120ms); will-change: opacity, transform; }
.sr-in { opacity: 1; transform: translate3d(0, 0, 0); }
.hero .sr { --sr-from: -48px; --sr-duration: 1100ms; }
.hero .hero-media img { --sr-from: -64px; }
@media (prefers-reduced-motion: reduce) {
  .sr { opacity: 1; transform: none; transition: none; }
}

/* Tweak SR for related services to avoid tight visual overlap during slide */
.related-services-grid .related-service-item.sr { --sr-from: -16px; --sr-duration: 900ms; }

