﻿/*
Theme Name: Memar Al Binaa Contracting (MBC)
Theme URI: https://mbcksa.net
Author: Senior Web Designer
Description: Custom WordPress theme for Memar Al Binaa Contracting.
Version: 1.0
Text Domain: mbc-theme
*/

/* -------------------------------------------------------------------------- */
/* Reset & Base Variables
/* -------------------------------------------------------------------------- */
:root {
  --primary-color: #5C4A72;
  --primary-hover: #4a3a5e;
  --secondary-color: #A58BBA;
  --text-color: #333333;
  --text-light: #666666;
  --bg-light: #f4f6f9;
  --white: #ffffff;
  --border-color: #eeeeee;
  
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  
  --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

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

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

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

.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); padding: 60px 0; }

/* -------------------------------------------------------------------------- */
/* Buttons
/* -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: var(--font-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 74, 114, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white) !important;
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color) !important;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* -------------------------------------------------------------------------- */
/* Header
/* -------------------------------------------------------------------------- */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.site-branding .site-title a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.site-branding .custom-logo {
    max-height: 80px;
    width: auto;
    display: block;
}

.site-branding .site-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--text-color);
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* RTL Header adjustments */
body.rtl .header-container { flex-direction: row-reverse; }

/* -------------------------------------------------------------------------- */
/* Hero Section
/* -------------------------------------------------------------------------- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(92, 74, 114, 0.8) 100%);
    padding: 100px 20px;
    text-align: center;
    color: var(--white);
}

.hero-section h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

/* -------------------------------------------------------------------------- */
/* About Section
/* -------------------------------------------------------------------------- */
.about-section {
    padding: 60px 20px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.values-list {
    list-style-type: none;
}

.values-list li {
    background: var(--bg-light);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

body.rtl .values-list li {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

.value-title {
    font-weight: 700;
    color: var(--primary-color);
}

/* -------------------------------------------------------------------------- */
/* Services Section (Mobile First Focus)
/* -------------------------------------------------------------------------- */
.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
    color: var(--primary-color);
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: stacked */
    gap: 20px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.primary-service {
    background: linear-gradient(to bottom right, #ffffff, #faf8fc);
    border: 1px solid var(--border-color);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* -------------------------------------------------------------------------- */
/* Clients Section
/* -------------------------------------------------------------------------- */
.clients-section {
    padding: 60px 20px;
    margin-top: 40px;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (min-width: 640px) {
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .clients-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.collaborator-box {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    aspect-ratio: 3 / 2;
}

.collaborator-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.06);
    border-color: var(--secondary-color);
}

.collaborator-box span {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.3;
}

.collaborator-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

/* -------------------------------------------------------------------------- */
/* Portfolio Section
/* -------------------------------------------------------------------------- */
.portfolio-section {
    padding: 80px 20px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    background: var(--white);
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.placeholder-img {
    background-color: #e0e0e0;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-family: var(--font-primary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--secondary-color);
}

.portfolio-info {
    padding: 25px;
    flex-grow: 1;
}

.project-category {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.portfolio-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.portfolio-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/* CTA Section
/* -------------------------------------------------------------------------- */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 20px;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.cta-section p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* -------------------------------------------------------------------------- */
/* Footer
/* -------------------------------------------------------------------------- */
.site-footer {
    background-color: #222222;
    color: #cccccc;
    padding-top: 60px;
}

.site-footer a {
    color: #cccccc;
}

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

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-widget h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

body.rtl .footer-widget h3::after {
    left: auto;
    right: 0;
}

.quick-links ul {
    list-style: none;
}

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

.site-info {
    background-color: #111111;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Mobile Header adjustments */
@media (max-width: 767px) {
    .main-navigation {
        display: none; /* In a real theme we'd add a mobile menu toggle here */
    }
    .header-cta .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}


