@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --secondary-color: #f59e0b;
    --accent-gold: #eab308;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* Text Colors */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Background Colors */
    --bg-light: #f8fafc;
    --bg-section: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* Border & Shadows */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-light: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);

    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;

    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    --border-radius-full: 9999px;

    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 1rem;
    --container-max-width: 1200px;

    /* Navbar Variables */
    --navbar-height: 70px;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #f59e0b;
    --text-dark: #f1f5f9;
    --text-light: #cbd5e0;
    --text-muted: #94a3b8;
    --bg-light: #0f172a;
    --bg-section: #1e293b;
    --border-color: #334155;
    --gradient-light: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --navbar-bg: rgba(30, 41, 59, 0.95);
}

/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: var(--transition-normal);
    overflow-x: hidden;
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;

}

/* ===== UTILITY CLASSES ===== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}


@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

.section-padding {
    padding: var(--section-padding);
}

@media (max-width: 768px) {
    .section-padding {
        padding: 3rem 0;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.6s ease-in-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
}

.preloader-content {
    text-align: center;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.preloader-logo {
    margin-bottom: 2rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.preloader-logo .logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: logoFloat 2s ease-in-out infinite;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.preloader-logo .logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--text-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto;
}

.loading-text {
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== WHATSAPP FLOAT (FIXED AND IMPROVED) ===== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #25d366;
    color: white;
    border-radius: 50px;
    padding: 15px 20px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: whatsappFloat 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.whatsapp-float:hover {
    background: #128c7e;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
    color: white;
}

.whatsapp-float i {
    font-size: 24px;
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-text {
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .whatsapp-float i {
        font-size: 20px;
    }

    .whatsapp-text {
        display: none;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        justify-content: center;
        border-radius: 50%;
        padding: 0;
    }
}

@keyframes whatsappFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes whatsappPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ===== NAVIGATION (COMPLETELY FIXED) ===== */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    padding: 0;
    box-shadow: var(--navbar-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    height: var(--navbar-height);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-height);
    position: relative;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: var(--transition-normal);
    z-index: 1001;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    height: 100%;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-normal);
    position: relative;
    padding: 0.75rem 0;
    display: block;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: scale(1.1);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transition: var(--transition-normal);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition-normal);
    transform-origin: center;
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Styles */
@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background: var(--bg-section);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        gap: 0.5rem;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        justify-content: center;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link::after {
        display: none;
    }

    .theme-toggle {
        margin-top: 2rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .logo-img {
        height: 35px;
    }

    .logo-text {
        font-size: 1.2rem;
    }
}

/* Mobile Menu Overlay */
@media (max-width: 1024px) {
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.156);
        z-index: -1;
    }
}

/* Extra small screens: fix navbar and nav-menu overflow */
@media (max-width: 350px) {
    .navbar {
        min-width: 0;
        padding: 0;
    }
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        min-width: 0;
        padding: 0 2px;
    }
    .logo {
        min-width: 0;
        gap: 0.5rem;
    }
    .logo-img {
        height: 28px;
        max-width: 32px;
    }
    .logo-text {
        font-size: 1rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


    .logo-img, .service-icon i, .footer-logo .logo-img {
        max-width: 28px;
        font-size: 1rem;
    }
    .logo-text, .footer-logo .logo-text {
        font-size: 0.8rem;
    }
    .mobile-toggle {
        width: 28px;
        height: 28px;
    }
    .nav-menu {
        max-width: 100vw;
        padding: 4rem 0.5rem 1rem;
    }
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
}

/* Hide nav text and shrink icons further for ultra-narrow screens */
@media (max-width: 316px) {
    .logo-text {
        display: none;
    }
    .nav-link {
        font-size: 0.85rem;
        padding: 0.7rem 0;
    }
    .theme-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    .nav-menu {
        padding: 3.5rem 0.2rem 0.5rem;
    }
}

