@font-face {
    font-family: 'Merriweather';
    src: url('font/Merriweather/Merriweather-VariableFont_opsz,wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Merriweather';
    src: url('font/Merriweather/Merriweather-Italic-VariableFont_opsz,wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

:root {
    /* Color Palette */
    --color-bg: #0d1411;
    --color-surface: #16241f;
    --color-surface-hover: #1e312a;
    --color-primary: #2d4a3e;
    --color-primary-light: #3d6353;
    --color-accent: #c5a358;
    --color-text-main: #f0f3f2;
    --color-text-muted: #a3adab;
    --color-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-main: 'Merriweather', serif;

    /* Spacing System (8px scale) */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */

    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}



/* Glassmorphism utility */
.glass {
    background: rgba(22, 36, 31, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Reveal Animations */
.reveal-wrapper {
    overflow: hidden;
    display: block;
    padding: 0.2em 0;
    margin: -0.2em 0;
}

.reveal-item {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Specific delay for Hero to wait for preloader panels */
.reveal-hero {
    transition-delay: 0.6s;
}

.reveal-hero-2 {
    transition-delay: 0.8s;
}

/* Premium Triple-Panel Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
}

.preloader-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
}

.panel-1 {
    background: #0d1411;
    z-index: 3;
}

.panel-2 {
    background: #2d4a3e;
    z-index: 2;
}

.panel-3 {
    background: #16241f;
    z-index: 1;
}

#preloader.loaded .panel-1 {
    transform: translateY(-100%);
}

#preloader.loaded .panel-2 {
    transform: translateY(-100%);
    transition-delay: 0.1s;
}

#preloader.loaded .panel-3 {
    transform: translateY(-100%);
    transition-delay: 0.2s;
}

.preloader-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

#preloader.loaded .preloader-content {
    opacity: 0;
    transform: translate(-50%, -150%);
}

#preloader.fully-loaded {
    display: none;
    pointer-events: none;
}

.word-cycle {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.5rem, 6vw, 3rem);
    color: white;
    height: 1.2em;
    overflow: hidden;
    position: relative;
    letter-spacing: 0.1em;
}

.word-item {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translateY(50%);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.word-item.active {
    opacity: 1;
    transform: translateY(0);
}

.word-item.prev {
    opacity: 0;
    transform: translateY(-50%);
}

.loader-bar-wrap {
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2.5rem auto 0;
    position: relative;
    overflow: hidden;
}

.loader-bar-inner {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: white;
    transition: width 0.3s ease;
}

.loader-status {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 1.2rem;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #25d366;
    /* WhatsApp brand color or brand green #2d4a3e as requested */
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.2);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.whatsapp-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
}

/* Elegant Fade-in for Cursive Text (Letter by Letter) */
.writing-text-cursive {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2rem, 10vw, 6rem);
    color: #ffffff;
    text-align: center;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.writing-text-cursive span {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
    animation: letterReveal 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.writing-text-cursive span:nth-child(1) { animation-delay: 0.1s; }
.writing-text-cursive span:nth-child(2) { animation-delay: 0.2s; }
.writing-text-cursive span:nth-child(3) { animation-delay: 0.3s; }
.writing-text-cursive span:nth-child(4) { animation-delay: 0.4s; }
.writing-text-cursive span:nth-child(5) { animation-delay: 0.5s; }
.writing-text-cursive span:nth-child(6) { animation-delay: 0.6s; }
.writing-text-cursive span:nth-child(7) { animation-delay: 0.7s; }

@keyframes letterReveal {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.writing-svg {
    width: 90vw;
    max-width: 1000px;
}

/* Mobile Menu Aside */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: #0d1411;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-link {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.mobile-menu.active .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-menu-link:nth-child(1) {
    transition-delay: 0.3s;
}

.mobile-menu.active .mobile-menu-link:nth-child(2) {
    transition-delay: 0.4s;
}

.mobile-menu.active .mobile-menu-link:nth-child(3) {
    transition-delay: 0.5s;
}

.mobile-menu.active .mobile-menu-link:nth-child(4) {
    transition-delay: 0.6s;
}

.mobile-menu.active .mobile-menu-link:nth-child(5) {
    transition-delay: 0.7s;
}

.mobile-menu-close {
    align-self: flex-end;
    color: white;
    margin-bottom: 4rem;
    cursor: pointer;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* ==========================================================================
   Arabic Typography and Layout Supports (Forced LTR Layout)
   ========================================================================== */

/* Force LTR direction globally to prevent layout shifting between LTR and RTL */
html, 
body, 
html[dir="rtl"], 
body[dir="rtl"], 
[dir="rtl"] {
    direction: ltr !important;
}

/* Modern premium sans-serif Arabic typography applied via lang attribute or translate class */
html[lang="ar"], 
html[lang="ar"] body, 
html[lang="ar"] input, 
html[lang="ar"] textarea, 
html[lang="ar"] select, 
html[lang="ar"] button,
html.translated-rtl,
html.translated-rtl body,
html.translated-rtl input,
html.translated-rtl textarea,
html.translated-rtl select,
html.translated-rtl button {
    font-family: 'Cairo', sans-serif !important;
}

/* Adjust heading line-heights and spacing for Arabic script readability */
html[lang="ar"] h1, 
html[lang="ar"] h2, 
html[lang="ar"] h3, 
html[lang="ar"] h4, 
html[lang="ar"] h5, 
html[lang="ar"] h6,
html.translated-rtl h1,
html.translated-rtl h2,
html.translated-rtl h3,
html.translated-rtl h4,
html.translated-rtl h5,
html.translated-rtl h6 {
    line-height: 1.3 !important;
}

/* Smooth Language-Switching Loader CSS */
html.lang-changing {
    overflow: hidden !important;
}

html.lang-changing body {
    pointer-events: none !important;
}

/* Fade body out during translation transition */
html.lang-changing body > *:not(#lang-loader-overlay):not(.skiptranslate):not(iframe) {
    opacity: 0.15;
    filter: blur(4px);
    transition: opacity 0.4s ease, filter 0.4s ease;
}

/* Default state for loader is invisible */
#lang-loader-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Make it visible when the lang-changing class is present */
html.lang-changing #lang-loader-overlay {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   Google Translate Overrides (Hiding top bar and widget frames)
   ========================================================================== */
body {
    top: 0px !important;
    position: static !important;
}
html {
    top: 0px !important;
    position: static !important;
    height: 100% !important;
}
.skiptranslate, 
iframe.goog-te-banner-frame, 
.goog-te-banner-frame,
#goog-gt-tt, 
.goog-te-balloon-frame {
    display: none !important;
    visibility: hidden !important;
}
.goog-tooltip, .goog-tooltip:hover {
    display: none !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}