/* ==========================================================================
   CSS Variables & Resets
   ========================================================================== */
:root {
    --primary-color: #0f7a35;
    --primary-light: #189e47;
    --primary-dark: #0a5725;
    --secondary-color: #f2fbf5;
    --text-dark: #222222;
    --text-light: #555555;
    --bg-light: #fdfdfd;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;

    --font-main: 'Almarai', sans-serif;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 5px 15px rgba(15, 122, 53, 0.08);
    --shadow-lg: 0 10px 25px rgba(15, 122, 53, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.7;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.bg-light {
    background-color: var(--secondary-color);
}

.w-100 {
    width: 100%;
}

.mb-4 {
    margin-bottom: 2rem;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50%;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.section-title.text-center::after {
    right: 50%;
    transform: translateX(50%);
}

.section-desc {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    font-family: var(--font-main);
}

.btn--primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn--primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn--outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn--login {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    border: none;
    padding: 10px 25px;
}

.btn--login:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
    padding: 10px 0;
}

.header.scrolled {
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar__logo img {
    height: 80px;
}

.navbar__list {
    display: flex;
    gap: 25px;
}

.navbar__link {
    font-weight: 700;
    color: #555;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.navbar__link:hover::after,
.navbar__link.active::after {
    width: 100%;
}

.navbar__link:hover,
.navbar__link.active {
    color: var(--primary-color);
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar__toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: right;
    background: transparent;
    padding-top: 80px;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('img/background 1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero__overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(69, 148, 87, 0.583);
    /* Semi-transparent green overlay */
    z-index: 2;
}

.hero__content {
    position: relative;
    z-index: 3;
    color: var(--bg-white);
    max-width: 1000px;
    margin-right: 0;
    margin-left: auto;
    padding-right: 70px;
    /* Added right padding as requested */
}

.hero__subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.5;
    /* Slightly increased for better readability with Almarai */
    font-weight: 800;
    margin-bottom: 20px;
}

.hero__highlight {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero__desc {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.8;
}

.hero__btn {
    padding: 12px 35px;
    font-size: 1.1rem;
    background-color: #216f4d;
    color: var(--bg-white);
    border: none;
}

.hero__btn:hover {
    background-color: var(--primary-dark);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about__inner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about__content {
    flex: 1;
}

.about__image {
    flex: 1;
    position: relative;
}

.about__image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.about__desc {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.about__cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-right: 4px solid var(--primary-color);
    transition: var(--transition);
}

.about-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-5px);
}

.about-card__icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.about-card__text h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    background-color: var(--primary-color);
    color: var(--bg-white);
    position: relative;
    background-image: url('img/background 3.png');
    background-size: cover;
    background-position: center;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 122, 52, 0.48);
    /* Semi-transparent green overlay */
    z-index: 1;
}

.services .container {
    position: relative;
    z-index: 2;
}

.services .section-title {
    color: var(--bg-white);
}

.services .section-title::after {
    background-color: var(--bg-white);
}

.services__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.service-card {
    flex: 0 1 calc(33.333% - 20px);
    /* Max 3 cards per row */
    min-width: 300px;
    /* Ensure they don't get too small */
    max-width: 350px;
    /* Specific width similar to image */
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    background-color: var(--bg-white);
    color: var(--text-dark);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-card__icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--bg-white);
    transition: var(--transition);
}

.service-card:hover .service-card__icon {
    color: var(--primary-color);
}

.service-card__title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.service-card:hover .service-card__title {
    color: var(--primary-color);
}

.service-card__desc {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features__inner {
    display: flex;
    align-items: stretch;
    /* makes image stretch to match content height */
    gap: 40px;
}

.features__image {
    flex: 1;
    min-width: 0;
}

.features__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    /* nice rounded corners as requested */
    display: block;
}

.features__content {
    flex: 1;
    min-width: 0;
}

.features__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 items per row */
    gap: 15px;
    margin-top: 20px;
}

.features__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background-color: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.features__item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.features__icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.features__text h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-weight: 700;
}

.features__text p {
    font-size: 0.82rem;
    line-height: 1.5;
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */
.pricing {
    position: relative;
    background-image: url('img/backgorund 2.webp');
    background-size: cover;
    background-position: center;
    background-color: #f9fdfa;
    /* Light fallback color */
}

.pricing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    /* Light overlay to make text readable */
    z-index: 1;
}

.pricing .container {
    position: relative;
    z-index: 2;
}

.pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
    /* Make cards same height */
    justify-content: center;
}

.pricing-card {
    background-color: #edf7ee;
    /* soft light green like the image */
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    position: relative;
    border: 1px solid #b8dfc0;
    text-align: right;
    padding: 25px 25px 20px;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.pricing-card__header {
    margin-bottom: 0;
}

.pricing-card__title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: right;
    /* removed underline */
}

.pricing-card__price {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    /* right-aligned (RTL) */
    gap: 8px;
    direction: rtl;
}

.pricing-card__price .amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
}

.pricing-card__price .currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.pricing-card__divider {}

