/*
Theme Name: Almasayel
Theme URI: https://es.jo
Author: ES.JO Team
Description: Almasayel official WordPress WooCommerce theme - Elementor compatible
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
WooCommerce: true
License: GNU General Public License v2 or later
Text Domain: almasayel
*/

/* ═══════════════════════════════════════════
   ALMASAYEL – CSS VARIABLES
   ═══════════════════════════════════════════ */
   :root {
    --alm-primary:       #1B3C6B;   /* Navy blue - main brand */
    --alm-primary-dark:  #132d52;
    --alm-accent:        #D4A843;   /* Gold/amber accent */
    --alm-accent-dark:   #b8902e;
    --alm-white:         #ffffff;
    --alm-off-white:     #F8F7F4;
    --alm-light-gray:    #f0eeea;
    --alm-gray-200:      #E8E6E1;
    --alm-gray-400:      #9CA3AF;
    --alm-gray-600:      #6B7280;
    --alm-gray-700:      #374151;
    --alm-gray-800:      #1F2937;
    --alm-dark:          #111827;
    --alm-green:         #16a34a;
    --alm-radius:        0.5rem;
    --alm-radius-lg:     1rem;
    --alm-max-w:         1200px;
    --alm-px:            clamp(1.25rem, 4vw, 2.5rem);
    --alm-transition:    0.3s ease;
    --alm-shadow:        0 4px 24px rgba(27,60,107,0.10);
    --alm-shadow-hover:  0 8px 40px rgba(27,60,107,0.18);
  }
  
  /* ═══════════════════════════════════════════
     RESET & BASE
     ═══════════════════════════════════════════ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  
  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }
  
  body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--alm-gray-800);
    background: var(--alm-white);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
  }
  
  img { max-width: 100%; height: auto; display: block; }
  a { text-decoration: none; color: inherit; transition: var(--alm-transition); }
  ul, ol { list-style: none; }
  button { cursor: pointer; border: none; background: none; font-family: inherit; }
  
  .alm-container {
    max-width: var(--alm-max-w);
    margin: 0 auto;
    padding: 0 var(--alm-px);
    width: 100%;
  }
  
  .alm-section {
    padding: 25px 0;
  }
  
  .alm-section-sm {
    padding: 60px 0;
  }
  
  /* ═══════════════════════════════════════════
     TYPOGRAPHY
     ═══════════════════════════════════════════ */
  .alm-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--alm-primary);
    background: rgba(27,60,107,0.08);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
  }
  
  .alm-eyebrow--accent {
    color: var(--alm-accent-dark);
    background: rgba(212,168,67,0.12);
  }

  /* Our Products section eyebrow only */
  .alm-products .alm-eyebrow {
    color: #e8c97a;
    background: rgb(250 244 228);
  }
  
  .alm-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--alm-dark);
  }
  
  .alm-title--xl {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
  }
  
  .alm-title em {
    font-style: normal;
    color: var(--alm-primary);
  }
  
  .alm-subtitle {
    font-size: 1rem;
    color: var(--alm-gray-600);
    line-height: 1.7;
    max-width: 520px;
  }
  
  /* ═══════════════════════════════════════════
     BUTTONS
     ═══════════════════════════════════════════ */
  .alm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 33px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: var(--alm-transition);
    white-space: nowrap;
    cursor: pointer;
  }
  
  .alm-btn--primary {
      background: #3e66c3;
      color: var(--alm-white);
      border: 2px solid #3e66c3;
  }
  .alm-btn--primary:hover {
    background: var(--alm-primary-dark);
    border-color: var(--alm-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27,60,107,0.3);
  }
  
  .alm-btn--outline {
      background: #e8c97a;
      color: #ffffff;
      border: 2px solid #e8c97a;
  }
  .alm-btn--outline:hover {
    background: var(--alm-primary);
    color: var(--alm-white);
    transform: translateY(-2px);
  }

  /* Services section "Discover more" button only */
  .alm-services .alm-btn--outline {
    background: #ffffff;
    color: #3359a5;
    border: 2px solid #3359a5;
  }
  .alm-services .alm-btn--outline:hover {
    background: #3359a5;
    color: #ffffff;
  }
  
  .alm-btn--accent {
    background: var(--alm-accent);
    color: var(--alm-white);
    border: 2px solid var(--alm-accent);
  }
  .alm-btn--accent:hover {
    background: var(--alm-accent-dark);
    border-color: var(--alm-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,168,67,0.35);
  }
  
  .alm-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
  
  /* ═══════════════════════════════════════════
     HEADER  (Floating Pill – overlays hero)
     ═══════════════════════════════════════════ */
  .alm-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    padding: 18px var(--alm-px) 0;
    pointer-events: none;
  }
  
  .alm-header > * { pointer-events: auto; }
  
  .alm-header-inner {
    max-width: var(--alm-max-w);
    margin: 0 auto;
    padding: 8px 12px 8px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--alm-white);
    border-radius: 999px;
    box-shadow: 0 8px 30px rgba(27, 60, 107, 0.08), 0 2px 6px rgba(27, 60, 107, 0.04);
    border: 1px solid rgba(27, 60, 107, 0.04);
    min-height: 68px;
    transition: box-shadow var(--alm-transition);
  }
  
  /* Pages without hero/banner need top space so content isn't hidden behind the header */
  body:not(.home):not(.page-template-front-page):not(.alm-has-banner) .alm-main {
    padding-top: 110px;
  }
  
  /* Logo */
  .alm-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .alm-logo img,
  .alm-logo .alm-logo-img {
    height: 66px;
    width: auto;
    display: block;
  }
  .alm-logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--alm-primary);
    letter-spacing: 0.02em;
  }
  
  /* Nav */
  .alm-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
  }
  
  .alm-nav a {
    position: relative;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--alm-gray-700);
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: color 0.3s ease, transform 0.3s ease;
  }

  /* Animated underline – grows from center, navy → gold */
  .alm-nav a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: #3359a5;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .alm-nav a:hover {
    color: var(--alm-primary);
    transform: translateY(-1px);
  }

  .alm-nav a:hover::after {
    transform: scaleX(1);
  }

  .alm-nav a.current-menu-item,
  .alm-nav .current-menu-item > a,
  .alm-nav .current_page_item > a {
    color: var(--alm-primary);
    font-weight: 600;
  }

  .alm-nav a.current-menu-item::after,
  .alm-nav .current-menu-item > a::after,
  .alm-nav .current_page_item > a::after {
    transform: scaleX(1);
    background: #3359a5;
    }

  /* Subtle accent dot above the active item */
  .alm-nav a.current-menu-item::before,
  .alm-nav .current-menu-item > a::before,
  .alm-nav .current_page_item > a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--alm-accent);
    transform: translateX(-50%);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.18);
    animation: alm-nav-dot 0.4s ease both;
  }

  @keyframes alm-nav-dot {
    from { opacity: 0; transform: translate(-50%, -4px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
  }
  
  /* Header Actions */
  .alm-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  
  .alm-header-cta {
    padding: 9px 24px;
    font-size: 0.85rem;
  }
  
  /* WooCommerce cart icon */
  .alm-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--alm-light-gray);
    color: var(--alm-primary);
    transition: var(--alm-transition);
  }
  .alm-cart-btn:hover {
    background: var(--alm-primary);
    color: var(--alm-white);
  }
  .alm-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--alm-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
  }
  
  /* Mobile hamburger */
  .alm-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 22px;
    padding: 3px;
    margin-right: 8px;
    cursor: pointer;
  }
  .alm-burger span {
    display: block;
    height: 2px;
    background: var(--alm-primary);
    border-radius: 2px;
    transition: var(--alm-transition);
  }
  
  /* Mobile nav */
  .alm-mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--alm-transition);
  }
  .alm-mobile-nav.open {
    opacity: 1;
    pointer-events: all;
  }
  .alm-mobile-nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--alm-white);
    padding: 24px;
    transform: translateX(-100%);
    transition: transform var(--alm-transition);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .alm-mobile-nav.open .alm-mobile-nav-panel {
    transform: translateX(0);
  }
  /* شيل النقط جنب عناصر المنيو */
  .alm-mobile-nav ul,
  .alm-mobile-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  /* كبّر اللوجو داخل قائمة الموبايل */
  .alm-mobile-nav-panel .alm-logo img,
  .alm-mobile-nav-panel .alm-logo .alm-logo-img {
    height: 56px;
  }
  .alm-mobile-nav a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--alm-gray-700);
    border-radius: var(--alm-radius);
    border-bottom: 1px solid var(--alm-gray-200);
  }
  .alm-mobile-nav a:hover { color: var(--alm-primary); background: var(--alm-light-gray); }
  /* زرار Contact داخل القائمة: نص أبيض وبدون خط سفلي */
  .alm-mobile-nav .alm-btn--primary {
    color: var(--alm-white);
    border-bottom: 0;
  }
  .alm-mobile-nav .alm-btn--primary:hover {
    color: var(--alm-white);
    background: var(--alm-primary-dark);
  }
  .alm-mobile-close {
    align-self: flex-end;
    font-size: 1.5rem;
    color: var(--alm-gray-600);
    cursor: pointer;
    margin-bottom: 16px;
    line-height: 1;
  }
  
  /* ═══════════════════════════════════════════
     FLOAT ACTIONS
     ═══════════════════════════════════════════ */
  .alm-float-stack {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }
  
  .alm-float-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
  }
  .alm-float-actions.visible {
    max-height: 200px;
    opacity: 1;
  }
  
  .alm-float-action-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform var(--alm-transition), box-shadow var(--alm-transition);
  }
  .alm-float-action-item:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
  .alm-float-action-item--wa { background: #25D366; }
  .alm-float-action-item--contact { background: var(--alm-primary); }
  .alm-float-action-item svg { width: 22px; height: 22px; }
  
  .alm-float-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--alm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(27,60,107,0.35);
    transition: transform var(--alm-transition), background var(--alm-transition);
    cursor: pointer;
    border: none;
  }
  .alm-float-toggle:hover { transform: scale(1.08); background: var(--alm-primary-dark); }
  .alm-float-toggle svg { width: 24px; height: 24px; }
  .alm-float-toggle .icon-close { display: none; }
  .alm-float-toggle.open .icon-open { display: none; }
  .alm-float-toggle.open .icon-close { display: block; }
  
  /* ═══════════════════════════════════════════
     ELEMENTOR OVERRIDES
     ═══════════════════════════════════════════ */
  .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: var(--alm-max-w);
  }
  
  /* Remove empty space above the hero (first Elementor container) */
  .page-template-front-page .alm-main > .elementor .elementor-section-wrap > .elementor-section:first-child,
  .page-template-front-page .alm-main > .elementor > .e-con:first-child,
  .home .alm-main > .elementor > .e-con:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  .elementor-widget-wrap {
    --e-global-color-primary: var(--alm-primary);
    --e-global-color-secondary: var(--alm-accent);
    --e-global-color-text: var(--alm-gray-800);
  }
  
  /* ═══════════════════════════════════════════
     WOOCOMMERCE BASE
     ═══════════════════════════════════════════ */
  .woocommerce .button,
  .woocommerce button.button {
    background: var(--alm-primary);
    color: var(--alm-white);
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--alm-transition);
  }
  .woocommerce .button:hover,
  .woocommerce button.button:hover {
    background: var(--alm-primary-dark);
    color: var(--alm-white);
  }
  
  /* ═══════════════════════════════════════════
     RESPONSIVE
     ═══════════════════════════════════════════ */
  @media (max-width: 1024px) {
    .alm-nav { display: none; }
    .alm-burger { display: flex; }
    .alm-mobile-nav { display: block; }
    /* في الموبايل: بس أيقونة الهمبرجر على اليمين جنب اللوجو */
    .alm-cart-btn,
    .alm-header-cta { display: none; }
  }
  
  @media (max-width: 768px) {
    .alm-section { padding: 25px 0; }
    .alm-header { padding: 12px 16px 0; }
    .alm-header-inner { padding: 6px 8px 6px 18px; min-height: 58px; gap: 12px; }
    .alm-logo img,
    .alm-logo .alm-logo-img { height: 38px; }
    .alm-logo-text { font-size: 1rem; }
    .alm-header-cta { padding: 9px 18px; font-size: 0.8rem; }
  }
  