/* ============ المتغيرات العامة ============ */
:root {
    --color-primary: #006b63;   /* أخضر داكن */
    --color-primary-dark: #004c45;
    --color-secondary: #f5b310; /* أصفر الهوية */
    --color-bg-light: #f5f9f9;
    --color-bg-dark: #004c45;
    --color-text: #073b3a;
    --color-text-light: #ffffff;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-fast: 0.25s ease;
}

/* ============ إعادة ضبط بسيطة ============ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #ffffff;
    color: var(--color-text);
    line-height: 1.7;
}

/* حاوية موحدة */
.container {
    width: min(1200px, 100% - 32px);
    margin-inline: auto;
}

/* عناوين الأقسام */
.section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
}

.section-title--center {
    text-align: center;
}

.section-subtitle {
    max-width: 700px;
    margin: 0.25rem auto 2rem auto;
    text-align: center;
    color: #355b58;
    font-size: 0.95rem;
}

/* الأزرار */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn--primary {
    background-color: var(--color-secondary);
    color: #20403f;
    box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
    background-color: #ffc53d;
    transform: translateY(-1px);
}

.btn--outline {
    border: 1px solid #ffffff;
    color: #ffffff;
    background-color: transparent;
}

.btn--outline:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.btn--secondary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn--secondary:hover {
    background-color: var(--color-primary-dark);
}

/* ============ الشريط العلوي ============ */

.top-bar {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    font-size: 0.8rem;
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.35rem;
}

.top-bar__left,
.top-bar__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar__icon {
    font-size: 0.9rem;
}

.top-bar .divider {
    opacity: 0.5;
}

/* ============ الهيدر والقائمة ============ */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to left, #f5b310 0%, #f5d66f 40%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.3rem;
    max-width: 1200px;   /* عرض الهيدر الجديد */
    margin: 0 auto; 
}

.header__logo {
    width: 200px;       /* حجم ثابت للمربع */
    height: 80px;       /* نفس ارتفاع الهيدر أو اللي يناسبك */
    overflow: hidden;   /* يمنع الصورة من الخروج */
}

.header__logo img {
    width: 170px;       /* تكبير اللوجو داخل المربع */
    height: auto;       /* يحافظ على النسبة */
    object-fit: cover;  /* يملأ المربع بدون تشويه */
}

/* القائمة */
.nav {
    display: flex;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    text-decoration: none;
    color: #03413c;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav__link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

/* زر موبايل */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background-color: var(--color-primary);
    padding: 4px;
}

.nav-toggle span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background-color: #ffffff;
}

/* ============ قسم الهيرو ============ */

.hero {
    position: relative;
    min-height: 70vh;
    background-image: url("../img/hero/hero-solar.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--color-text-light);
    animation: zoomHero 30s linear infinite alternate;
}

@keyframes zoomHero {
    0% { background-size: 100% auto; }
    100% { background-size: 110% auto; }
}


.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 75, 69, 0.9), rgba(0, 75, 69, 0.4));
}

.hero__content {
    position: relative;
    padding-block: 5rem;
}

.hero__title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero__subtitle {
    max-width: 600px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ============ شعارات الشركاء ============ */

.partners {
    background-color: #ffffff;
    border-bottom: 1px solid #e3eceb;
    padding-block: 1.25rem;
}

.partners__track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    animation: partners-scroll 22s linear infinite;
}

.partners__item img {
    height: 40px;
    object-fit: contain;
    filter: grayscale(0.2);
}

@keyframes partners-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============ من نحن ============ */

.about {
    padding-block: 4rem;
    background-color: var(--color-bg-light);
}

.about__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 2rem;
    align-items: center;
}

.about__image img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    object-fit: cover;
}

.about__content p {
    font-size: 0.95rem;
    color: #355b58;
    margin-bottom: 0.75rem;
}

.about__highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.about__item {
    min-width: 100px;
}

.about__num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.about__label {
    font-size: 0.85rem;
    color: #567d7a;
}

.stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 3rem;
}

.stat {
  text-align: center;
}

.number {
  font-size: 2.5rem;
  font-weight: bold;
  display: block;
  color: var(--color-primary);
}

