/*
Theme Name: Haref | حريف
Theme URI: https://haref.com/
Author: Haref
Author URI: https://haref.com/
Description: قالب ووردبريس عربي RTL لشركات التسويق الإلكتروني، بنظام تصميم واضح وسريع وقابل للوصول.
Version: 1.3.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: haref
Tags: rtl-language-support, translation-ready, custom-logo, custom-menu, featured-images, threaded-comments, blog, business
*/

:root {
  --haref-primary: #030322;
  --haref-accent: #177BFF;
  --haref-text: #333333;
  --haref-secondary: #757C86;
  --haref-white: #FFFFFF;
  --haref-surface: #F6F7F9;
  --haref-border: #DADDE3;
  --haref-success-bg: #E8F6EC;
  --haref-success-text: #1C6B34;
  --haref-error-bg: #FDECEC;
  --haref-error-text: #8C1D1D;
  --haref-radius: 12px;
  --haref-font: "Cairo", sans-serif;
  --haref-container: 1200px;
  --haref-transition: 140ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img,
iframe {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--haref-accent);
  outline-offset: 2px;
}

.container {
  width: min(100% - 48px, var(--haref-container));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed !important;
  top: 12px;
  right: 12px;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 8px 12px;
  margin: 0;
  overflow: visible;
  clip: auto;
  background: var(--haref-white);
  color: var(--haref-primary);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
}

/* Top notice and navigation */
.alert-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 8px 24px;
  background: var(--haref-primary);
  color: var(--haref-white);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.alert-bar .highlight {
  color: var(--haref-accent);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - var(--haref-container)) / 2));
  background: var(--haref-primary);
  color: var(--haref-white);
  border-bottom: 1px solid var(--haref-border);
}

.navbar.scrolled {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.logo,
.brand-link,
.nav-collapse,
.nav-links {
  display: flex;
  align-items: center;
}

.brand-link {
  gap: 8px;
  text-decoration: none;
}

.brand-logo,
.custom-logo {
  width: auto;
  max-width: 180px;
  height: 48px;
  object-fit: contain;
}

.nav-collapse {
  gap: 28px;
}

.nav-links {
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  color: var(--haref-white);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--haref-transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--haref-text);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: var(--haref-white);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
  cursor: pointer;
}

.mobile-toggle .toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: opacity var(--haref-transition), transform var(--haref-transition);
}

.mobile-toggle.is-open .toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-toggle.is-open .toggle-bar:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.is-open .toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(3, 3, 34, .64);
  border: 0;
}

.nav-overlay[hidden] {
  display: none;
}

body.haref-nav-open {
  overflow: hidden;
}

/* Buttons */
.btn,
.btn-primary,
.btn-outline,
.btn-white,
.btn-story,
.btn-lg,
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  color: var(--haref-white);
  background: var(--haref-primary);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color var(--haref-transition);
}

.btn:hover,
.btn-primary:hover,
.btn-white:hover,
.btn-lg:hover,
.btn-submit:hover {
  background: var(--haref-text);
}

.btn-outline,
.btn-story {
  background: transparent;
  color: var(--haref-primary);
  border-color: var(--haref-border);
}

.hero .btn-outline,
.hero .btn-story {
  color: var(--haref-white);
  border-color: var(--haref-border);
}

.btn-outline:hover,
.btn-story:hover {
  background: var(--haref-surface);
}

.hero .btn-outline:hover,
.hero .btn-story:hover {
  background: var(--haref-text);
}

