/* -------------------------------------- */
/* 1. Global Reset, Typography, and Variables */
/* -------------------------------------- */
:root {
    /* Professional Color Palette (Dark Teal/Green & Gold Accent) */
    --primary-color: #004d40; /* Deep Teal */
    --secondary-color: #ffb300; /* Amber Gold */
    --text-color: #333;
    --light-bg: #f5f5f5;
    --spacing-unit: 1.5rem;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    scroll-behavior: smooth;
}

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

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

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

/* Titles and Headers */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-size: 1.1rem;
    color: #666;
}

/* -------------------------------------- */
/* 2. Header and Navigation (Leveraging Bootstrap) */
/* -------------------------------------- */
.site-header {
    background-color: #fff;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color) !important; 
    text-decoration: none;
}

.navbar-nav .nav-link {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px 18px;
    display: block;
    transition: color 0.3s;
    font-weight: 500;
    font-size: 17px;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color);
}

.navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1); 
}

/* -------------------------------------- */
/* 3. Buttons */
/* -------------------------------------- */
.btn {
    padding: 12px 25px;
    border: 2px solid transparent;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #00695c;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #ffd740;
}

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

.btn-text {
    background: none;
    color: var(--primary-color);
    padding: 5px 0;
}

/* -------------------------------------- */
/* 4. Hero Section (with Opacity Overlay) */
/* -------------------------------------- */
.hero-section {
    background: #004d40 url('images/bg.jpg') no-repeat center center; 
    background-size: cover;
    min-height: 80vh;
    display: flex;
    align-items: center;
    color: #fff;
    text-align: left; 
    position: relative; 
    z-index: 1; 
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 2; 
}

.hero-inner {
    position: relative;
    z-index: 3; 
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-unit);
    line-height: 1.2;
}

.lead-text {
    font-size: 1.35rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    opacity: 0.9;
}

/* -------------------------------------- */
/* 5. Product Grid (CSS Grid) */
/* -------------------------------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: calc(var(--spacing-unit) * 1.5);
}

.product-card {
    background-color: #fff;
    border: none; 
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light); 
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px); 
    box-shadow: var(--shadow-hover);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 4px solid var(--secondary-color); 
}

.card-body {
    padding: var(--spacing-unit);
}

.card-body h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

/* -------------------------------------- */
/* 6. Quality Features (CSS Grid) */
/* -------------------------------------- */

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: calc(var(--spacing-unit) * 2);
    text-align: center;
    padding: var(--spacing-unit) 0;
}

.feature-item {
    padding: var(--spacing-unit);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.feature-item .icon {
    font-size: 2rem;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 10px;
}

.feature-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* -------------------------------------- */
/* 7. Call to Action (CTA) */
/* -------------------------------------- */
.call-to-action {
    background-color: var(--primary-color);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.call-to-action h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* -------------------------------------- */
/* 8. Footer (CSS Grid) */
/* -------------------------------------- */
.site-footer {
    background-color: #222; 
    color: #fff;
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; 
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: 30px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0; /* تأكد من إزالة الـ padding الافتراضي في القوائم */
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px 0;
    text-align: center;
}

.social-media a {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 10px;
    text-decoration: none;
}

/* -------------------------------------- */
/* 9. Media Queries (Responsiveness) */
/* -------------------------------------- */

/* Tablet & Smaller Desktop Adjustments (Less than 1024px) */
@media (max-width: 1024px) {
    .feature-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
    
    /* عند الأجهزة اللوحية، نجعل جميع أعمدة الفوتر بنفس الحجم تقريبا */
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
        gap: var(--spacing-unit);
    }
}

/* Mobile Adjustments (Less than 768px) */
@media (max-width: 768px) {
    
    /* Center text on mobile */
    .hero-text {
        text-align: center;
        max-width: 100%;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }

    /* FIX: Footer transforms to stacked columns and centers content */
    .footer-grid {
        display: block; 
        text-align: center;
    }
    
    .footer-col {
        margin-bottom: calc(var(--spacing-unit) * 1.5);
    }
    
    .footer-links ul,
    .footer-legal ul {
        display: flex;
        justify-content: center;
        gap: 15px; 
    }
    
    .footer-links ul li,
    .footer-legal ul li {
        display: inline-block; 
    }
    
    .footer-col ul li a {
        display: inline;
        padding: 0;
    }
    
    .footer-info {
        padding-bottom: var(--spacing-unit);
        border-bottom: 1px solid #333;
    }
}

/* Mobile Adjustments (Less than 480px) */
@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }

    .product-grid {
        /* Forces a single column on very small screens */
        grid-template-columns: 1fr; 
    }
}