:root {
    --primary-color: rgb(67, 63, 86);
    --secondary-color: rgb(114, 115, 136);
    --light-color: #CBCDD8;
    --white-color: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--white-color);
}

/* Header and Navigation */
header {
    background-color: var(--primary-color);
    padding: 1rem 2rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    color: var(--white-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white-color);
    background-color: var(--secondary-color);
}

/* Language Switch */
.lang-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background-color: var(--secondary-color);
    color: var(--white-color);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.lang-btn:hover {
    background-color: var(--primary-color);
}

.lang-btn.active {
    background-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

section {
    margin-bottom: 3rem;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 1rem;
    margin-top: 3rem;
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.35rem;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    font-size: 1.5rem;
    color: #fff;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.2);
}

.admin-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #4CAF50;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.admin-login-btn:hover {
    background-color: #45a049;
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #444;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .lang-switch {
    flex-direction: row-reverse;
}

[dir="rtl"] .cat-card,
[dir="rtl"] .service-card {
    text-align: right;
}

[dir="rtl"] .contact-method {
    text-align: right;
}

/* Mobile First Approach */
@media (max-width: 768px) {
    /* Base Layout */
    body {
        font-size: 14px;
        line-height: 1.4;
    }

    /* Header & Navigation */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--primary-color);
        padding: 0;
    }

    nav {
        display: flex;
        flex-direction: column;
        padding: 10px;
        width: 100%;
    }

    .logo {
        font-size: 1.2em;
        margin: 10px 0;
        text-align: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--primary-color);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 10px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }

    .nav-links a {
        display: block;
        padding: 10px;
        width: 100%;
        color: var(--white-color);
    }

    .lang-switch {
        margin: 10px 0;
        display: flex;
        justify-content: center;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        color: var(--white-color);
        font-size: 1.5em;
        cursor: pointer;
    }

    /* Main Content */
    main {
        margin-top: 60px;
        padding: 10px;
        width: 100%;
    }

    section {
        padding: 15px 10px;
        margin: 10px 0;
    }

    h1 {
        font-size: 1.5em;
        margin: 15px 0;
        text-align: center;
    }

    h2 {
        font-size: 1.3em;
        margin: 12px 0;
        text-align: center;
    }

    h3 {
        font-size: 1.1em;
        margin: 10px 0;
        text-align: center;
    }

    /* Cards & Containers */
    .service-card, .service-details-card {
        width: 100%;
        margin: 10px 0;
        padding: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .cat-card {
        width: 100%;
        margin: 10px 0;
    }

    /* Tables */
    .cat-table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 10px 0;
    }

    .cat-table {
        min-width: 600px;
        font-size: 0.9em;
    }

    .cat-table th, .cat-table td {
        padding: 8px 5px;
        white-space: nowrap;
    }

    /* Forms */
    form {
        width: 100%;
        padding: 10px;
    }

    input, textarea, select {
        width: 100%;
        margin: 8px 0;
        padding: 10px;
        font-size: 1em;
    }

    button {
        width: 100%;
        margin: 10px 0;
        padding: 12px;
        font-size: 1em;
    }

    /* Footer */
    .site-footer {
        padding: 20px 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }

    .footer-section {
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-section h3 {
        margin-bottom: 10px;
        font-size: 1.1em;
    }

    .footer-section ul {
        padding: 0;
    }

    .footer-section li {
        margin: 8px 0;
    }

    .social-links {
        justify-content: center;
        gap: 15px;
    }

    .footer-bottom {
        margin-top: 20px;
        padding-top: 15px;
        font-size: 0.9em;
    }

    /* Gallery */
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .gallery-item {
        margin: 5px 0;
    }

    .gallery-item img {
        height: 200px;
    }

    /* Admin Dashboard */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        width: 100%;
        padding: 10px;
    }

    .stats-card {
        margin-bottom: 15px;
    }

    /* Modals */
    .modal-dialog {
        margin: 10px;
        max-width: 95%;
    }

    .modal-content {
        padding: 15px;
    }

    /* Utility Classes */
    .text-center-mobile {
        text-align: center !important;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .show-on-mobile {
        display: block !important;
    }

    .full-width-mobile {
        width: 100% !important;
    }
}