/* Al-Mohwar Industrial Website - Main Stylesheet */
:root {
    --navy: #002B5B;
    --industrial-blue: #004B8D;
    --steel-grey: #6B7280;
    --light-bg: #F4F6F8;
    --white: #FFFFFF;
    --accent: #1E88E5;
    --accent-hover: #1565C0;
    --shadow: 0 4px 20px rgba(0, 43, 91, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 43, 91, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --header-height: 80px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background: var(--white);
    overflow-x: hidden;
}

body[dir="ltr"] { font-family: 'Inter', 'Segoe UI', sans-serif; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

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

.section { padding: 80px 0; }
.section-alt { background: var(--light-bg); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}
.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}
.section-header p { color: var(--steel-grey); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.35);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-2px);
}
.btn-navy {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.btn-navy:hover {
    background: var(--industrial-blue);
    border-color: var(--industrial-blue);
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
    border-radius: var(--radius-sm);
}
.btn-ghost:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-ghost svg { width: 18px; height: 18px; }

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 43, 91, 0.06);
    height: var(--header-height);
    transition: var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; }
.logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition);
}
.logo:hover .logo-img { transform: scale(1.04); }
.logo-img--footer { width: 56px; height: 56px; }
.logo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    white-space: nowrap;
}
.logo-tagline {
    font-size: 0.72rem;
    color: var(--steel-grey);
    line-height: 1.35;
    white-space: nowrap;
}
.logo--footer .logo-title { color: var(--white); }
.logo--footer .logo-tagline { color: rgba(255, 255, 255, 0.7); }

.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: center; }
.nav a {
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--navy);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--accent); background: rgba(30, 136, 229, 0.08); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--industrial-blue);
    border: 1px solid var(--industrial-blue);
    border-radius: 20px;
    transition: var(--transition);
}
.lang-switch:hover { background: var(--industrial-blue); color: var(--white); }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--navy);
}
.menu-toggle svg { width: 28px; height: 28px; }

/* Hero */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    min-height: 85vh;
    display: flex;
    align-items: center;
    margin-top: var(--header-height);
    background: var(--navy) url('/assets/images/hero-bg.png') center center / cover no-repeat;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 43, 91, 0.92) 0%,
        rgba(0, 43, 91, 0.78) 32%,
        rgba(0, 75, 141, 0.45) 55%,
        rgba(0, 75, 141, 0.15) 75%,
        rgba(0, 43, 91, 0.05) 100%
    );
}
body[dir="rtl"] .hero::before {
    background: linear-gradient(
        270deg,
        rgba(0, 43, 91, 0.93) 0%,
        rgba(0, 43, 91, 0.8) 30%,
        rgba(0, 75, 141, 0.5) 52%,
        rgba(0, 75, 141, 0.18) 72%,
        rgba(0, 43, 91, 0.04) 100%
    );
}
.hero .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 80px 0;
}
body[dir="rtl"] .hero-content {
    text-align: right;
}
body[dir="ltr"] .hero-content {
    text-align: left;
}
.hero h1 {
    font-size: clamp(1.85rem, 4.2vw, 3rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.45;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}
.hero p {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 36px;
    line-height: 1.85;
    max-width: 580px;
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.hero-buttons .btn-hero {
    border-radius: 50px;
    padding: 14px 30px;
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 170px;
}
.hero-buttons .btn-hero svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.hero-buttons .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 18px rgba(30, 136, 229, 0.4);
}
.hero-buttons .btn-outline {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
}
.hero-buttons .btn-outline:hover {
    background: var(--white);
    color: var(--navy);
}

/* About */
.about-section { background: var(--white); }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.about-content { order: 1; }
.about-image { order: 2; }
body[dir="ltr"] .about-content { order: 2; }
body[dir="ltr"] .about-image { order: 1; }
body[dir="rtl"] .about-content { text-align: right; }
body[dir="ltr"] .about-content { text-align: left; }
.about-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 43, 91, 0.12);
}
.about-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}
.about-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 24px;
    display: inline-block;
    position: relative;
    padding-bottom: 14px;
}
.about-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 56px;
    height: 4px;
    background: var(--navy);
    border-radius: 2px;
}
body[dir="ltr"] .about-title::after {
    right: auto;
    left: 0;
}
.about-text {
    color: #374151;
    margin-bottom: 32px;
    font-size: 1.05rem;
    line-height: 2;
    max-width: 100%;
}
.about-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 26px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--navy);
    border-radius: 5px;
    background: transparent;
    color: var(--navy);
    line-height: 1;
}
.about-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.about-btn:hover {
    background: rgba(0, 43, 91, 0.04);
    color: var(--navy);
    border-color: var(--navy);
    transform: none;
    box-shadow: none;
}
.about-btn:hover svg {
    transform: translateX(-2px);
}
body[dir="ltr"] .about-btn:hover svg {
    transform: translateX(2px);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.service-card-img {
    height: 160px;
    overflow: hidden;
    position: relative;
}
.service-card-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.service-card:hover .service-card-img img { transform: scale(1.05); }
.service-card-body { padding: 24px 20px; }
.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--industrial-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -40px auto 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}
.service-icon svg { width: 26px; height: 26px; color: var(--white); }
.service-card h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 10px; font-weight: 700; }
.service-card p { font-size: 0.9rem; color: var(--steel-grey); line-height: 1.6; }

