/* Custom CSS for Insha'at Platform - Optimized */

/* Import Google Fonts with display=swap for better performance */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* Root Variables */
:root {
    /* Brand colors — aligned with Tailwind config and dashboard.css */
    --brand-primary: #2f5c69;
    --brand-primary-light: #3d7a8a;
    --brand-primary-dark: #1a3d47;
    --brand-gold: #f3a446;
    --brand-gold-light: #f5b86a;
    --brand-gold-dark: #d4882e;
    --brand-gold-text: #955600;
    --brand-green: #2d5016;

    /* Semantic aliases for legacy custom.css usage */
    --primary-color: #2f5c69;
    --primary-dark: #1a3d47;
    --secondary-color: #d97706; /* amber-600 */
    --secondary-light: #f59e0b; /* amber-500 */

    /* Text — light mode defaults */
    --text-dark: #1f2937;
    --text-light: #6b7280;

    /* Surfaces — dark tokens used by ds-* utilities on public pages */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d29;
    --bg-tertiary: #1e2235;
    --bg-card: #1e2235;
    --bg-card-hover: #252a3a;
    --bg-input: #252a3a;
    --bg-light: #f8fafc;
    --white: #ffffff;

    /* Design-system tokens referenced by Tailwind ds.* utilities */
    --text-primary: #e8ecf4;
    --text-secondary: #8b93a7;
    --text-tertiary: #5a6478;
    --text-inverse: #0f1117;
    --text-link: #4f9faf;
    --accent: #4f9faf;
    --accent-hover: #6bb5c4;
    --danger: #ff4d7f;
    --success: #00d9b5;
    --warning: #ffb020;
    --border-color: #2a2f3e;
    --border-light: #1e2235;
    --border-focus: #4f9faf;
    --border-primary: #4f9faf;
    --purple: #8b5cf6;

    /* Auth Surfaces (light-mode context for login/register pages) */
    --auth-bg-surface: #f8fafc;
    --auth-bg-card: #ffffff;
    --auth-grid-stroke: #e2e8f0;
    --auth-scrollbar-track: #f1f5f9;
    --auth-scrollbar-thumb: #cbd5e1;
    --auth-scrollbar-thumb-hover: #2f5c69;

    /* Shadows / radius */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles - Optimized */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}


/* Footer Styles */

/* Responsive Design */

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #14b8a6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Link states */
.link-loading {
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
}




/* Home Page Specific Styles */
.hero-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #faf5ff 100%);
}

.process-gradient {
    background: linear-gradient(135deg, #f0fdfa 0%, #fef3c7 100%);
}

.cost-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
}

.stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

.language-toggle {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.uae-badge {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Responsive improvements for home page */
@media (max-width: 768px) {
    .hero-gradient {
        background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    }

    .process-gradient {
        background: linear-gradient(135deg, #f0fdfa 0%, #fef3c7 100%);
    }

    .cost-gradient {
        background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
    }

    /* Improve touch targets */
    .nav-link,
    .mobile-nav-link {
        min-height: 44px;
        display: flex;
        
    }

    .btn,
    .nav-button,
    .mobile-nav-button {
        min-height: 44px;
        min-width: 44px;
    }
}




/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    /* background: transparent; */
    /* color: var(--primary-color); */
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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