/*
Theme Name: Gidi Halaf
Theme URI: https://gidihalaf.com
Author: Shahar Ariel
Author URI: https://shaharariel.com
Description: Professional theme for Eng. Gidi Halaf — Process Development & Scale Up consulting.
Version: 1.1.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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gidi-halaf
*/

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
    --gh-blue: #5BA4C9;
    --gh-blue-dark: #4A8FB3;
    --gh-blue-light: #E8F4F9;
    --gh-black: #222222;
    --gh-dark: #333333;
    --gh-gray: #666666;
    --gh-gray-light: #999999;
    --gh-border: #CCCCCC;
    --gh-bg: #FFFFFF;
    --gh-bg-light: #F5F5F5;
    --gh-bg-footer: #F0F0F0;

    --font-heading: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
    --font-body: 'Assistant', 'Arial Hebrew', Arial, sans-serif;

    --container-max: 900px;
    --container-padding: 2rem;
    --header-height: 4rem;

    --transition-base: 300ms ease;
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
[id] { scroll-margin-top: calc(var(--header-height) + 1rem); }
body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    background: var(--gh-bg);
    color: var(--gh-black);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gh-blue); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--gh-blue-dark); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--gh-blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    transform: translateY(0);
    will-change: transform;
}
.site-header__inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-header__logo {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gh-blue);
}
.site-header__nav {
    display: flex;
    gap: 2rem;
}
.site-header__nav a,
.site-header__nav-link {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gh-dark);
    transition: color var(--transition-base);
}
.site-header__nav a:hover,
.site-header__nav-link:hover {
    color: var(--gh-blue);
}

/* WordPress nav menu reset */
.site-header__nav .menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-header__nav .menu-item a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gh-dark);
    transition: color var(--transition-base);
}
.site-header__nav .menu-item a:hover {
    color: var(--gh-blue);
}

/* Language Switcher (inline He | En) */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-inline-start: 1.5rem;
    border-inline-start: 1px solid var(--gh-border);
    padding-inline-start: 1.5rem;
}
.lang-switcher__link {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gh-gray-light);
    transition: color var(--transition-base);
}
.lang-switcher__link--active {
    font-weight: 700;
    color: var(--gh-blue);
}
.lang-switcher__link:hover {
    color: var(--gh-blue);
}
.lang-switcher__sep {
    font-size: 0.75rem;
    color: var(--gh-border);
    user-select: none;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--gh-bg);
    overflow: hidden;
    border-bottom: 3px solid var(--gh-blue);
}
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.hero__bg-inner {
    width: 60%;
    max-width: 800px;
    aspect-ratio: 438.3 / 277.8;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    opacity: 0.6;
}
.hero__content {
    position: relative;
    z-index: 1;
}
.hero__prefix {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--gh-dark);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    opacity: 0;
}
.hero__name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--gh-black);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    opacity: 0;
}
.hero__title {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 400;
    color: var(--gh-black);
    letter-spacing: 0.02em;
    opacity: 0;
}
.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0;
}
.hero__scroll svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--gh-blue);
    stroke-width: 2;
}

/* ═══════════════════════════════════════════
   ABOUT HERO
   ═══════════════════════════════════════════ */
.about-hero {
    position: relative;
    width: 100%;
    min-height: 500px;
    overflow: hidden;
    clip-path: inset(100% 0 0 0);
}
.about-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.about-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.about-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}
.about-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0 auto;
    padding: 5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px;
}
.about-hero__heading {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
}

/* ═══════════════════════════════════════════
   BIO TEXT
   ═══════════════════════════════════════════ */
.bio {
    padding: 3rem 0 2rem;
}
.bio__text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gh-dark);
    text-align: start;
}
.bio__text p {
    margin-bottom: 0.5rem;
}
.bio__collapse {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease;
}
.bio__collapse.expanded {
    max-height: 1000px;
}
.bio__collapse:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}
.bio__read-more {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gh-blue);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    padding: 0;
}
.bio__read-more:hover {
    color: var(--gh-blue-dark);
}

/* ═══════════════════════════════════════════
   SECTION SHARED STYLES
   ═══════════════════════════════════════════ */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gh-blue);
    text-align: start;
    padding: 2rem 0 1.5rem;
}

/* ═══════════════════════════════════════════
   EDUCATION
   ═══════════════════════════════════════════ */
.education {
    padding-bottom: 2rem;
}
.education__item {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: start;
}
.education__year {
    font-weight: 700;
    color: var(--gh-black);
}
.education__degree {
    color: var(--gh-dark);
}
.education__patents {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gh-gray);
    text-align: start;
}

/* ═══════════════════════════════════════════
   SERVICES (ACCORDION)
   ═══════════════════════════════════════════ */
.services {
    padding-bottom: 2rem;
}
.accordion__item {
    border: 1px solid var(--gh-border);
    margin-bottom: -1px;
    overflow: hidden;
}
.accordion__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gh-black);
    background: var(--gh-bg);
    border: none;
    cursor: pointer;
    text-align: start;
    transition: background 0.4s ease, color 0.4s ease;
}
.accordion__header[aria-expanded="true"] {
    background: var(--gh-blue);
    color: #FFFFFF;
}
.accordion__icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}
.accordion__panel {
    height: 0;
    overflow: hidden;
}
.accordion__panel-inner {
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--gh-dark);
    background: var(--gh-bg-light);
    border-top: 1px solid var(--gh-border);
}