/* Features / Why Us */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.feature-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: rgba(30, 136, 229, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-icon svg { width: 26px; height: 26px; color: var(--accent); }
.feature-card h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: 8px; font-weight: 700; }
.feature-card p { font-size: 0.9rem; color: var(--steel-grey); line-height: 1.6; }

/* Gallery / Projects */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 43, 91, 0.8) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover::after { opacity: 1; }
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 1;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { transform: translateY(0); opacity: 1; }
.gallery-overlay h4 { color: var(--white); font-size: 0.95rem; font-weight: 600; }
.gallery-overlay span { color: rgba(255,255,255,0.8); font-size: 0.8rem; }

.section-cta { text-align: center; margin-top: 40px; }

/* Stats */
.stats-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--industrial-blue) 100%);
    padding: 60px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-item { color: var(--white); }
.stat-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.stat-icon svg { width: 28px; height: 28px; color: var(--accent); }
.stat-value { font-size: 2.5rem; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 1rem; opacity: 0.9; }

/* Forms */
.form-section { background: var(--light-bg); }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: var(--transition);
    color: #333;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.file-upload {
    border: 2px dashed #D1D5DB;
    border-radius: var(--radius-sm);
    padding: 32px;
    text-align: center;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}
.file-upload:hover { border-color: var(--accent); background: rgba(30, 136, 229, 0.03); }
.file-upload svg { width: 40px; height: 40px; color: var(--steel-grey); margin: 0 auto 12px; }
.file-upload p { color: var(--steel-grey); font-size: 0.9rem; }
.file-upload span { color: var(--accent); font-size: 0.8rem; display: block; margin-top: 8px; }

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.contact-info h2 { font-size: 2rem; color: var(--navy); margin-bottom: 16px; }
.contact-info > p { color: var(--steel-grey); margin-bottom: 32px; font-size: 1.05rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--light-bg);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.contact-item:hover { background: rgba(30, 136, 229, 0.08); }
.contact-item-icon {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.contact-item-icon svg { width: 22px; height: 22px; color: var(--accent); }
.contact-item div h4 { font-size: 0.85rem; color: var(--steel-grey); margin-bottom: 2px; }
.contact-item div p { font-size: 1rem; color: var(--navy); font-weight: 600; }
.contact-item div a { color: var(--navy); }
.contact-item div a:hover { color: var(--accent); }

.contact-form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}

/* Footer */
.footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-desc { margin-top: 16px; font-size: 0.95rem; line-height: 1.7; opacity: 0.8; }
.footer h4 { color: var(--white); font-size: 1.1rem; margin-bottom: 20px; font-weight: 700; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.95rem; opacity: 0.8; transition: var(--transition); }
.footer-links a:hover { opacity: 1; color: var(--accent); }
.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    opacity: 0.8;
}
.footer-contact svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.social-links a:hover { background: var(--accent); transform: translateY(-3px); }
.social-links svg { width: 18px; height: 18px; color: var(--white); }
.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Page Hero (inner pages) */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--industrial-blue) 100%);
    padding: 140px 0 60px;
    margin-top: var(--header-height);
    text-align: center;
}
.page-hero h1 { font-size: 2.5rem; color: var(--white); font-weight: 800; margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; }

/* Cards Grid (products/projects pages) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.card-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.card-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-item-img { height: 220px; overflow: hidden; }
.card-item-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.card-item:hover .card-item-img img { transform: scale(1.05); }
.card-item-body { padding: 24px; }
.card-item-body h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: 10px; font-weight: 700; }
.card-item-body p { font-size: 0.95rem; color: var(--steel-grey); line-height: 1.6; }
.card-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(30, 136, 229, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--white); }

.page-content { max-width: 900px; margin: 0 auto; }
.page-content p {
    color: var(--steel-grey);
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 16px;
}
.page-content p:last-child { margin-bottom: 0; }

/* Responsive */
@media (max-width: 1100px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .nav { display: none; }
    .nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 4px;
    }
    .nav.open a { width: 100%; padding: 12px 16px; }
    .menu-toggle { display: block; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-content { order: 2; }
    .about-image { order: 1; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .section { padding: 60px 0; }
    .hero { min-height: 70vh; }
    .hero-content { padding: 50px 0; }
    .hero h1 { font-size: 1.65rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn-hero { width: 100%; min-width: 0; }
    .services-grid, .gallery-grid, .features-grid, .stats-grid, .cards-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    .form-grid { grid-template-columns: 1fr; }
    .form-card, .contact-form-card { padding: 24px; }
    .about-image img { height: 280px; }
}