.btn:disabled,
.btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Hero */
.hero {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
  background: var(--haref-primary);
  color: var(--haref-white);
  border-bottom: 1px solid var(--haref-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 64px;
  align-items: center;
}

.hero-content {
  max-width: 680px;
}

.hero-content h1 {
  max-width: 18ch;
  margin: 0 0 20px;
  color: var(--haref-white);
  font-size: clamp(40px, 4.3vw, 52px);
  font-weight: 800;
  line-height: 1.25;
}

.hero-content h1 .highlight {
  color: var(--haref-accent);
}

.hero-content p {
  max-width: 65ch;
  margin: 0 0 28px;
  color: var(--haref-white);
  font-size: 16px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
}

/* Shared section styles */
.services,
.steps,
.case-studies,
.projects,
.testimonials,
.features,
.faq,
.blog,
.contact,
.about-us,
.clients,
.google-partner,
.cta-download {
  padding: 80px 0;
}

.steps,
.features,
.blog,
.clients {
  background: var(--haref-surface);
}

.services,
.case-studies,
.projects,
.faq,
.contact,
.about-us,
.google-partner {
  background: var(--haref-white);
}

.section-title {
  margin: 0 0 12px;
  color: var(--haref-primary);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.section-title span,
.about-title span {
  color: var(--haref-accent);
}

.section-sub {
  max-width: 65ch;
  margin: 0 auto 40px;
  color: var(--haref-text);
  font-size: 16px;
  text-align: center;
}

.services-grid,
.steps-grid,
.case-grid,
.features-grid,
.blog-grid {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  align-items: start;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.steps-grid,
.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.case-grid,
.blog-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card,
.step-card,
.case-card,
.testimonial-card,
.feature-item,
.blog-card,
.faq-item,
.contact-form,
.contact-info,
.entry-content,
.haref-widget,
.client-logo,
.partner-badge,
.case-metric {
  background: var(--haref-white);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
}

.service-card,
.step-card,
.feature-item {
  padding: 24px;
}

.service-card,
.feature-item {
  text-align: center;
}

.service-card,
.step-card,
.case-card,
.testimonial-card,
.feature-item,
.blog-card,
.client-logo {
  transition: background-color var(--haref-transition);
}

.service-card:hover,
.step-card:hover,
.case-card:hover,
.testimonial-card:hover,
.feature-item:hover,
.blog-card:hover,
.client-logo:hover {
  background-color: var(--haref-surface);
}

.service-image,
.case-image img,
.blog-image img,
.client-avatar img,
.entry-thumb img,
.entry-content img,
.about-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--haref-radius);
}

.service-image {
  aspect-ratio: 3 / 2;
  margin-bottom: 16px;
}

.service-card h4,
.step-card h4,
.case-card h4,
.feature-item h4,
.blog-card h4 {
  margin: 0 0 8px;
  color: var(--haref-primary);
  font-size: 20px;
  line-height: 1.4;
}

.service-card p,
.step-card p,
.case-card p,
.feature-item p,
.blog-card p {
  margin: 0;
  color: var(--haref-text);
  font-size: 15px;
}

.step-card .num {
  display: block;
  margin-bottom: 12px;
  color: var(--haref-accent);
  font-size: 20px;
  font-weight: 800;
}

.case-card,
.blog-card {
  overflow: hidden;
}

.case-image,
.blog-image {
  min-height: 200px;
  background: var(--haref-surface);
}

.case-image img,
.blog-image img {
  height: 220px;
  border: 0;
}

.case-image .overlay {
  display: none;
}

.case-body,
.blog-body {
  padding: 24px;
}

.case-body .result,
.blog-body .tag {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--haref-primary);
  font-size: 13px;
  font-weight: 700;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--haref-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.read-more:hover {
  background: var(--haref-surface);
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.about-media {
  position: relative;
}

.about-media img {
  aspect-ratio: 4 / 3;
}

.about-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 12px 16px;
  background: var(--haref-primary);
  color: var(--haref-white);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
}

.about-badge strong,
.about-badge span {
  display: block;
}

.about-badge strong {
  font-size: 24px;
  line-height: 1.25;
}

.about-badge span,
.about-content .badge {
  font-size: 13px;
}

.about-content .badge {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--haref-primary);
  font-weight: 700;
}

.about-title {
  margin: 0 0 16px;
  color: var(--haref-primary);
  font-size: 32px;
  line-height: 1.35;
}

.about-content p {
  max-width: 65ch;
  margin: 0 0 20px;
}

.about-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
}

.about-list li {
  padding-top: 12px;
  border-top: 1px solid var(--haref-border);
}

/* Partners, clients and stats */
.partner-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

.partner-badge {
  padding: 16px;
  color: var(--haref-primary);
  font-weight: 700;
}

.partner-text h3 {
  margin: 0 0 8px;
  color: var(--haref-primary);
  font-size: 24px;
}

.partner-text p {
  margin: 0;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 32px;
  align-items: start;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 16px;
  text-decoration: none;
}

.client-logo img {
  width: auto;
  max-width: 100%;
  max-height: 56px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.stat-item {
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--haref-border);
}

.stat-item h3 {
  margin: 0;
  color: var(--haref-primary);
  font-size: 32px;
}