/* ============ الخدمات ============ */

.services {
    padding-block: 4rem;
    background-color: #ffffff;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.services__card {
    background-color: #f7fbfb;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border-top: 4px solid var(--color-secondary);
}

.services__card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--color-primary-dark);
}

.services__card p {
    margin: 0;
    font-size: 0.9rem;
    color: #416664;
}

/* ============ المنتجات ============ */

.products {
    padding-block: 4rem;
    background: linear-gradient(to bottom, #ffffff, #e3f3f0);
}

.products__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

.product-card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.product-card__media {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__media img {
    max-width: 80%;
    height: auto;
}

.product-card__body {
    padding: 1.5rem;
}

.product-card__body h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: var(--color-primary-dark);
}

.product-card__body p {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #416664;
}

.product-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.product-card__link:hover {
    text-decoration: underline;
}

/* ============ المشاريع ============ */

.projects {
    padding-block: 4rem;
    background-color: #ffffff;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

.project-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

.project-card__image img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.project-card__body {
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
}

.project-card__body h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--color-primary-dark);
}

.project-card__body p {
    margin: 0;
    font-size: 0.9rem;
    color: #416664;
}

.projects__cta {
    text-align: center;
    margin-top: 2rem;
}

/* ============ الخطوات ============ */

.steps {
    padding-block: 4rem;
    background: linear-gradient(to top, var(--color-bg-dark), #0a6e64);
    color: var(--color-text-light);
}

.steps .section-title {
    color: #ffffff;
}

.steps__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.step-card {
    background-color: rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    border-top: 3px solid var(--color-secondary);
}

.step-card__icon img {
    height: 40px;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.step-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #d5f1ee;
}

/* ============ الفوتر ============ */

.footer {
    margin-top: 0;
}

.footer__top {
    background-color: #003632;
    color: #d7ece9;
    padding-block: 3rem 2rem;
}

.footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: flex-start;
}

.footer__logo {
    height: 156px;
    margin-bottom: 0.75rem;
}

.footer__column p {
    font-size: 0.9rem;
    margin: 0;
}

.footer__column h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #ffffff;
}

.footer__column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__column ul li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.footer__column a {
    color: #d7ece9;
    text-decoration: none;
}

.footer__column a:hover {
    text-decoration: underline;
}

.footer__contact li {
    line-height: 1.6;
}

.footer__bottom {
    background-color: #002320;
    color: #a0c8c3;
    font-size: 0.8rem;
    padding-block: 0.7rem;
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* زر عائم للاتصال */
.floating-call {
    position: fixed;
    bottom: 18px;
    left: 18px;
    background-color: var(--color-secondary);
    color: #234442;
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 60;
}

/* ============ استجابة الشاشات الصغيرة ============ */

@media (max-width: 992px) {
    .about__inner {
        grid-template-columns: 1fr;
    }

    .services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products__grid,
    .projects__grid,
    .steps__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .top-bar__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        inset-inline: 0;
        top: 100%;
        background-color: #ffffff;
        border-bottom: 1px solid #e0ecea;
        transform-origin: top;
        transform: scaleY(0);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition-fast), opacity var(--transition-fast);
    }

    .nav.open {
        transform: scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 1.25rem 1rem 1.25rem;
        gap: 0.75rem;
    }

    .hero {
        min-height: 65vh;
    }

    .hero__content {
        padding-block: 4rem;
    }

    .services__grid,
    .products__grid,
    .projects__grid,
    .steps__grid,
    .footer__inner {
        grid-template-columns: 1fr;
    }

    .footer__bottom-inner {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .floating-call {
        left: 50%;
        transform: translateX(-50%);
        bottom: 12px;
    }
}

/* === أنميشن ظهور الأرقام (Fade In Up) === */
.stat {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
}

.stat:nth-child(1) { animation-delay: 0.3s; }
.stat:nth-child(2) { animation-delay: 0.5s; }
.stat:nth-child(3) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === أنيميشن فتح القائمة في الموبايل === */
.nav {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* عداد الأرقام */
.number {
    display: inline-block;
    font-weight: 700;
    color: var(--color-primary);
    transition: all 0.3s ease;
}
