/*
Theme Name: Pro Build Smart
Theme URI: https://probuildsmart.com
Author: PBS Agent
Description: High-Fidelity "SmartConst" Replica - V5.3 Fixed RTL & Alignments
Version: 5.3
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Cairo:wght@400;600;700&display=swap');

:root {
    --primary: #f97316;
    --primary-hover: #ea580c;
    --dark: #0f172a;
    --dark-lighter: #1e293b;
    --text-body: #64748b;
    --text-head: #0f172a;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --border: #e2e8f0;
    --font-en: 'Outfit', sans-serif;
    --font-ar: 'Cairo', sans-serif;
    --container-width: 1280px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-en);
    color: var(--text-body);
    line-height: 1.6;
    background-color: var(--white);
    font-size: 16px;
}

/* Fix for Admin Bar hiding the Sticky Header */
body.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar header {
        top: 46px;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-head);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === RTL SPECIFIC FIXES === */
body.rtl {
    font-family: var(--font-ar) !important;
    direction: rtl;
    text-align: right;
}

body.rtl * {
    letter-spacing: 0 !important;
}

/* Fix text alignments in RTL */
body.rtl .service-card,
body.rtl .testimonial-card,
body.rtl .project-card {
    text-align: right !important;
}

/* Flip arrow icons in RTL */
body.rtl .fa-arrow-right {
    transform: rotate(180deg);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.btn-outline-light:hover {
    background: white;
    color: var(--dark);
}

/* Top Bar */
.top-bar {
    background-color: #0b1120;
    color: #94a3b8;
    padding: 10px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info,
.work-hours {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-info span i,
.work-hours span i {
    color: var(--primary);
    margin-right: 5px;
}

body.rtl .contact-info span i,
body.rtl .work-hours span i {
    margin-right: 0;
    margin-left: 5px;
}

/* Header */
header {
    background-color: #ffffff !important;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    margin: 0;
}

.nav-links a {
    color: var(--dark);
    font-weight: 600;
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-quote {
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Hero Section */
.hero {
    background-color: var(--dark);
    color: white;
    position: relative;
    padding: 80px 0 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: white;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 25px;
    border-radius: 8px;
    min-width: 160px;
    flex: 1;
}

.stat-card h3 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-card p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin: 0;
}

.hero-right-img {
    min-height: 500px;
    height: 600px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: -20px 20px 0 rgba(249, 115, 22, 0.1);
    background-color: #1e293b;
}

body.rtl .hero-right-img {
    box-shadow: 20px 20px 0 rgba(249, 115, 22, 0.1);
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-img-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.about-badge {
    color: var(--primary);
    background: #fff7ed;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--dark);
}

.check-item i {
    color: var(--primary);
}

/* Services Section */
.services-section {
    background: #f8fafc;
    padding: 100px 0;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: left;
    /* Default LTR */
    border: 1px solid var(--border);
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.icon-orange {
    background: #fff7ed;
    color: #f97316;
}

.icon-blue {
    background: #eff6ff;
    color: #3b82f6;
}

.icon-green {
    background: #f0fdf4;
    color: #22c55e;
}

.icon-purple {
    background: #f3e8ff;
    color: #a855f7;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card .learn-more {
    color: var(--primary);
    font-weight: 700;
    margin-top: 20px;
    display: inline-block;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    background: white;
    border-top: 1px solid #f1f5f9;
}

.project-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.tab-btn {
    border: 1px solid var(--border);
    background: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--text-body);
    cursor: pointer;
    transition: 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background-color: #eee;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    transform: translateY(20px);
    transition: 0.3s;
    opacity: 0;
    text-align: left;
    /* Keep LTR for English names usually, or override below */
}

body.rtl .project-info {
    text-align: right;
}

.project-card:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    text-align: left;
}

/* Default LTR */
.stats-strip {
    margin-top: 80px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    border-top: 1px solid #1e293b;
    padding-top: 40px;
    gap: 30px;
}

/* Footer */
footer {
    background: #0b1120;
    color: #94a3b8;
    padding: 80px 0 20px;
}

.footer-cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid #1e293b;
}

.footer-cols h4 {
    color: white;
    margin-bottom: 25px;
}

.footer-cols ul li {
    list-style: none;
    margin-bottom: 15px;
}

.footer-cols a {
    color: #94a3b8;
}

.footer-cols a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    font-size: 0.9rem;
}

.contact-list li {
    display: flex;
    align-items: start;
    gap: 10px;
    margin-bottom: 20px !important;
}

/* Responsive Media Queries */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    .services-grid,
    .projects-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hero-right-img {
        height: 400px;
        order: -1;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media screen and (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-outline-light {
        width: 100%;
        text-align: center;
    }

    .services-grid,
    .projects-grid,
    .testimonials-grid,
    .footer-cols {
        grid-template-columns: 1fr !important;
    }

    #contact .container>div:nth-child(2) {
        grid-template-columns: 1fr !important;
    }

    form div {
        grid-template-columns: 1fr !important;
    }

    .check-grid {
        grid-template-columns: 1fr;
    }

    .hero-right-img {
        height: 300px;
    }

    .stats-strip {
        flex-direction: column;
        align-items: center;
    }
}