/*
Theme Name: اليوسف لقص الخرسانات
Theme URI: https://alyoussef-concrete.sa
Author: Web Logic
Author URI: https://wa.me/201066726354
Description: قالب ووردبريس وإليمنتور متكامل واحترافي لمؤسسة اليوسف لقص وتكسير الخرسانات المسلحة وفتحات الكور في جدة ومكة المكرمة والطائف — تحكم كامل من لوحة التحكم مع تهيئة سيو متقدمة ودعم الوضع الليلي.
Version: 2.8.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alyoussef-concrete
Tags: rtl-language-support, custom-logo, custom-menu, featured-images, elementor, construction, arabic
*/

:root {
  --brand-primary: #C87518;
  --brand-accent: #D6A653;
  --brand-hover: #A85F12;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F7F3ED;
  --bg-card: #FFFFFF;
  --text-primary: #141517;
  --text-secondary: #4B5563;
  --border-subtle: #E6DDD0;
  --shadow-soft: 0 10px 30px -12px rgba(20, 21, 23, 0.08);
  --shadow-elevated: 0 18px 40px -16px rgba(20, 21, 23, 0.14);
}

html.dark,
body.dark-mode {
  --bg-primary: #101112;
  --bg-secondary: #1B1D1F;
  --bg-card: #222426;
  --text-primary: #FFFFFF;
  --text-secondary: #B8B8B8;
  --border-subtle: #2F3236;
  --shadow-soft: 0 12px 32px -12px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 20px 44px -16px rgba(0, 0, 0, 0.65);
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  direction: rtl;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Cairo', sans-serif;
}

button, input, textarea, select, .btn, .btn span, .btn-outline-brand span, .btn-outline-hero span, .btn-solid-brand span {
  font-family: 'Tajawal', sans-serif !important;
}

/* 1440px Container & Elementor Boxed Alignment */
.container-1440,
.elementor-section.elementor-section-boxed > .elementor-container,
.e-con.e-con-boxed > .e-con-inner {
  width: 100%;
  max-width: 1440px !important;
  margin-inline: auto;
}

/* Zero Bottom Spacing on Elementor Widget Wrapper Only (Preserve section.ay-hero bottom clearance) */
.elementor-widget-alyoussef_hero,
.elementor-widget-alyoussef_hero > .elementor-widget-container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Protect Theme Typography & Alignment from External Builders */
.site-main,
.ay-card,
.ay-card-body,
.ay-step-card,
.ay-step-card h3,
.ay-step-card p,
.ay-testimonial-card,
.ay-testimonial-card p,
.ay-area-card {
  direction: rtl;
  text-align: right !important;
}

/* Typewriter Grid Stack */
.typewriter-grid {
  display: grid;
}

.typewriter-grid > * {
  grid-area: 1 / 1;
  line-height: 1.48 !important;
}

@keyframes cursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-inline-start: 4px;
  vertical-align: middle;
  background-color: var(--brand-accent);
  animation: cursorBlink 0.9s steps(1) infinite;
}

/* Floating Hero Seal */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

.float-slow {
  animation: floatSlow 4.2s ease-in-out infinite;
}

