/*
Theme Name: Ahmed Youssef
Theme URI: https://example.com
Description: Custom theme for Ahmed Youssef — migrated from static HTML. Includes homepage, services, results, and contact.
Author: Site migration
Version: 1.0.0
Text Domain: ahmed-youssef
*/

/* Main styles are loaded from assets/ via functions.php */
body {
  margin: 0;
}

.page-inner {
  padding: 0;
}

/* WordPress block editor & classic content */
.entry-content a {
  color: #358f6d;
  font-weight: 600;
}

/* CTA buttons: keep text white (overrides .entry-content a) */
.entry-content a.btn-yellow,
.entry-content a.btn-accent,
.entry-content a.btn-primary {
  color: #fff;
}
.entry-content a.btn-ghost {
  color: #171421;
  font-weight: 700;
}

.entry-content {
  /* Allow full-bleed sections inside page HTML */
  max-width: none;
}

/* Home: grids need a real width; min-width:0 prevents flex/overflow squeeze on narrow viewports. */
.ay-home-content,
.entry-content.ay-home-content {
  min-width: 0;
  width: 100%;
}

.ay-home-content .container,
.entry-content.ay-home-content .container {
  min-width: 0;
  max-width: 100%;
}

.wp-site-blocks,
.entry-content .alignwide,
.entry-content .alignfull {
  max-width: 100% !important;
}

/* Final mobile nav overrides. style.css loads last, so these beat legacy page CSS. */
@media (max-width: 900px) {
  .navbar .nav-wrap {
    position: relative;
    gap: 12px;
  }

  .navbar .nav-toggle {
    display: inline-flex !important;
  }

  .navbar .nav-wrap > .btn-accent {
    display: none !important;
  }

  .navbar .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1000;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border, #dce8e3);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(36, 92, 68, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .navbar.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }

  .navbar .nav-links > a,
  .navbar .nav-links .nav-dropdown > a {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text, #171421);
    font-size: 1rem;
    font-weight: 600;
  }

  .navbar .nav-links a::after {
    display: none !important;
  }

  .navbar .nav-dropdown {
    position: static;
  }

  .navbar .nav-dropdown-menu {
    position: static !important;
    left: auto;
    top: auto;
    min-width: 0;
    max-height: 0;
    margin: 4px 8px 8px;
    padding: 0;
    overflow: hidden;
    background: var(--bg, #f5f9f7);
    border: 1px solid var(--border, #dce8e3);
    border-radius: 12px;
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }

  .navbar .nav-dropdown.is-open .nav-dropdown-menu {
    max-height: 80vh;
    padding: 6px 0;
  }
}