.stat-item h3 span {
  color: var(--haref-primary);
}

.stat-item p {
  margin: 4px 0 0;
  color: var(--haref-text);
  font-size: 14px;
}

/* Testimonials */
.testimonials,
.cta-download {
  background: var(--haref-primary);
  color: var(--haref-white);
}

.testimonials .section-title,
.cta-download h2 {
  color: var(--haref-white);
}

.testimonials .section-sub,
.cta-download p {
  color: var(--haref-white);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
  align-items: start;
}

.testimonial-card {
  padding: 24px;
  color: var(--haref-text);
}

.client-info {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.client-avatar img {
  width: 48px;
  height: 48px;
}

.client-name {
  color: var(--haref-primary);
  font-weight: 700;
}

.client-name span {
  display: block;
  color: var(--haref-text);
  font-size: 13px;
  font-weight: 400;
}

.testimonial-card .stars {
  margin-bottom: 12px;
  color: var(--haref-text);
  font-size: 14px;
}

.testimonial-card p {
  margin: 0;
  color: var(--haref-text);
}

/* FAQ */
.faq-grid {
  display: grid;
  gap: 12px;
  max-width: 800px;
  margin: 32px auto 0;
}

.faq-item {
  overflow: hidden;
  background: var(--haref-surface);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  background: transparent;
  color: var(--haref-primary);
  border: 0;
  border-radius: var(--haref-radius);
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
  transition: background-color var(--haref-transition);
}

.faq-question:hover {
  background: var(--haref-white);
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--haref-text);
}

.faq-answer[hidden] {
  display: none;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: 32px;
}

.contact-info,
.contact-form {
  padding: 24px;
  background: var(--haref-surface);
}

.contact-info h3 {
  margin: 0 0 12px;
  color: var(--haref-primary);
  font-size: 24px;
}

.contact-info p {
  margin: 0 0 24px;
}

.info-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--haref-border);
}

.info-label {
  color: var(--haref-primary);
  font-size: 14px;
  font-weight: 700;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.social-links a {
  color: var(--haref-primary);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--haref-primary);
  font-size: 14px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea,
.contact-form select,
.search-form input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--haref-white);
  color: var(--haref-text);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
  transition: background-color var(--haref-transition);
}

.contact-form textarea {
  min-height: 128px;
  resize: vertical;
}

.contact-form input:hover,
.contact-form textarea:hover,
.contact-form select:hover,
.search-form input:hover {
  background: var(--haref-surface);
}

.contact-form .btn-submit {
  width: auto;
}

.honeypot-field {
  display: none !important;
}

.haref-alert {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--haref-success-bg);
  color: var(--haref-success-text);
  border: 1px solid currentColor;
  border-radius: var(--haref-radius);
}

.haref-alert.error {
  background: var(--haref-error-bg);
  color: var(--haref-error-text);
}

/* Map and CTA */
.map-section {
  padding: 0 0 80px;
  background: var(--haref-white);
}

.map-section iframe {
  width: 100%;
  height: 352px;
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
}

.cta-download {
  text-align: center;
}

.cta-download h2 {
  max-width: 24ch;
  margin: 0 auto 12px;
  font-size: 32px;
  line-height: 1.4;
}

.cta-download p {
  max-width: 65ch;
  margin: 0 auto 24px;
  font-size: 16px;
}

.cta-download .cta-note {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--haref-secondary);
}

.cta-download .btn-white {
  background: var(--haref-white);
  color: var(--haref-primary);
  border-color: var(--haref-border);
}

.cta-download .btn-white:hover {
  background: var(--haref-surface);
}

/* Inner pages */
.breadcrumbs {
  padding: 12px max(24px, calc((100vw - var(--haref-container)) / 2));
  background: var(--haref-surface);
  color: var(--haref-text);
  border-bottom: 1px solid var(--haref-border);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--haref-primary);
}

.breadcrumb-current {
  color: var(--haref-primary);
}

.page-hero {
  padding: 64px 0;
  background: var(--haref-primary);
  color: var(--haref-white);
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: 40px;
  line-height: 1.3;
}

.page-hero p {
  margin: 0;
  color: var(--haref-white);
}

.site-main {
  min-height: 50vh;
  padding: 64px 0;
}

.entry-content,
.haref-widget {
  padding: 24px;
}

.entry-content {
  line-height: 2;
}

