/*
Theme Name: Wayet Maa Riyadh
Theme URI: https://wayet-riyadh.sa
Author: Wayet Maa Riyadh Engineering
Author URI: https://wayet-riyadh.sa
Description: قالب ووردبريس متكامل لشركة وايت ماء الرياض لتوصيل مياه الشرب النقية بوايت 6 طن في أحياء شمال الرياض مع دعم كامل لـ Elementor ولوحة تحكم شاملة للخدمات والأعمال ومناطق التغطية.
Version: 1.0.9
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: wayet-maa-riyadh
Tags: rtl-language-support, custom-logo, custom-menu, elementor, water-delivery
*/

:root {
  --brand-primary: #023788;
  --brand-accent: #D9EFF6;
  --brand-heading: #0B2F00;
  --brand-highlight: #168FE5;
  --brand-text: #333333;
  --brand-white: #FFFFFF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #D9EFF6;
  --bg-card: #FFFFFF;
  --bg-card-sky: #D9EFF6;
}

html.dark {
  --brand-heading: #FFFFFF;
  --brand-text: #FFFFFF;
  --bg-primary: #081521;
  --bg-secondary: #10283B;
  --bg-card: #183D58;
  --bg-card-sky: #183D58;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-primary);
  color: var(--brand-text);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* Override WordPress global-styles underline & form overflow */
:where(body.wayet-theme),
:where(body.wayet-theme *:not(#wpadminbar):not(#wpadminbar *)),
:where(body.wayet-theme *:not(#wpadminbar):not(#wpadminbar *)::before),
:where(body.wayet-theme *:not(#wpadminbar):not(#wpadminbar *)::after) {
  box-sizing: border-box;
  border-style: solid;
  border-width: 0;
}

body.wayet-theme a:where(:not(.wp-element-button)),
body.wayet-theme a:not(.underline):not(#wpadminbar a) {
  text-decoration: none;
}

body.wayet-theme input:not([type="checkbox"]):not([type="radio"]),
body.wayet-theme select,
body.wayet-theme textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-style: solid;
}

body.wayet-theme select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  padding-right: 1rem !important;
  padding-left: 2.5rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23023788' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 0.85rem center !important;
  background-size: 18px 18px !important;
  cursor: pointer;
}

html.dark body.wayet-theme select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23168FE5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: 'Cairo', sans-serif;
  overflow-wrap: break-word;
}

.font-body,
button,
input,
select,
textarea {
  font-family: 'Tajawal', sans-serif;
}

.wayet-container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* WordPress Admin Bar offset for sticky header & mobile drawer */
body.admin-bar header.wayet-site-header {
  top: 32px !important;
}

#wayet-mobile-drawer {
  z-index: 100000 !important;
}

body.admin-bar #wayet-mobile-drawer > aside {
  padding-top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar header.wayet-site-header {
    top: 46px !important;
  }
  body.admin-bar #wayet-mobile-drawer > aside {
    padding-top: 46px;
  }
}

/* Elementor 1440px boxed width & seamless hero wave */
.elementor-section.elementor-section-boxed > .elementor-container,
.e-con.e-con-boxed > .e-con-inner {
  max-width: 1440px !important;
}

.elementor-widget-wayet_hero_widget,
.elementor-widget-wayet_hero_widget > .elementor-widget-container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.typewriter-heading {
  line-height: 1.48 !important;
  text-wrap: balance;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.card-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

/* Mobile-safe logo scaling on 360px screens */
.wayet-header-logo img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 480px) {
  .wayet-header-logo img {
    max-height: 38px;
    max-width: 135px;
  }
}

/* Theme logo light/dark swap without breaking layout */
html.dark .wayet-logo-light {
  display: none !important;
}
html:not(.dark) .wayet-logo-dark {
  display: none !important;
}

/* Hardened Outline-to-Solid Hover Buttons */
body.wayet-theme .btn-outline-solid,
body.wayet-theme a.btn-outline-solid,
body.wayet-theme button.btn-outline-solid {
  border-style: solid !important;
  border-width: 2px;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  cursor: pointer;
}

body.wayet-theme .btn-outline-solid:active {
  transform: scale(0.98);
}