/* ═══════════════════════════════════════════
   DISTRIBUTION
   ═══════════════════════════════════════════ */
.distribution {
    padding-bottom: 2.5rem;
}
.distribution__text {
    text-align: start;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gh-dark);
}

/* ═══════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════ */
.contact {
    padding-bottom: 2.5rem;
}
.contact__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
}
.contact__form {
    width: 100%;
}
.contact__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.contact__field {
    position: relative;
    margin-bottom: 1.25rem;
}
.contact__input {
    width: 100%;
    padding: 1.25rem 0.75rem 0.5rem;
    border: 1px solid var(--gh-border);
    border-radius: 0;
    background: var(--gh-bg);
    font-size: 0.9rem;
    color: var(--gh-black);
    transition: border-color var(--transition-base);
}
.contact__input:focus {
    border-color: var(--gh-blue);
    outline: none;
}
.contact__label {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.75rem;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gh-gray-light);
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: start center;
}
.contact__input:focus ~ .contact__label,
.contact__input:not(:placeholder-shown) ~ .contact__label {
    top: 0.4rem;
    transform: translateY(0);
    font-size: 0.7rem;
    color: var(--gh-blue);
}
textarea.contact__input {
    min-height: 100px;
    resize: vertical;
}
textarea.contact__input ~ .contact__label {
    top: 0.85rem;
    transform: translateY(0);
}
textarea.contact__input:focus ~ .contact__label,
textarea.contact__input:not(:placeholder-shown) ~ .contact__label {
    top: 0.4rem;
    font-size: 0.7rem;
    color: var(--gh-blue);
}
.contact__submit {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: var(--gh-blue);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
    width: 100%;
    text-align: center;
}
.contact__submit:hover {
    background: var(--gh-blue-dark);
}
.contact__consent {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gh-gray);
}
.contact__consent input[type="checkbox"] {
    accent-color: var(--gh-blue);
}
.contact__info {
    text-align: start;
    padding-top: 0.5rem;
}
.contact__info-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gh-black);
    margin-bottom: 0.5rem;
}
.contact__info-detail {
    font-size: 0.9rem;
    color: var(--gh-gray);
    line-height: 1.8;
    direction: ltr;
    text-align: start;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
    background: var(--gh-bg-footer);
    border-top: 1px solid var(--gh-border);
    padding: 1.25rem 0;
}
.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-footer__name {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gh-black);
}
.site-footer__links {
    display: flex;
    gap: 1.5rem;
}
.site-footer__link {
    font-size: 0.8rem;
    color: var(--gh-gray);
    transition: color var(--transition-base);
}
.site-footer__link:hover {
    color: var(--gh-blue);
}

/* WordPress footer menu reset */
.site-footer__links .menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer__links .menu-item a {
    font-size: 0.8rem;
    color: var(--gh-gray);
    transition: color var(--transition-base);
}
.site-footer__links .menu-item a:hover {
    color: var(--gh-blue);
}

/* ═══════════════════════════════════════════
   PAGE CONTENT (inner pages)
   ═══════════════════════════════════════════ */
.page-content {
    padding: calc(var(--header-height) + 3rem) 0 3rem;
    min-height: 60vh;
}
.page-content .container {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gh-dark);
    text-align: start;
}

/* ═══════════════════════════════════════════
   COOKIE CONSENT BANNER
   ═══════════════════════════════════════════ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 9999;
    background: var(--gh-black);
    color: #FFFFFF;
    padding: 1rem 0;
}
.cookie-consent__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.cookie-consent__text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}
.cookie-consent__btn {
    flex-shrink: 0;
    padding: 0.5rem 1.75rem;
    background: var(--gh-blue);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
}
.cookie-consent__btn:hover {
    background: var(--gh-blue-dark);
}

/* ═══════════════════════════════════════════
   REVEAL ANIMATION
   ═══════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translate(30px, 30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
html[dir="ltr"] .reveal {
    transform: translate(-30px, 30px);
}
.reveal--visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .site-header__nav {
        gap: 1rem;
    }
    .site-header__nav a,
    .site-header__nav-link,
    .site-header__nav .menu-item a {
        font-size: 0.8rem;
    }
    .about-hero__inner {
        padding: 3rem 1.5rem;
        min-height: 350px;
    }
    .contact__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .contact__info {
        text-align: start;
    }
    .contact__row {
        grid-template-columns: 1fr;
    }
    .site-footer__inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: start;
    }
    .cookie-consent__inner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1.25rem;
    }
    .hero__name {
        font-size: 2.25rem;
    }
    .about-hero__heading {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
}

/* ═══════════════════════════════════════════
   LTR OVERRIDES (English)
   ═══════════════════════════════════════════ */
html[dir="ltr"] .about-hero__overlay {
    background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 100%);
}

/* ═══════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .hero__prefix, .hero__name, .hero__title, .hero__scroll { opacity: 1; }
}