.entry-content h2,
.entry-content h3 {
  margin: 28px 0 12px;
  color: var(--haref-primary);
}

.entry-content p {
  max-width: 70ch;
  margin: 0 0 16px;
}

.entry-content ul,
.entry-content ol {
  margin: 0 24px 16px 0;
}

.entry-content a {
  color: var(--haref-primary);
  text-underline-offset: 4px;
}

.card-link,
.card-title-link {
  color: inherit;
  text-decoration: none;
}

.case-client {
  color: var(--haref-primary) !important;
  font-weight: 700;
}

.entry-thumb img {
  margin-bottom: 24px;
}

.entry-meta {
  margin-bottom: 20px;
  color: var(--haref-text);
  font-size: 14px;
}

.content-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.haref-sidebar {
  display: grid;
  gap: 24px;
}

.haref-widget-title {
  margin: 0 0 12px;
  color: var(--haref-primary);
  font-size: 20px;
}

.haref-widget ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.haref-widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--haref-border);
}

.haref-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.haref-pagination .page-numbers {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--haref-white);
  color: var(--haref-primary);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
  text-align: center;
  text-decoration: none;
}

.haref-pagination .page-numbers.current,
.haref-pagination .page-numbers:hover {
  background: var(--haref-surface);
}

.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.case-metric {
  padding: 20px;
}

.case-metric strong {
  display: block;
  color: var(--haref-primary);
  font-size: 24px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form label {
  flex: 1;
}

.not-found-content {
  text-align: center;
}

.not-found-action,
.comments-area {
  margin-top: 24px;
}

.comment-list {
  padding: 0;
  list-style: none;
}

/* Footer and genuine floating controls */
footer {
  padding: 56px 0 24px;
  background: var(--haref-primary);
  color: var(--haref-white);
  border-top: 1px solid var(--haref-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  width: auto;
  max-width: 180px;
  height: 52px;
  margin-bottom: 12px;
  object-fit: contain;
}

.footer-grid h4 {
  margin: 0 0 12px;
  color: var(--haref-white);
  font-size: 16px;
}

.footer-grid ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-grid li {
  margin: 8px 0;
}

.footer-grid a {
  color: var(--haref-white) !important;
  font-size: 14px;
}

.footer-brand p {
  color: var(--haref-secondary) !important;
  font-size: 14px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--haref-border);
  font-size: 14px;
  text-align: center;
}

.legal-links,
.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.whatsapp-float,
.scroll-top {
  position: fixed;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--haref-primary);
  color: var(--haref-white);
  border: 1px solid var(--haref-border);
  border-radius: var(--haref-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--haref-transition), opacity var(--haref-transition), transform var(--haref-transition);
}

.whatsapp-float {
  right: 20px;
  bottom: 20px;
}

.scroll-top {
  left: 20px;
  bottom: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.whatsapp-float:hover,
.scroll-top:hover {
  background: var(--haref-text);
}

@media (max-width: 992px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-collapse {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1001;
    width: min(320px, 86vw);
    height: 100dvh;
    padding: 88px 24px 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    overflow-y: auto;
    background: var(--haref-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    transform: translateX(100%);
    transition: transform 180ms ease-out;
  }

  .nav-collapse.open {
    transform: translateX(0);
  }

  .nav-collapse .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-collapse .nav-links li {
    border-bottom: 1px solid var(--haref-border);
  }

  .nav-collapse .nav-links a {
    display: block;
    padding: 12px 0;
  }

  .nav-collapse .nav-cta {
    margin-top: 16px;
  }

  .hero-grid,
  .about-grid,
  .contact-grid,
  .content-sidebar {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 40px;
  }

  .partner-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 32px, var(--haref-container));
  }

  .services,
  .steps,
  .case-studies,
  .projects,
  .testimonials,
  .features,
  .faq,
  .blog,
  .contact,
  .about-us,
  .clients,
  .google-partner,
  .cta-download,
  .hero,
  .page-hero,
  .site-main {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .section-title,
  .page-hero h1 {
    font-size: 28px;
  }

  .about-title,
  .cta-download h2 {
    font-size: 24px;
  }

  .hero-content,
  .hero-content p,
  .section-sub {
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .stats,
  .footer-grid,
  .case-meta-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    text-align: center;
  }

  .footer-logo {
    margin-inline: auto;
  }

  .search-form {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