/* Ken Burns Crossfade */
@keyframes kenBurnsZoom {
  0% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.hero-slide-active {
  animation: kenBurnsZoom 8s ease-out forwards;
}

@keyframes ayHeroRise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ay-hero-text-col {
  animation: ayHeroRise 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ay-hero-card-col {
  animation: ayHeroRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

/* Buttons: Outline-to-Solid Fill Hover + Tactile Press */
.btn-outline-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid var(--brand-primary);
  background-color: transparent;
  color: var(--brand-primary) !important;
  font-weight: 700;
  border-radius: 0.75rem;
  text-decoration: none !important;
  box-shadow: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-outline-brand span,
.btn-outline-brand svg {
  color: inherit;
  transition: color 0.2s ease;
}

html.dark .btn-outline-brand {
  color: var(--brand-accent) !important;
  border-color: var(--brand-accent);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus-visible,
html.dark .btn-outline-brand:hover,
html.dark .btn-outline-brand:focus-visible {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
  outline: none !important;
}

.btn-outline-brand:hover span,
.btn-outline-brand:hover svg,
.btn-outline-brand:focus-visible span,
.btn-outline-brand:focus-visible svg {
  color: #FFFFFF !important;
}

.btn-outline-brand:active,
.btn-outline-hero:active,
.btn-solid-brand:active {
  transform: scale(0.98);
}

.btn-outline-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid var(--brand-accent);
  background-color: rgba(16, 17, 18, 0.45);
  color: #FFFFFF !important;
  font-weight: 700;
  border-radius: 0.75rem;
  text-decoration: none !important;
  box-shadow: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-outline-hero:hover,
.btn-outline-hero:focus-visible {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
  outline: none !important;
}

.btn-outline-hero:hover span,
.btn-outline-hero:hover svg,
.btn-outline-hero:focus-visible span,
.btn-outline-hero:focus-visible svg {
  color: #FFFFFF !important;
}

.btn-solid-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid var(--brand-primary);
  background-color: var(--brand-primary);
  color: #FFFFFF !important;
  font-weight: 700;
  border-radius: 0.75rem;
  text-decoration: none !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-solid-brand:hover,
.btn-solid-brand:focus-visible {
  background-color: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
  outline: none !important;
}

.btn-solid-brand span,
.btn-solid-brand svg {
  color: #FFFFFF !important;
}

/* Header Desktop Action Visibility Protection (Never override hidden utility on mobile!) */
@media (max-width: 639px) {
  .ay-header-cta-desktop {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .ay-header-nav-desktop {
    display: none !important;
  }
}

/* Horizontal Card Row */
.card-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

/* Scalable Images */
.scalable-image {
  transition: transform 0.5s ease;
}

.ay-card:hover .scalable-image,
.group:hover .scalable-image {
  transform: scale(1.05);
}

/* Step & Why-Us Cards Base + Mandatory Hover Animation */
.ay-step-card {
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  padding: 1.5rem;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.ay-step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--brand-accent) !important;
}

.ay-step-badge {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid rgba(214, 166, 83, 0.45);
  color: var(--brand-primary);
  font-weight: 800;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html.dark .ay-step-badge {
  color: var(--brand-accent);
}

.ay-step-card:hover .ay-step-badge {
  transform: scale(1.1) rotate(3deg);
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #FFFFFF !important;
}

.ay-step-title {
  margin: 1.1rem 0 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-align: right;
  transition: color 0.3s ease;
}

.ay-step-card:hover .ay-step-title {
  color: var(--brand-primary) !important;
}

html.dark .ay-step-card:hover .ay-step-title {
  color: var(--brand-accent) !important;
}

.ay-step-desc {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: right;
}

/* Dark Architectural Why-Us Card Variant */
.ay-why-card {
  background-color: #1B1D1F !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.ay-why-card:hover {
  border-color: rgba(214, 166, 83, 0.78) !important;
  box-shadow: 0 22px 44px -14px rgba(0, 0, 0, 0.65);
}

.ay-why-badge {
  width: 40px;
  height: 40px;
  background-color: #222426;
  border-color: rgba(214, 166, 83, 0.45);
  color: var(--brand-accent);
  font-size: 0.9rem;
}

.ay-why-title {
  margin: 0 !important;
  color: #FFFFFF !important;
}

.ay-why-section .ay-step-card:hover .ay-why-title {
  color: var(--brand-accent) !important;
}

.ay-why-desc {
  margin-top: 0.75rem;
  color: #B8B8B8 !important;
}

/* Scroll Reveal */
.landing-reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1), transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.landing-reveal.is-visible,
.elementor-editor-active .landing-reveal,
.elementor-editor-preview .landing-reveal {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* High Contrast Footer Resistant to Elementor Global Styles */
.ay-site-footer {
  background-color: #F7F3ED !important;
  color: #0f172a !important;
  border-top: 1px solid #E2D8C8;
}

.ay-site-footer h3,
.ay-site-footer .ay-footer-heading {
  color: #0f172a !important;
}

.ay-site-footer p,
.ay-site-footer li,
.ay-site-footer .ay-footer-meta-row,
.ay-site-footer .ay-footer-meta-stack,
.ay-site-footer .ay-footer-col-links a,
.ay-site-footer .ay-footer-meta-stack a {
  color: #1e293b;
}

.ay-site-footer .ay-footer-col-links a {
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease !important;
}

.ay-site-footer .ay-footer-col-links a:hover,
.ay-site-footer .ay-footer-meta-stack a:hover {
  color: #C87518 !important;
  transform: translateX(-3px);
}

/* Protect Footer Action Buttons from Inheriting Text Colors */
.ay-site-footer a.ay-wa-card-btn,
.ay-site-footer a.ay-wa-card-btn span,
.ay-site-footer a.ay-wa-card-btn svg,
.ay-site-footer a.ay-wa-card-btn:hover,
.ay-site-footer a.ay-wa-card-btn:hover span,
.ay-site-footer a.ay-wa-card-btn:hover svg {
  color: #FFFFFF !important;
}

.ay-site-footer a.ay-wa-card-btn {
  box-shadow: none !important;
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.ay-site-footer a.ay-wa-card-btn svg {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.ay-site-footer a.ay-wa-card-btn:hover {
  background-color: #15803D !important;
  border-color: #15803D !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: none !important;
}

.ay-site-footer a.ay-wa-card-btn:hover svg {
  transform: scale(1.12);
}

.ay-site-footer a.ay-footer-phone-btn {
  background-color: #FFFFFF !important;
  border: 2px solid #D8CEBE !important;
  color: #141517 !important;
  box-shadow: none !important;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.ay-site-footer a.ay-footer-phone-btn .ay-footer-phone-icon {
  color: var(--brand-primary);
  transition: color 0.22s ease;
}

.ay-site-footer a.ay-footer-phone-btn > span:last-child {
  color: #141517 !important;
  transition: color 0.22s ease;
}

.ay-site-footer a.ay-footer-phone-btn:hover {
  background-color: #C87518 !important;
  border-color: #C87518 !important;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: none !important;
}

.ay-site-footer a.ay-footer-phone-btn:hover .ay-footer-phone-icon,
.ay-site-footer a.ay-footer-phone-btn:hover svg,
.ay-site-footer a.ay-footer-phone-btn:hover > span:last-child {
  color: #FFFFFF !important;
}

.ay-site-footer-bottom {
  background-color: #EFE8DC !important;
  border-top: 1px solid #E2D8C8;
  color: #1e293b !important;
}

html.dark .ay-site-footer {
  background-color: #16181A !important;
  color: #ffffff !important;
  border-top-color: #2A2D31;
}

html.dark .ay-site-footer h3,
html.dark .ay-site-footer .ay-footer-heading {
  color: #ffffff !important;
}

html.dark .ay-site-footer p,
html.dark .ay-site-footer li,
html.dark .ay-site-footer .ay-footer-meta-row,
html.dark .ay-site-footer .ay-footer-meta-stack,
html.dark .ay-site-footer .ay-footer-col-links a,
html.dark .ay-site-footer .ay-footer-meta-stack a {
  color: #e2e8f0;
}

html.dark .ay-site-footer .ay-footer-col-links a:hover,
html.dark .ay-site-footer .ay-footer-meta-stack a:hover {
  color: #D6A653 !important;
}

html.dark .ay-site-footer a.ay-wa-card-btn,
html.dark .ay-site-footer a.ay-wa-card-btn span,
html.dark .ay-site-footer a.ay-wa-card-btn svg,
html.dark .ay-site-footer a.ay-wa-card-btn:hover,
html.dark .ay-site-footer a.ay-wa-card-btn:hover span {
  color: #FFFFFF !important;
}

html.dark .ay-site-footer a.ay-wa-card-btn:hover {
  background-color: #15803D !important;
  border-color: #15803D !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: none !important;
}

html.dark .ay-site-footer a.ay-footer-phone-btn {
  background-color: #222426 !important;
  border: 2px solid #2F3236 !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

html.dark .ay-site-footer a.ay-footer-phone-btn .ay-footer-phone-icon {
  color: var(--brand-accent);
}

html.dark .ay-site-footer a.ay-footer-phone-btn > span:last-child {
  color: #FFFFFF !important;
}

html.dark .ay-site-footer a.ay-footer-phone-btn:hover {
  background-color: #C87518 !important;
  border-color: #C87518 !important;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: none !important;
}

html.dark .ay-site-footer a.ay-footer-phone-btn:hover .ay-footer-phone-icon,
html.dark .ay-site-footer a.ay-footer-phone-btn:hover svg,
html.dark .ay-site-footer a.ay-footer-phone-btn:hover > span:last-child {
  color: #FFFFFF !important;
}

html.dark .ay-site-footer-bottom {
  background-color: #101112 !important;
  border-top-color: #2A2D31;
  color: #e2e8f0 !important;
}

.wl-credit a {
  transition: color 0.25s ease;
}

.wl-credit a:hover {
  color: #25D366 !important;
}

@media (prefers-reduced-motion: reduce) {
  html, body {
    scroll-behavior: auto;
  }
  .float-slow,
  .hero-slide-active,
  .typewriter-cursor {
    animation: none !important;
  }
  .landing-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scalable-image,
  .ay-step-card,
  .ay-step-badge,
  .btn-outline-brand,
  .btn-outline-hero,
  .btn-solid-brand {
    transition: none !important;
  }
}
