/*
Theme Name: Ahmed Abdelgaber — Documentary Authority
Theme URI: https://ahmedabdelgaber.com/
Description: A restrained executive-editorial portfolio for Ahmed Abdelgaber.
Author: Ahmed Abdelgaber
Author URI: https://ahmedabdelgaber.com/
Template: xportfolio
Version: 3.2.8
Text Domain: ahmed-abdelgaber-documentary-authority
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --aa-ink: #111614;
  --aa-paper: #f3f1ea;
  --aa-white: #fcfcf9;
  --aa-slate: #56615d;
  --aa-line: #c9cec9;
  --aa-moss: #355e4c;
  --aa-copper: #a85f37;
  --aa-focus: #1264a3;
  --aa-gutter: clamp(20px, 4vw, 64px);
  --aa-space: clamp(72px, 10vw, 150px);
  --aa-ease: cubic-bezier(.22,1,.36,1);
  --aa-sans: "Helvetica Neue", Arial, sans-serif;
  --aa-serif: Georgia, "Times New Roman", serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--aa-paper);
  color: var(--aa-ink);
  font-family: var(--aa-sans);
  font-size: clamp(1rem, .94rem + .2vw, 1.125rem);
  line-height: 1.65;
  overflow-x: hidden;
}
body.aa-editorial { background: var(--aa-paper); }

h1, h2, .elementor-heading-title {
  color: var(--aa-ink);
  font-family: var(--aa-serif);
  font-weight: 500 !important;
  letter-spacing: -.03em;
  line-height: 1.02;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7.2vw, 7.25rem) !important; line-height: .94; }
h2 { font-size: clamp(2.25rem, 4.8vw, 4.8rem) !important; }
h3, h4 { color: var(--aa-ink); font-family: var(--aa-sans); font-weight: 650; letter-spacing: -.015em; }
p { color: var(--aa-slate); max-width: 68ch; text-wrap: pretty; }

.elementor-section, .e-con { position: relative; }
.elementor-top-section { padding-block: var(--aa-space); }
.elementor-container, .e-con-inner { width: min(calc(100% - 2 * var(--aa-gutter)), 1440px) !important; }

#masthead, .hfe-site-header, [data-elementor-type="header"] {
  background: transparent !important;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
body.aa-scrolled #masthead,
body.aa-scrolled .hfe-site-header,
body.aa-scrolled [data-elementor-type="header"] {
  background: rgba(243,241,234,.97) !important;
  border-bottom-color: var(--aa-line);
}
.hfe-nav-menu a, .elementor-nav-menu a {
  color: var(--aa-ink) !important;
  font-family: var(--aa-sans) !important;
  font-size: .76rem !important;
  font-weight: 700 !important;
  letter-spacing: .1em;
  min-height: 44px;
  text-transform: uppercase;
}

.elementor-button {
  background: var(--aa-moss) !important;
  border: 1px solid var(--aa-moss) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--aa-white) !important;
  font-family: var(--aa-sans) !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  letter-spacing: .07em;
  min-height: 48px;
  padding: .9rem 1.35rem !important;
  text-transform: uppercase;
  transition: background .25s ease, color .25s ease !important;
}
.elementor-button:hover { background: var(--aa-ink) !important; border-color: var(--aa-ink) !important; transform: none !important; }

a:not(.elementor-button) { text-underline-offset: .2em; }
:where(a,button,input,textarea,select):focus-visible { outline: 3px solid var(--aa-focus); outline-offset: 4px; }

.elementor-widget-image img { border-radius: 0 !important; }
.elementor-widget-image-box .elementor-image-box-img { display: none !important; }
.elementor-widget-image-box .elementor-image-box-wrapper {
  background: transparent !important;
  border-top: 1px solid var(--aa-line);
  border-radius: 0 !important;
  padding: 24px 0 0 !important;
  text-align: left !important;
}

.elpt-portfolio-content, .portfolio-item-wrapper {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
  transform: none !important;
}
.elpt-portfolio-content img, .portfolio-item-wrapper img { border-radius: 0 !important; transition: transform .35s var(--aa-ease); }
@media (hover:hover) and (pointer:fine) {
  .elpt-portfolio-content:hover img, .portfolio-item-wrapper:hover img { transform: scale(1.015); }
}

.elementor-counter .elementor-counter-number-wrapper { color: var(--aa-ink); font-family: var(--aa-serif); }
.elementor-counter-title { color: var(--aa-slate) !important; font-size: .76rem !important; letter-spacing: .09em; text-transform: uppercase; }

[data-elementor-type="footer"], .hfe-site-footer {
  background: var(--aa-ink) !important;
  border-radius: 0 !important;
  color: rgba(252,252,249,.74) !important;
}
[data-elementor-type="footer"] :is(h1,h2,h3,p,a,span), .hfe-site-footer :is(h1,h2,h3,p,a,span) { color: inherit !important; }


@media (max-width: 767px) {
  h1 { font-size: clamp(2.75rem, 14vw, 4.5rem) !important; }
  h2 { font-size: clamp(2rem, 10vw, 3.25rem) !important; }
  .elementor-top-section { padding-block: clamp(72px, 18vw, 96px); }
  .elementor-container, .e-con-inner { width: calc(100% - 40px) !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* Remove the legacy illustrated counters: the imagery and unsupported metrics conflict with the executive editorial direction. */
