/*
Theme Name: Car Services theme
Description: A professional WordPress directory theme for Car Services in Riyadh with full Arabic language support and RTL layout
Author: Your Name
Version: 1.0
Text Domain: car-services-riyadh
*/

/* =============================================================================
   CSS RESET & BASE STYLES
   ============================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', 'Cairo', 'Amiri', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    direction: rtl;
    text-align: right;
	overflow-x: hidden;
}

/* RTL Support */
.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* =============================================================================
   COLOR PALETTE VARIABLES
   ============================================================================= */

:root {
    --primary-color: #fb8500;
    --secondary-color: #ffb703;
    --accent-color: #023047;
    --light-blue: #219ebc;
    --pale-blue: #8ecae6;
    --white: #ffffff;
    --black: #000000;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --gray-dark: #343a40;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-shadow: rgba(0, 0, 0, 0.15);
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    font-weight: 500;
}

h5 {
    font-size: 1.25rem;
    font-weight: 500;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* =============================================================================
   LAYOUT & GRID
   ============================================================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-12 {
    width: 100%;
    padding: 0 15px;
}

.col-6 {
    width: 50%;
    padding: 0 15px;
}

.col-4 {
    width: 33.333%;
    padding: 0 15px;
}

.col-3 {
    width: 25%;
    padding: 0 15px;
}

/* =============================================================================
   HEADER STYLES
   ============================================================================= */

.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    max-height: 60px;
    width: auto;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 1rem;
}

.main-navigation a {
    color: var(--accent-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--accent-color);
    cursor: pointer;
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero-section {
    min-height: 800px;
    background: linear-gradient(rgba(2, 48, 71, 0.7), rgba(2, 48, 71, 0.7)), url('assets/hero-section.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================================================
   SEARCH SECTION
   ============================================================================= */

.search-section {
    padding: 4rem 0;
    background-color: var(--gray-light);
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--accent-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(251, 133, 0, 0.1);
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--hover-shadow);
}

.btn-secondary {
    background-color: var(--light-blue);
}

.btn-secondary:hover {
    background-color: var(--pale-blue);
}

/* =============================================================================
   CARD STYLES
   ============================================================================= */

.card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--hover-shadow);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--gray-light);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-text {
    color: var(--gray-medium);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: var(--secondary-color);
}

/* =============================================================================
   SECTIONS
   ============================================================================= */

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--accent-color);
}

.cards-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.cards-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.cards-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.cards-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* =============================================================================
   LOAD MORE BUTTON
   ============================================================================= */

.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background-color: var(--light-blue);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background-color: var(--pale-blue);
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    background-color: var(--gray-medium);
    cursor: not-allowed;
    transform: none;
}

/* =============================================================================
   BREADCRUMBS
   ============================================================================= */

.breadcrumbs {
    padding: 1rem 0;
    background-color: var(--gray-light);
    margin-bottom: 2rem;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    margin: 0 0.5rem;
}

.breadcrumbs li:after {
    content: '/';
    margin-right: 0.5rem;
    color: var(--gray-medium);
}

.breadcrumbs li:last-child:after {
    display: none;
}

.breadcrumbs a {
    color: var(--primary-color);
}

.breadcrumbs .current {
    color: var(--gray-medium);
}

/* =============================================================================
   SINGLE POST STYLES
   ============================================================================= */

.single-post-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.post-content {
    margin-bottom: 3rem;
}

.post-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.meta-item {
    background: var(--gray-light);
    padding: 1rem;
    border-radius: 8px;
}

.meta-label {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.meta-value {
    color: var(--gray-medium);
}

.work-time-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.work-time-item:last-child {
    border-bottom: none;
}

.related-posts {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* =============================================================================
   FOOTER STYLES
   ============================================================================= */

.site-footer {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--pale-blue);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
}

.footer-navigation li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--pale-blue);
}

/* =============================================================================
   AFFILIATE ADS
   ============================================================================= */

.affiliate-ad {
    background: var(--gray-light);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
    border: 2px dashed var(--border-color);
}

.affiliate-ad img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.affiliate-ad .ad-label {
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin-bottom: 1rem;
}

/* =============================================================================
   404 PAGE
   ============================================================================= */

.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 h1 {
    font-size: 8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-404 h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.error-404 p {
    color: var(--gray-medium);
    margin-bottom: 2rem;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 992px) {
    .cards-grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .cards-grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        box-shadow: 0 5px 15px var(--shadow-color);
        flex-direction: column;
        padding: 1rem;
    }
    
    .main-navigation.active {
        display: flex;
    }
    
    .main-navigation ul {
        flex-direction: column;
        width: 100%;
    }
    
    .main-navigation li {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .main-navigation a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .cards-grid-2,
    .cards-grid-3,
    .cards-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .col-6,
    .col-4,
    .col-3 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .post-meta {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .search-form {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .site-header,
    .site-footer,
    .search-section,
    .load-more-container,
    .affiliate-ad {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}