/* --- MAFAZ GROUP FINAL CSS --- */
:root {
    --primary: #0f172a;       /* Deep Navy */
    --accent: #0284c7;        /* Industrial Blue */
    --gold: #d4af37;          /* Elegant Highlight */
    --light: #f8fafc;         /* Off-white background */
    --text: #334155;          /* Readable Slate */
    --white: #ffffff;
}

/* RESET & TYPOGRAPHY */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
}

/* NAV */
header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; }
.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: 0.3s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--white);
    border-bottom: 2px solid var(--accent);
}
.cta-btn {
    background: var(--accent);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    color: white !important;
    border-bottom: none !important;
}

/* HERO SECTIONS */
.hero {
    /* Industrial Background Image */
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    height: 85vh; /* Taller hero */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; letter-spacing: -1px; }
.hero p { font-size: 1.25rem; max-width: 700px; margin: 0 auto 2.5rem auto; color: #cbd5e1; }

.inner-hero {
    background: var(--primary);
    padding: 5rem 2rem;
    text-align: center;
    color: white;
}
.inner-hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }

/* SECTIONS & LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; }

/* Text Section (About Us) */
.text-section { text-align: center; max-width: 800px; margin: 0 auto 4rem auto; }
.text-section h2 { color: var(--primary); font-size: 2.5rem; margin-bottom: 1rem; }
.text-section p { font-size: 1.1rem; color: #64748b; }

/* GRIDS */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 3rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }

/* STANDARD CARD (For Products) */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent);
    transition: transform 0.3s ease;
    height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.card h3 { color: var(--primary); margin-bottom: 1rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.5rem; }
.card ul { list-style: none; }
.card li { margin-bottom: 0.5rem; padding-left: 1.2rem; position: relative; }
.card li::before { content: "•"; color: var(--accent); font-weight: bold; position: absolute; left: 0; }

/* --- NEW: PHOTO CARDS (For Home Page Divisions) --- */
.image-card {
    position: relative;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    background: #000; /* Fallback */
}
.image-card:hover { transform: translateY(-8px); box-shadow: 0 25px 30px -5px rgba(0,0,0,0.4); }

.card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    opacity: 0.8;
}
.image-card:hover .card-bg { transform: scale(1.1); opacity: 0.6; }

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.95));
    z-index: 2;
}

.card-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 2rem;
}
.card-content h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.card-content p { font-size: 0.95rem; color: #e2e8f0; line-height: 1.4; opacity: 0.9; }

/* --- NEW: WHY US SECTION --- */
.features-section { background: var(--white); border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.feature-box { text-align: center; padding: 2rem; }
.feature-icon { font-size: 3rem; margin-bottom: 1rem; display: inline-block; }
.feature-box h4 { color: var(--primary); font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-box p { color: #64748b; font-size: 0.95rem; }

/* TABLES */
.tech-table { width: 100%; border-collapse: collapse; margin: 2rem 0; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.tech-table th, .tech-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.tech-table th { background: #e2e8f0; color: var(--primary); font-weight: 600; }

/* FORM */
.form-box { background: white; padding: 3rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--primary); }
input, select, textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; font-size: 1rem; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; }
.submit-btn { width: 100%; background: var(--primary); color: white; border: none; padding: 1rem; font-size: 1.1rem; font-weight: bold; border-radius: 6px; cursor: pointer; transition: 0.3s; text-align: center; display: inline-block; text-decoration: none; }
.submit-btn:hover { background: var(--accent); }

/* FOOTER */
footer { background: var(--primary); color: #94a3b8; padding: 4rem 2rem; text-align: center; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto 2rem auto; text-align: left; }
.footer-col h5 { color: white; margin-bottom: 1rem; font-size: 1.1rem; }
.footer-col a { display: block; color: #94a3b8; text-decoration: none; margin-bottom: 0.5rem; transition: 0.2s; }
.footer-col a:hover { color: var(--accent); }

/* ANIMATIONS */
.fade-in { animation: fadeIn 1s ease-out; }
.slide-up { animation: slideUp 0.8s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* --- NEW: PRODUCT CARD IMAGES --- */
.product-img {
    width: 100%;
    height: 220px; /* Fixed height for uniformity */
    object-fit: cover; /* Crops image perfectly without stretching */
    border-radius: 4px;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #f1f5f9;
}

/* MOBILE */
@media (max-width: 768px) {
    .nav-links { display: none; } 
    .hero h1 { font-size: 2.5rem; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { text-align: center; }
}