.elementor-element-13bf51f,
.elementor-top-section:has(.elementor-counter) { display: none !important; }

/* Mature forest-green identity and inherited-template cleanup. */
:root { --aa-forest: #173c31; --aa-moss: #315f4e; --aa-sage: #9db5a9; }
.elementor-element-14bc5676 img { display:none !important; }
.elementor-element-14bc5676 a { display:inline-grid !important; place-items:center; width:42px; height:42px; border:1px solid var(--aa-moss); border-radius:50%; color:var(--aa-forest) !important; text-decoration:none !important; }
.elementor-element-14bc5676 a::after { content:"AA"; font:700 11px/1 Arial,sans-serif; letter-spacing:.08em; }
.hfe-nav-menu .menu-item a.hfe-menu-item { padding-left:11px !important; padding-right:11px !important; font-size:13px !important; letter-spacing:.09em !important; }
[data-elementor-type="footer"] > section, [data-elementor-type="footer"] .elementor-section-wrap > section { background:var(--aa-forest) !important; }
[data-elementor-type="footer"] h1, [data-elementor-type="footer"] h2, [data-elementor-type="footer"] h3, [data-elementor-type="footer"] .elementor-heading-title { font-family:Arial,sans-serif !important; font-size:clamp(22px,2.2vw,34px) !important; line-height:1.25 !important; letter-spacing:-.025em !important; max-width:580px; }
[data-elementor-type="footer"] .elementor-social-icon { background:var(--aa-moss) !important; border-radius:2px !important; animation:none !important; transform:none !important; }
[data-elementor-type="footer"] .elementor-social-icon:hover, [data-elementor-type="footer"] .elementor-social-icon:focus-visible { background:var(--aa-sage) !important; color:var(--aa-forest) !important; }
#scrollUp { background:var(--aa-moss) !important; border-radius:2px !important; }
#scrollUp:hover, #scrollUp:focus-visible { background:var(--aa-forest) !important; }
@media (max-width:767px) { [data-elementor-type="footer"] h1, [data-elementor-type="footer"] h2, [data-elementor-type="footer"] h3, [data-elementor-type="footer"] .elementor-heading-title { font-size:22px !important; } }

/* Ahmed Abdelgaber — compact editorial layout */
:root{--aa-forest:#173c31;--aa-moss:#315f4e;--aa-sage:#9db5a9;--aa-paper:#f3f1ea;--aa-ink:#1b211e}
html,body{max-width:100%;overflow-x:clip!important}*,*::before,*::after{box-sizing:border-box}

/* Remove empty inherited structures. */
.elementor-element-13bf51f,.elementor-top-section:has(.elementor-counter),body.home .elementor-widget-spacer{display:none!important}
body.home .elementor-invisible{visibility:visible!important;opacity:1!important;animation:none!important}

/* Header must remain compact — never inherit page-section spacing. */
header .elementor-top-section,.hfe-site-header .elementor-top-section,[data-elementor-type="wp-post"][data-elementor-id="563"] .elementor-top-section{min-height:0!important;height:auto!important;padding:14px 0!important;margin:0!important}
header .elementor-container,.hfe-site-header .elementor-container{min-height:0!important}
.elementor-element-14bc5676 img{display:none!important}
.elementor-element-14bc5676 a{display:inline-grid!important;place-items:center;width:40px;height:40px;border:1px solid var(--aa-moss);border-radius:50%;color:var(--aa-forest)!important;text-decoration:none!important}
.elementor-element-14bc5676 a::after{content:"AA";font:700 11px/1 Arial,sans-serif;letter-spacing:.08em}
.hfe-nav-menu .menu-item a.hfe-menu-item{padding-left:10px!important;padding-right:10px!important;font-size:12px!important;letter-spacing:.08em!important}

/* Page sections: short, automatic and content-led. */
body.home .elementor-21>.elementor-top-section{min-height:0!important;height:auto!important;padding:56px 0!important;margin:0!important}
body.home .elementor-21>.elementor-top-section>.elementor-container,
.elementor-21 .elementor-element.elementor-element-1deb9bc>.elementor-container,
.elementor-21 .elementor-element.elementor-element-a610135>.elementor-container,
.elementor-21 .elementor-element.elementor-element-81be2d7>.elementor-container{min-height:0!important;height:auto!important}
body.home .elementor-inner-section{min-height:0!important;height:auto!important;padding:0!important;margin:0!important}
body.home .elementor-container,body.home .e-con-inner{max-width:1200px!important;width:calc(100% - 48px)!important}
body.home .elementor-widget-wrap{align-content:flex-start!important}

/* Typography. */
body.home .elementor-heading-title{overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important;text-wrap:balance;max-width:100%!important}
body.home :is(.elementor-element-04f6863,.elementor-element-91794d6,.elementor-element-d51b175,.elementor-element-8df400e,.elementor-element-b04e2a3) .elementor-heading-title{font-family:"Helvetica Neue",Arial,sans-serif!important;font-size:clamp(40px,4.3vw,64px)!important;font-weight:600!important;line-height:1.06!important;letter-spacing:-.04em!important}
body.home :is(.elementor-element-231d07b,.elementor-element-319cd22,.elementor-element-cc938b9,.elementor-element-01e43c3,.elementor-element-3cd7bb9) .elementor-heading-title{font-family:"Helvetica Neue",Arial,sans-serif!important;font-size:13px!important;font-weight:700!important;line-height:1.3!important;letter-spacing:.16em!important;text-transform:uppercase!important;color:var(--aa-moss)!important}
body.home .elementor-widget-text-editor,body.home .elementor-widget-text-editor p{text-align:left!important;word-spacing:normal!important;letter-spacing:normal!important;line-height:1.65!important}

/* Expertise cards and portfolio. */
body.home .elementor-widget-image-box .elementor-image-box-wrapper{min-height:0!important;padding:22px!important}
body.home .elementor-element-07f45fc .elementor-button{margin-top:22px}

/* Compact contact area. */
body.home .elementor-element-81be2d7{padding-block:56px!important}
body.home .elementor-element-81be2d7 form{max-width:720px;margin-inline:auto}
body.home .elementor-element-81be2d7 :is(input,textarea,select){border-radius:2px!important;box-shadow:none!important}
body.home .elementor-element-81be2d7 :is(button[type="submit"],input[type="submit"],.ff-btn-submit){background:var(--aa-moss)!important;border-color:var(--aa-moss)!important;border-radius:2px!important;color:#fff!important;box-shadow:none!important}

/* Compact footer. */
footer .elementor-element-6194f5a,footer .elementor-top-section,.site-footer .elementor-element-6194f5a{min-height:0!important;height:auto!important;padding:32px 24px!important;margin:0!important;background:var(--aa-forest)!important}
footer .elementor-element-6194f5a>.elementor-container{min-height:0!important;height:auto!important}
footer .elementor-element-d423885{padding:0!important}
footer .elementor-element-d423885 .elementor-heading-title{font-family:"Helvetica Neue",Arial,sans-serif!important;font-size:14px!important;font-weight:400!important;line-height:1.5!important;letter-spacing:.01em!important;color:rgba(255,255,255,.76)!important;max-width:none!important}
footer .elementor-element-d9ddd6c .elementor-social-icon{width:38px!important;height:38px!important;background:transparent!important;border:1px solid rgba(255,255,255,.35)!important}


/* Approved portrait integration — 3.2.1 */
body.home :is(.elementor-element-469698a,.elementor-element-f38a0b3){margin:0!important;text-align:center!important}
body.home :is(.elementor-element-469698a,.elementor-element-f38a0b3) img{display:block;width:auto!important;max-width:100%!important;height:auto!important;margin-inline:auto;object-fit:contain;object-position:center bottom}
body.home .elementor-element-469698a img{max-height:760px}
body.home .elementor-element-f38a0b3 img{max-height:700px}
@media(max-width:767px){body.home .elementor-element-469698a img{max-height:560px}body.home .elementor-element-f38a0b3 img{max-height:620px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