/* divider between basic info rows and feature/check rows */
.pricing-card__section-divider {
    height: 1px;
    background-color: rgba(15, 122, 53, 0.3);
    margin: 8px 0;
    width: 100%;
}

.pricing-card__body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
    text-align: right;
}

.pricing-card__features li {
    padding: 7px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: right;
    /* borders removed - only the section-divider separates groups */
}

.pricing-card__features li:last-child {
    border-bottom: none;
}

/* icon items: text on right, icon on left (RTL layout) */
.pricing-card__features--icons li.has-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* in RTL context, flex-start = right side */
    flex-direction: row;
    /* text first (right side), icon last (left side) */
    gap: 8px;
    color: #444;
    font-weight: 500;
    font-size: 0.88rem;
    text-align: right;
}

.pricing-card__features--icons li.has-icon i {
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pricing-card__offer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    direction: rtl;
    margin: 5px 0 5px;
}

.pricing-card__btn {
    width: 100%;
    margin-top: auto;
    font-size: 1.2rem;
    padding: 12px;
}

.pricing-card__badge {
    position: absolute;
    top: 20px;
    left: -35px;
    background-color: #ff9800;
    color: white;
    padding: 5px 40px;
    transform: rotate(-45deg);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pricing-card__header {
    background-color: var(--secondary-color);
    padding: 40px 20px;
    border-bottom: 2px solid var(--primary-color);
}

.pricing-card--active .pricing-card__header {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.pricing-card__title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.pricing-card__price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 5px;
}

.pricing-card__price .amount {
    font-size: 3rem;
    font-weight: 800;
}

.pricing-card__price .currency {
    font-size: 1.2rem;
    font-weight: 600;
}

.pricing-card__header .period {
    font-size: 0.9rem;
    opacity: 0.8;
}

.pricing-card__body {
    padding: 30px 20px;
}

.pricing-card__features {
    text-align: right;
    margin-bottom: 30px;
}

.pricing-card__features li {
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-card__features li i {
    color: var(--primary-color);
}

.pricing-card__btn {
    width: 100%;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
/* Slider */
.testimonials__slider {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.slider__track-wrapper {
    overflow: hidden;
    flex: 1;
    border-radius: 12px;
}

.slider__track {
    display: flex;
    gap: 15px;
    /* Added gap strictly here to be safe and responsive */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.slider__slide {
    flex: 0 0 calc(25% - 11.25px);
    /* 4 items -> total gaps = 3 * 15px = 45px. 45/4 = 11.25px */
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
}

@media (max-width: 992px) {
    .slider__slide {
        flex: 0 0 calc(33.333% - 10px);
    }
}

@media (max-width: 768px) {
    .slider__slide {
        flex: 0 0 calc(50% - 7.5px);
    }
}

@media (max-width: 576px) {
    .slider__slide {
        flex: 0 0 100%;
    }
}

.slider__slide img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    background-color: #f0f7f2;
    border-radius: 12px;
}

/* Navigation Buttons */
.slider__btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.slider__btn:hover {
    background-color: #0a5c28;
    transform: scale(1.1);
}

/* Dots */
.slider__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
    padding: 0;
}

.slider__dot.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
}

/* ==========================================================================
   Footer & Contact Section
   ========================================================================== */
.footer {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    padding-top: 80px;
}

.footer__inner {
    display: flex;
    gap: 60px;
    margin-bottom: 50px;
}

.footer__info {
    flex: 1;
}

.footer__form-wrapper {
    flex: 1;
}

.footer__logo {
    height: 60px;
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
}

.footer__title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer__desc {
    opacity: 0.8;
    margin-bottom: 30px;
    line-height: 1.8;
}

.footer__contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.contact-item:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.contact-item i {
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

.contact-form {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 122, 53, 0.1);
    background-color: var(--bg-white);
}

.footer__bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    opacity: 0.8;
    font-size: 0.95rem;
}

/* ==========================================================================
   Floating WhatsApp
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   Responsive Design & Media Queries
   ========================================================================== */
@media (max-width: 992px) {

    .about__inner,
    .features__inner,
    .footer__inner {
        flex-direction: column;
        gap: 40px;
    }

    .hero__title {
        font-size: 2.8rem;
    }

    .pricing-card--active {
        transform: scale(1);
    }

    .pricing-card--active:hover {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    .hero__title {
        font-size: 2.2rem;
    }

    .navbar__toggle {
        display: block;
    }

    .navbar__menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: var(--shadow-md);
        display: none;
        flex-direction: column;
        padding: 20px;
        transition: var(--transition);
        border-top: 1px solid var(--border-color);
    }

    .navbar__menu.active {
        display: flex;
    }

    .navbar__list {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .navbar__link {
        color: var(--text-dark);
        display: block;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar__link::after {
        display: none;
    }

    .navbar__link:hover,
    .navbar__link.active {
        color: var(--primary-color);
        padding-right: 10px;
    }

    .contact-form {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .hero__title {
        font-size: 1.8rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .pricing__grid {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
}