/* ===== HERO SECTION (IMPROVED RESPONSIVE) ===== */
.hero {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: calc(var(--navbar-height) + 4rem) 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

@media (max-width: 1024px) {
    .hero {
        padding: calc(var(--navbar-height) + 3rem) 0 3rem;
        min-height: 90vh;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: calc(var(--navbar-height) + 2rem) 0 2rem;
        min-height: 85vh;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.title-main {
    display: block;
    margin-bottom: 0.5rem;
}

.title-accent {
    display: block;
    font-size: 0.7em;
    font-weight: 600;
    opacity: 0.9;
    color: var(--accent-gold);
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cta-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

.cta-button.primary {
    background: var(--accent-gold);
    color: var(--text-white);
    box-shadow: var(--shadow-lg);
}

.cta-button.secondary {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.cta-button.primary:hover {
    background: #d97706;
}

.cta-button.secondary:hover {
    background: var(--text-white);
    color: var(--primary-color);
}

/* ===== SECTION STYLES ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .section-header {
        margin-bottom: 3rem;
    }
}

.section-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }


    .section-badge {
        font-size: 0.8rem;
        padding: 0.375rem 1rem;
    }

    .navbar, .nav-menu {
        min-width: 0;
        width: 100vw;
        overflow-x: auto;
    }
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== ABOUT SECTION (IMPROVED GRID) ===== */
.about {
    background: var(--bg-section);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .about-image {
        order: -1;
    }
}

.text-block {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .text-block {
        margin-bottom: 1.5rem;
    }
}

.text-block h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    position: relative;
    padding-right: 1.5rem;
}

@media (max-width: 1024px) {
    .text-block h3 {
        padding-right: 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .text-block h3 {
        font-size: 1.2rem;
    }
}

.text-block h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .text-block h3::before {
        display: none;
    }
}

.text-block p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .text-block p {
        font-size: 1rem;
    }
}

.about-image {
    position: relative;
}

.image-container {
    position: relative;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-normal);
}

.image-container:hover .image-overlay {
    opacity: 0.1;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* ===== SERVICES SECTION ===== */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.service-card {
    background: var(--bg-section);
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .service-card {
        padding: 2rem 1.5rem;
    }
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

@media (max-width: 768px) {
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
}

.service-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color)20, transparent);
    border-radius: 50%;
    z-index: -1;
    transition: var(--transition-normal);
}

.service-card:hover .service-icon::before {
    transform: translate(-50%, -50%) scale(1.2);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .service-title {
        font-size: 1.3rem;
    }
}

.service-description {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .service-description {
        font-size: 1rem;
    }
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-full);
    background: var(--primary-color);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

.author-info {
    text-align: right;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.author-title {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== FAQ SECTION ===== */
.faq {
    background: var(--bg-light);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-section);
    margin-bottom: 1rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition-normal);
}

.faq-question:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    flex-grow: 1;
}

.faq-question i {
    font-size: 1rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 1.5rem;
}

.faq-answer p {
    color: var(--text-light);
    padding: 1.5rem 0;

    margin: 0;
    line-height: 1.7;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    max-height: 200px;
    padding: 0 1.5rem 1.5rem;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--bg-section);
}

/* Center the contact info box in the contact section */
.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    min-height: 350px;
}

.contact-info {
    margin: 0 auto;
    float: none;
}

/* Responsive: keep centered on mobile */
@media (max-width: 1024px) {
    .contact-content {
        flex-direction: column;
        align-items: center;
    }
    .contact-info {
        width: 100%;
        max-width: 450px;
    }
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.contact-info,
.contact-form {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .contact-info,
    .contact-form {
        padding: 2rem 1.5rem;
    }
}

.contact-info h3,
.contact-form h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.contact-info ul li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    word-break: break-all;
}