/* High-Contrast Footer Resistant to Elementor Global Styles */
footer.wayet-footer {
  background-color: #FFFFFF !important;
  color: #0f172a !important;
}
footer.wayet-footer h2,
footer.wayet-footer h3,
footer.wayet-footer h4,
footer.wayet-footer strong {
  color: #0f172a !important;
}
footer.wayet-footer p,
footer.wayet-footer span:not(a span),
footer.wayet-footer li {
  color: #1e293b !important;
}
footer.wayet-footer a:not(.wayet-btn-primary) {
  color: #1e293b !important;
  text-decoration: none !important;
}
footer.wayet-footer a:not(.wayet-btn-primary):hover,
footer.wayet-footer a:not(.wayet-btn-primary):hover span {
  color: #168FE5 !important;
}
footer.wayet-footer .wl-credit a:hover,
footer.wayet-footer .wl-credit a:hover span {
  color: #25D366 !important;
}
footer.wayet-footer a.wayet-btn-primary,
footer.wayet-footer a.wayet-btn-primary span {
  color: #023788 !important;
}
footer.wayet-footer a.wayet-btn-primary {
  background-color: transparent !important;
  border: 2px solid #023788 !important;
}
footer.wayet-footer a.wayet-btn-primary:hover,
footer.wayet-footer a.wayet-btn-primary:hover span {
  color: #FFFFFF !important;
}
footer.wayet-footer a.wayet-btn-primary:hover {
  background-color: #023788 !important;
}

html.dark footer.wayet-footer {
  background-color: #081521 !important;
  color: #ffffff !important;
}
html.dark footer.wayet-footer h2,
html.dark footer.wayet-footer h3,
html.dark footer.wayet-footer h4,
html.dark footer.wayet-footer strong {
  color: #ffffff !important;
}
html.dark footer.wayet-footer p,
html.dark footer.wayet-footer span:not(a span),
html.dark footer.wayet-footer li {
  color: #e2e8f0 !important;
}
html.dark footer.wayet-footer a:not(.wayet-btn-primary) {
  color: #e2e8f0 !important;
}
html.dark footer.wayet-footer a:not(.wayet-btn-primary):hover,
html.dark footer.wayet-footer a:not(.wayet-btn-primary):hover span {
  color: #168FE5 !important;
}
html.dark footer.wayet-footer .wl-credit a:hover,
html.dark footer.wayet-footer .wl-credit a:hover span {
  color: #25D366 !important;
}
html.dark footer.wayet-footer a.wayet-btn-primary,
html.dark footer.wayet-footer a.wayet-btn-primary span {
  color: #FFFFFF !important;
}
html.dark footer.wayet-footer a.wayet-btn-primary {
  background-color: transparent !important;
  border: 2px solid #168FE5 !important;
}
html.dark footer.wayet-footer a.wayet-btn-primary:hover,
html.dark footer.wayet-footer a.wayet-btn-primary:hover span {
  color: #FFFFFF !important;
}
html.dark footer.wayet-footer a.wayet-btn-primary:hover {
  background-color: #168FE5 !important;
}

/* WordPress nav menu list reset + responsive 1024-1279px spacing */
.wayet-primary-menu,
.wayet-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wayet-primary-menu {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.wayet-primary-menu a {
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
  font-size: 14px;
  color: var(--brand-text);
  text-decoration: none !important;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.15s ease;
}

@media (min-width: 1280px) {
  .wayet-primary-menu {
    gap: 1.5rem;
  }
  .wayet-primary-menu a {
    font-size: 15px;
  }
}

.wayet-primary-menu a:hover,
.wayet-primary-menu .current-menu-item > a {
  color: #168FE5;
  font-weight: 700;
}

.wayet-primary-menu .current-menu-item > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2.5px;
  border-radius: 9999px;
  background-color: #168FE5;
}

.wayet-drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.wayet-drawer-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 16px;
  font-weight: 500;
  color: var(--brand-text);
  text-decoration: none !important;
}

.wayet-drawer-menu .current-menu-item > a {
  background-color: var(--bg-secondary);
  color: #023788;
  font-weight: 700;
}

html.dark .wayet-drawer-menu .current-menu-item > a {
  color: #ffffff;
}

.wayet-footer-menu {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: 15px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
