/* AL-NAJJAR LOGISTICS - Main CSS */

:root {
    /* Primary Colors */
    --primary-blue: #1e355e;
    --primary-orange: #f37a21;
    --secondary-blue: #152542;
    --secondary-orange: #d66412;

    /* Neutral Colors */
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;

    /* Typography */
    --font-main: 'Inter', sans-serif;

    /* Layout */
    --container-max-width: 1200px;
    --transition-fast: 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* RTL Support */
html[dir="rtl"] {
    text-align: right;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-blue);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-blue);
}

.text-accent {
    color: var(--primary-orange);
}

.bg-primary {
    background-color: var(--primary-blue);
    color: var(--text-light);
}

.bg-accent {
    background-color: var(--primary-orange);
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--secondary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(243, 122, 33, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--text-light);
}

/* Header & Navigation */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--primary-blue);
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

.lang-btn:hover,
.lang-btn.active {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1;
}

.logo-sub {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-orange);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--secondary-blue);
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-orange);
    transition: width var(--transition-fast);
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-orange);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* RTL Header Adjustments */
html[dir="rtl"] .nav-links a:not(.btn)::after {
    left: auto;
    right: 0;
}

/* Responsive Header */
@media (max-width: 768px) {
    .contact-info {
        display: none;
    }

    .top-bar-inner {
        justify-content: center;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        gap: 20px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('../images/hero_bg.jpg') center/cover no-repeat;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    color: var(--text-light);
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--text-light);
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero .btn-secondary {
    border-color: var(--text-light);
    color: var(--text-light);
}

.hero .btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-blue);
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px;
        min-height: 70vh;
        text-align: center;
    }

    .hero-bg {
        /* Enhances scaling focus on portrait displays & fixes iOS bugs */
        background-position: center center;
        background-attachment: scroll;
    }
    
    .hero-content {
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1.05rem;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Common */
.py-5 {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background-color: var(--primary-orange);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--primary-orange);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(30, 53, 94, 0.05);
    color: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.service-card:hover .service-icon {
    background-color: var(--primary-orange);
    color: var(--text-light);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-muted);
}

/* Features / Why Choose Us */
.features-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.features-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-orange);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-text h4 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.feature-text p {
    color: var(--text-muted);
}

.rounded-img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
    .features-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background-color: var(--secondary-blue);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.footer-logo .logo-text {
    font-size: 2rem;
}

.footer-about {
    max-width: 350px;
}

.footer-col h4 {
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--primary-orange);
    bottom: -8px;
    left: 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

/* RTL Support for Footer hover indent */
html[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

html[dir="rtl"] .footer-col h4::after {
    left: auto;
    right: 0;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--primary-orange);
}

.footer-contact i {
    color: var(--primary-orange);
    font-size: 1.2rem;
    margin-top: 5px;
}

.footer-bottom {
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    transition: all var(--transition-fast);
}

.whatsapp-float:hover {
    background-color: #128C7E;
    color: #FFF;
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
}

/* RTL Support for WhatsApp Button */
html[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 30px;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    html[dir="rtl"] .whatsapp-float {
        right: auto;
        left: 20px;
    }
}

/* Utility Links */
.contact-info a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.contact-info a:hover {
    color: var(--primary-orange);
}