/* Hawdl-Main Design System for Public Site */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

@font-face {
    font-family: 'Speda';
    src: url('../fonts/Speda.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Speda';
    src: url('../fonts/Speda-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;

    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    --font-primary: 'Speda', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    touch-action: manipulation;
}

body {
    font-family: var(--font-primary);
    color: var(--stone-900);
    background-color: var(--stone-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body, [dir="rtl"] * {
    font-family: var(--font-primary);
}

::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #134e4a;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

/* Page transitions & micro-animations */
.page-transition {
    animation: pageIn 0.2s ease-out;
}

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

.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.4s ease-out forwards;
}

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal and Loading */
.modal-loading {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(28, 25, 23, 0.5);
    backdrop-filter: blur(4px);
}

.modal-success {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(28, 25, 23, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-success.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-success .success-modal-content {
    transform: scale(0.95) translateY(10px);
    transition: transform 0.2s ease;
}

.modal-success.show .success-modal-content {
    transform: scale(1) translateY(0);
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid #0d9488;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.english-numbers {
    font-variant-numeric: normal !important;
    font-feature-settings: normal !important;
    unicode-bidi: embed !important;
    direction: ltr !important;
}