.contact-info ul li i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.contact-info ul li a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-info ul li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Social Contact List */
.social-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-contact-list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.social-contact-list li i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.social-contact-list li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.social-contact-list li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius-full);
    background: var(--primary-color);
    color: var(--text-white);
    font-size: 1.2rem;
    transition: var(--transition-normal);
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-sm);
    background: var(--secondary-color);
    color: var(--text-white);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-section);
    color: var(--text-dark);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1rem;
    border-radius: var(--border-radius-full);
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    font-weight: 600;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gradient-dark);
    color: var(--text-white);
    padding-top: 4rem;
    padding-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

.footer-logo .logo-img {
    filter: brightness(0) invert(1);
}

.footer-logo .logo-text {
    color: var(--text-white);
    background: none;
    -webkit-text-fill-color: var(--text-white);
}

.footer-about .logo {
    margin-bottom: 1.5rem;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .footer-about .logo {
        justify-content: center;
    }
}

.footer-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-contact-details p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-contact-details p {
        justify-content: center;
    }
}

.footer-contact-details p i {
    color: var(--primary-color);
    font-size: 1rem;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-white);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .footer-title {
        text-align: center;
        padding-bottom: 0.5rem;

    }
    .footer-title::after {
        right: 50%;
        left: 50%;
        transform: translateX(50%);
    }
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links li a:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
    display: block;
}

@media (max-width: 768px) {
    .footer-links li a:hover {
        transform: none;
    }
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

.copyright {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .footer-bottom-links {
        margin-top: 1rem;
    }
}

.footer-bottom-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.footer-bottom-link:hover {
    color: var(--primary-color);
}

/* ===== ANIMATIONS & EFFECTS ===== */
@keyframes scroll-bounce {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; transform: translateY(10px); }
}

/* Form Messages */
.form-message {
    animation: slideInDown 0.4s ease;
}

.form-message.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Animations for accessibility (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .preloader-logo .logo-img {
        animation: none;
    }

    .loading-spinner {
        animation: none;
    }

    .loading-text {
        animation: none;
    }

    .whatsapp-float {
        animation: none;
    }
}

/* Focus styles for better accessibility */
.nav-link:focus,
.cta-button:focus,
.theme-toggle:focus,
.mobile-toggle:focus,
.form-control:focus,
.submit-btn:focus,
.faq-question:focus,
.whatsapp-float:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.5);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .whatsapp-float,
    .preloader {
        display: none !important;
    }

    .hero {
        padding-top: 2rem;
    }

    body {
        color: #000 !important;
        background: #fff !important;
    }

    .section-padding {
        padding: 2rem 0;
    }
}

/* Fix container padding and prevent horizontal scroll */
@media (max-width: 1024px) {
    body {
        overflow-x: hidden;
    }
    .container {
        padding: 0 0.5rem;
        max-width: 100vw;
    }
}

/* Navbar and nav-menu improvements */
@media (max-width: 1024px) {
    .navbar {
        min-width: 0;
        width: 100vw;
        left: 0;
        right: 0;
    }
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        min-width: 0;
        padding: 0 2px;
    }
    .nav-menu {
        max-width: 100vw;
        width: 100vw;
        overflow-x: auto;
        padding: 5rem 0.5rem 2rem;
    }
    .logo {
        min-width: 0;
        gap: 0.5rem;
    }
    .logo-img {
        height: 32px;
        max-width: 40px;
    }
    .logo-text {
        font-size: 1.1rem;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Hero section fix for mobile */
@media (max-width: 1024px) {
    .hero {
        min-height: 70vh;
        padding: calc(var(--navbar-height) + 2rem) 0 2rem;
    }
    .hero-content {
        padding: 0 0.5rem;
    }
}

/* About and contact sections: stack columns */
@media (max-width: 1024px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .about-image {
        order: -1;
        margin-bottom: 1rem;
    }
}

/* Services grid: single column on mobile */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .service-card {
        padding: 1.5rem 1rem;
    }
}

/* Footer grid: stack columns */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Prevent images from overflowing */
img, .image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}


@media (max-width: 1024px) {
    html, body {
        width: 100vw;
        overflow-x: hidden;
    }
    .navbar {
        width: 100vw;
        min-width: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    .container {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }
}
