:root {
    --primary-dark: #234A2A;
    --primary-light: #386641;
    --accent-yellow: #FFC20A;
    --text-dark: #2F2F2F;
    --bg-light: #FFFFFF;
    --footer-bg: #EFEFEF;
    --font-main: 'Kalameh', 'Vazirmatn', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: #fcfcfc;
    background-image: radial-gradient(#e5e5e5 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Header */
header {
    background: linear-gradient(105deg, var(--primary-light) 0%, var(--primary-dark) 55%, transparent 55.1%);
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
}

header .container {
    display: flex;
    justify-content: flex-start;
    /* Changed from space-between */
    align-items: center;
}

.logo {
    margin-left: auto;
    /* Pushes the rest (Nav + Actions) to the left */
}

.logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.main-nav a:hover {
    color: var(--accent-yellow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 40px;
    /* Space between Nav and Actions */
}

/* ... existing button styles ... */

/* Hero Section */
.hero {
    /* Removed the previous gradient standard background */
    /* background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-light) 100%); */
    background: transparent;
    color: var(--text-dark);
    /* Changed from #fff since background is white now */
    padding-top: 150px;
    padding-bottom: 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    /* Optional: If we want the green angle to extend down the hero section like in the photo */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(105deg, var(--primary-dark) 0%, var(--primary-light) 50%, transparent 50.1%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Services */
.services {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Blog Section */
.blog-section {
    padding: 80px 0;
    background: #f9f9f9;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 15px;
}

/* Footer */
footer {
    background: var(--footer-bg);
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    width: 218px;
    height: 218px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-contact p {
    margin-bottom: 10px;
    font-weight: bold;
}

.copy-right {
    text-align: center;
    border-top: 1px solid #ccc;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        /* Add JS toggle later or just stack */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-dark);
        padding: 20px;
        text-align: center;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-actions {
        display: none;
        /* Simplify for mobile or move */
    }

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

/* Hero Stats */
.hero-stats-box {
    background: #DDDDDD;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    padding: 2px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stat-number {
    color: #2F2F2F;
    font-size: 20px;
    font-weight: 800;
    margin-left: 5px;
}

.stat-label {
    color: #2F2F2F;
    font-size: 18px;
    font-weight: 300;
}

/* Ensure Hero Text is visible on white background */
.hero-text h1 {
    color: var(--text-dark);
}

.hero-text p {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    line-height: 1.8;
}

/* Mobile Menu Fix for new layout */
@media (max-width: 768px) {
    .header-actions {
        display: none;
    }

    .hero::before {
        background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    }

    .hero-text h1 {
        color: #fff;
    }

    .hero-text p {
        color: #eee;
    }
}

/* Services Filter */
.services-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid #ccc;
    padding: 8px 25px;
    border-radius: 20px;
    font-family: var(--font-main);
    color: #666;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
}

/* Mission Section */
.mission-section {
    padding: 80px 0;
    position: relative;
    background-color: #fcfcfc;
    /* Or matching pattern */
    margin-top: 50px;
}

.mission-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.mission-text-box {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-right: 4px solid var(--primary-dark);
}

.mission-text-box h2 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 2rem;
    font-weight: 900;
}

.mission-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: #e0e0e0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mission-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.m-stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.m-stat-num {
    color: var(--primary-light);
    font-size: 24px;
    font-weight: 800;
}

.m-stat-desc {
    color: #666;
    font-size: 14px;
}

/* Main Footer Design */
.main-footer {
    width: 100%;
    min-height: 400px;
    margin-top: 100px;
    padding: 0;
    /* Padding handled by flex items */
    position: relative;
    background-color: #f5f5f5;
    /* Light grey background for the right side */
    overflow: hidden;
}

/* Green Curved Background Shape */
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    /* RTL: Visual Left */
    width: 65%;
    /* Covers left side */
    height: 100%;
    background-color: #34603B;
    border-top-right-radius: 200px;
    /* The Curve */
    z-index: 1;
    /* Pattern */
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
    z-index: 2;
    /* Above the background */
    padding: 60px 0;
}

/* Right Column (Logos - White Area) */
.footer-right-col {
    width: 35%;
    /* Fixed matching the white space */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 50px;
}

.footer-logo img {
    max-width: 180px;
    margin-bottom: 25px;
}

.copyright-text p {
    color: #666;
    font-size: 0.95rem;
    font-weight: bold;
}

.copyright-text .highlight {
    font-weight: 900;
    color: #000;
}

/* Left Column (Contact - Green Area) */
.footer-left-col {
    width: 60%;
    /* Matches green area width somewhat */
    color: #fff;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align content to Right (which is css-left in RTL usually, wait. RTL context: flex-end is Left.) */
    /* Let's double check direction: rtl */
    /* In RTL: flex-start is Right. flex-end is Left. */
    /* We want alignment to the visual LEFT (Green side). So flex-end is correct. */
    align-items: flex-end;
}

.footer-address {
    margin-bottom: 40px;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 2;
    text-align: right;
    /* Text alignment should be natural reading (Right to left) */
    width: 100%;
    max-width: 700px;
}

.footer-address .label {
    color: #fff;
    /* White Text */
    font-weight: 900;
    font-size: 1.2rem;
}

.footer-actions {
    display: flex;
    align-items: flex-end;
    /* Align bottom */
    gap: 15px;
    width: 100%;
    justify-content: flex-end;
    /* Push to Left (visual) */
}

/* Enamad Box */
.footer-enamad {
    background: #fff;
    border-radius: 20px;
    padding: 10px;
    border-bottom: 6px solid #FDC800;
    /* Distinct Yellow */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-enamad img {
    max-width: 100%;
    max-height: 100%;
}

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

/* Phone Box */
.phone-box {
    background: #fff;
    border-radius: 15px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 6px solid #FDC800;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: #333;
    font-weight: 900;
    font-size: 1.4rem;
    /* Specific font size from image */
    height: 60px;
    /* Uniform height */
}

/* Social Box - Wrapper for icons */
.social-box {
    display: flex;
    gap: 10px;
}

.social-box a {
    background: #fff;
    border-radius: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 6px solid #FDC800;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.social-box a:hover {
    transform: translateY(-3px);
}

.social-box a img {
    width: 30px;
    height: 30px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .main-footer {
        height: auto;
        background: #34603B;
        /* Full Green */
    }

    .main-footer::before {
        display: none;
        /* Remove curve on mobile */
    }

    .footer-flex {
        flex-direction: column-reverse;
        gap: 50px;
    }

    .footer-right-col {
        width: 90%;
        background: #fff;
        /* Card look */
        padding: 30px;
        border-radius: 20px;
    }

    .footer-left-col {
        width: 100%;
        align-items: center;
        padding: 0 20px;
    }

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

    .footer-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Stack contact on mobile */
    .contact-group {
        flex-direction: column;
    }
}

/* Refined Header & Button Styles via Figma Parity */
header {
    /* More curved gradient approximation */
    background: linear-gradient(115deg, var(--primary-light) 0%, var(--primary-dark) 45%, transparent 45.1%);
}

.contact-box {
    background: var(--accent-yellow);
    border-radius: 20px;
    /* More rounded */
    padding: 8px 20px;
    font-weight: bold;
    color: var(--text-dark);
    border-bottom: 6px solid #FFF;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-box a {
    color: var(--text-dark);
}

/* Mobile Responsiveness for new sections */
@media (max-width: 900px) {
    .mission-content {
        flex-direction: column;
        text-align: center;
    }

    .mission-text-box {
        border-right: none;
        border-top: 4px solid var(--primary-dark);
    }

    header {
        background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    }

}

/* About Section */
.about-section {
    padding: 60px 0;
    position: relative;
    background-color: transparent;
}

.about-header-pill {
    background: #fff;
    border-radius: 50px;
    padding: 8px 25px;
    display: table;
    margin: 0 auto 50px;
    /* Centered */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    font-weight: bold;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eee;
}

.about-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
    margin-bottom: 60px;
}

.about-text-col {
    flex: 1;
}

.about-desc {
    margin-bottom: 25px;
    text-align: justify;
    color: #444;
    line-height: 1.9;
}

/* Mission Box inside text column */
.mission-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.mission-box h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.mission-box p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Images Column */
.about-images-col {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    /* Fixed height for positioning context */
}

.img-main {
    width: 80%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    border: 1px solid #333;
    /* Dark border as per image */
}

.img-float-top {
    position: absolute;
    top: -20px;
    right: 0;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    z-index: 3;
    border: 3px solid #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.img-float-bottom {
    position: absolute;
    bottom: -20px;
    left: 10px;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    z-index: 3;
    border: 3px solid #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Stats Row */
.about-stats-row {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.9;
}

.stat-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    /* RTL */
}

.stat-num {
    font-size: 26px;
    font-weight: 900;
    color: #4CAF50;
    /* Green explicitly */
}

.stat-label {
    font-size: 14px;
    color: #555;
}

.stat-icon {
    width: 40px;
    height: 40px;
    opacity: 0.5;
    /* If using placeholder svg */
}

@media (max-width: 900px) {
    .about-content-wrapper {
        flex-direction: column;
        gap: 60px;
    }

    .about-images-col {
        width: 100%;
        height: auto;
        min-height: 350px;
    }

    .img-main {
        width: 90%;
    }

    .about-stats-row {
        gap: 30px;
    }
}