/* ============================================
   Al Karam Company - Professional Website
   Modern, Responsive Design
   ============================================ */

/* Color Palette - Based on Professional Automotive Theme */
:root {
    --primary-color: #DC143C;        /* Crimson Red - Premium */
    --primary-dark: #B22222;         /* Fire Brick Red */
    --secondary-color: #1a1a1a;     /* Dark Black */
    --accent-color: #2C3E50;         /* Dark Blue */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s ease;
}

/* Typography */
body {
    font-family: 'Cairo', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 80px;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Navbar */
.navbar {
    background-color: var(--bg-white) !important;
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.logo-img {
    max-height: 60px;
    width: auto;
    transition: var(--transition);
    flex-shrink: 0;
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
}

.navbar-brand {
    text-decoration: none;
    color: inherit;
}

.company-name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.company-name-main {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
    transition: var(--transition);
}

.company-name-sub {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    display: block;
    margin-top: 2px;
    transition: var(--transition);
}

.navbar-brand:hover .company-name-main {
    color: var(--primary-color);
}

.navbar-brand:hover .company-name-sub {
    color: var(--primary-dark);
}

[dir="rtl"] .company-name {
    margin-right: 0.75rem;
    margin-left: 0;
}

[dir="rtl"] .navbar-brand .ms-3 {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Hero Section - Static Cover Image */
.hero-section {
    margin-top: -80px;
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    overflow: hidden;
    background-color: #000;
}

.hero-section .carousel-item.active .hero-image {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.hero-section[dir="ltr"] {
    direction: ltr !important;
}

/* Carousel Container */
.hero-section .carousel {
    width: 100%;
    height: 100%;
    direction: ltr !important;
}

.hero-section .carousel-inner {
    width: 100%;
    height: 100%;
    direction: ltr !important;
}

.hero-section .carousel-item {
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    position: relative;
    width: 100% !important;
    direction: ltr !important;
    overflow: hidden;
}

/* Hero Image Wrapper */
.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* Hero Image */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    transition: transform 0.8s ease;
    will-change: transform;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.05);
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.75) 0%, rgba(44, 62, 80, 0.65) 100%);
    z-index: 1;
}

/* Hero Caption */
.hero-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

/* Hero Typography */
.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-text {
    font-size: 1.25rem;
    color: var(--bg-white);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Buttons */
.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-animate:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.4);
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    background-color: var(--bg-white);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}


/* RTL Support */
[dir="rtl"] .hero-content {
    direction: rtl;
    text-align: center;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: relative;
}

.title-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    margin: 1rem 0;
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Info Cards */
.info-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.info-text {
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

/* Goal Cards */
.goal-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    border: 2px solid transparent;
}

.goal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.goal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: #ffffff;
    transition: var(--transition);
}

.goal-card:hover .goal-icon {
    transform: scale(1.1) rotate(5deg);
}

.goal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
}

/* Feature Box */
.feature-box {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.8rem;
    color: #ffffff;
}

/* Brand Cards */
.brand-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.brand-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.brand-card img {
    max-height: 120px;
    width: auto;
    object-fit: contain;
    filter: none;
    transition: var(--transition);
}

.brand-card:hover img {
    filter: none;
    transform: scale(1.1);
}

/* Contact Section */
.contact-info-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    height: 100%;
}

.contact-info-card h4 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info-card h4 i {
    color: var(--primary-color);
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.map-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 100%;
}

.map-wrapper iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* Footer */
.footer {
    background: var(--secondary-color) !important;
    padding: 2rem 0;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(220, 20, 60, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Page Header for About Page */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 4rem 0;
    margin-top: 80px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.about-content-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

/* Custom Column for Brands (Responsive grid) */
@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 auto;
        width: 14.28%; /* 7 columns */
    }
}

@media (min-width: 1200px) {
    .col-lg-2-4 {
        width: 14.28%; /* 7 columns */
    }
}

@media (max-width: 991px) {
    .col-lg-2-4 {
        width: 33.333%; /* 3 columns on medium screens */
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-section .carousel-item {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .hero-text {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section .carousel-control-prev,
    .hero-section .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    .hero-section .carousel-control-prev {
        left: 1rem;
    }
    
    .hero-section .carousel-control-next {
        right: 1rem;
    }
    
    [dir="rtl"] .hero-section .carousel-control-prev {
        right: 1rem !important;
    }
    
    [dir="rtl"] .hero-section .carousel-control-next {
        left: 1rem !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .company-name-main {
        font-size: 1.1rem;
    }
    
    .company-name-sub {
        font-size: 0.75rem;
    }
    
    .logo-img {
        max-height: 50px;
    }
    
    .hero-section {
        height: 60vh;
        min-height: 400px;
        margin-top: -70px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-buttons .btn.me-3 {
        margin-right: 0 !important;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .info-card,
    .contact-info-card {
        padding: 1.5rem;
    }
    
    .goal-card {
        padding: 1.5rem;
    }
    
    .map-wrapper iframe {
        height: 300px;
    }
    
    .hero-section .carousel-control-prev,
    .hero-section .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .hero-section .carousel-control-prev {
        left: 0.5rem;
    }
    
    .hero-section .carousel-control-next {
        right: 0.5rem;
    }
    
    [dir="rtl"] .hero-section .carousel-control-prev {
        right: 0.5rem !important;
    }
    
    [dir="rtl"] .hero-section .carousel-control-next {
        left: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .company-name {
        display: none;
    }
    
    .hero-section {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-section .carousel-item {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .info-card,
    .contact-info-card {
        padding: 1.25rem;
    }
    
    .info-icon,
    .goal-icon,
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Utility Classes */
.bg-light {
    background-color: var(--bg-light) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading States */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section .carousel-control-prev,
    .hero-section .carousel-control-next,
    .hero-section .carousel-indicators,
    .footer {
        display: none;
    }
}
