/*
    ======================================
    مفروشات القمة بالرياض - النظام البصري الرئيسي
    Primary CSS Styling & Design Tokens
    ======================================
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Brand Colors */
    --color-primary: #183C35;       /* Forest / Architectural Green */
    --color-primary-hover: #122E29;
    --color-primary-soft: rgba(24, 60, 53, 0.08);
    
    --color-dark: #151918;          /* Deep Graphite */
    --color-dark-elevated: #1F2524;
    
    --color-accent: #B96F4A;        /* Terracotta / Copper Clay */
    --color-accent-hover: #A05D3B;
    --color-accent-soft: rgba(185, 111, 74, 0.12);
    
    --color-warm-bg: #F1EADF;       /* Natural Limestone / Warm Beige */
    --color-light-bg: #FAF8F3;      /* Off-White Sand */
    --color-surface: #FFFFFF;
    --color-elevated-surface: #FCFAF6;
    
    /* Neutral Text */
    --color-text-primary: #1F2524;
    --color-text-secondary: #4E5654;
    --color-text-muted: #808B88;
    
    /* Borders & UI elements */
    --color-border: #D7D4CC;        /* Material Gray */
    --color-subtle-border: #E8E5DF;
    --color-focus: #B96F4A;
    --color-success: #2E7D32;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(21, 25, 24, 0.04);
    --shadow-md: 0 8px 24px rgba(21, 25, 24, 0.06);
    --shadow-lg: 0 16px 48px rgba(21, 25, 24, 0.1);
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, rgba(21, 25, 24, 0.95) 0%, rgba(24, 60, 53, 0.9) 100%);
    --gradient-overlay: linear-gradient(to bottom, rgba(21, 25, 24, 0) 0%, rgba(21, 25, 24, 0.85) 100%);
    --gradient-accent: linear-gradient(135deg, #B96F4A 0%, #D48863 100%);
    
    /* Typography */
    --font-primary: 'Cairo', sans-serif;
    
    /* Animation Tokens */
    --motion-micro: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --motion-standard: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --motion-reveal: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    --motion-stagger: 0.05s;
    
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    
    --header-height: 80px;
}

/* CSS Reset & Global Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-light-bg);
    color: var(--color-text-primary);
    line-height: 1.65;
    text-align: right;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--motion-micro);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-md);
}

button {
    font-family: var(--font-primary);
    border: none;
    background: none;
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.25;
}

p {
    color: var(--color-text-secondary);
}

.text-center { text-align: center; }

/* Buttons & Interactive Elements */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 28px;
    border-radius: var(--border-radius-md);
    transition: var(--motion-standard);
    gap: 8px;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-light-bg);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--color-accent);
    color: #FFFFFF;
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-light-bg);
}

.btn-outline-white {
    background-color: transparent;
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.btn-outline-white:hover {
    background-color: #FFFFFF;
    color: var(--color-primary);
}

.btn-whatsapp {
    background-color: #25D366;
    color: #FFFFFF;
}

.btn-whatsapp:hover {
    background-color: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

/* Header Component */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(250, 248, 243, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-subtle-border);
    z-index: 1000;
    transition: var(--motion-standard);
}

.site-header.scrolled {
    background-color: #FFFFFF;
    box-shadow: var(--shadow-sm);
    height: 72px;
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Premium Dynamic Logo Layout */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom SVG Brand Mark representing summit/layers */
.logo-mark svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .brand-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.logo-text .brand-sub {
    font-size: 11px;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Desktop Menu Layout */
.main-nav {
    display: flex;
    align-items: center;
}

.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 8px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--motion-standard);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Dropdown Support */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: -20px;
    background-color: #FFFFFF;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-subtle-border);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--motion-standard);
    padding: 12px 0;
    z-index: 1010;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 24px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.dropdown-menu a:hover {
    background-color: var(--color-light-bg);
    color: var(--color-primary);
    padding-right: 28px;
}

.dropdown-menu a::after {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hamburger toggle menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: var(--motion-standard);
}

/* Mobile Drawer Styles */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(21, 25, 24, 0.4);
    backdrop-filter: blur(8px);
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: var(--motion-standard);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background-color: #FFFFFF;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--motion-standard);
}

.mobile-nav-overlay.active .mobile-drawer {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-primary);
}

.mobile-links {
    margin-bottom: auto;
}

.mobile-links > ul > li {
    margin-bottom: 24px;
}

.mobile-links a {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
}

.mobile-sub-menu {
    padding-right: 16px;
    margin-top: 12px;
    border-right: 2px solid var(--color-subtle-border);
}

.mobile-sub-menu li {
    margin-bottom: 12px;
}

.mobile-sub-menu a {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Sections Structure */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--color-warm-bg);
}

.section-dark {
    background-color: var(--color-dark);
    color: #FFFFFF;
}

.section-header {
    margin-bottom: 50px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--color-accent-soft);
    color: var(--color-accent);
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 16px;
}

.section-dark .section-badge {
    background-color: rgba(185, 111, 74, 0.2);
    color: #FFB38A;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-dark h2 {
    color: #FFFFFF;
}

.section-desc {
    font-size: 17px;
    color: var(--color-text-secondary);
    max-width: 680px;
    margin: 0 auto;
}

.section-dark .section-desc {
    color: var(--color-border);
}

/* FAQ Accordion Styling */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: #FFFFFF;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-subtle-border);
    overflow: hidden;
    transition: var(--motion-standard);
}

.faq-item:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.faq-trigger {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--color-primary);
    text-align: right;
}

.faq-icon {
    font-size: 20px;
    color: var(--color-accent);
    transition: var(--motion-standard);
}

.faq-trigger[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-content p {
    padding: 0 24px 24px;
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* Footer Section Styling */
.site-footer {
    background-color: var(--color-dark);
    color: #FFFFFF;
    padding: 80px 0 30px;
    border-top: 4px solid var(--color-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-col h3 {
    color: #FFFFFF;
    font-size: 22px;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--color-warm-bg);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-accent);
}

.footer-col p {
    color: var(--color-border);
    font-size: 14px;
    line-height: 1.7;
}

.footer-links-list li {
    margin-bottom: 12px;
}

.footer-links-list a {
    color: var(--color-border);
    font-size: 14px;
}

.footer-links-list a:hover {
    color: var(--color-accent);
    padding-right: 4px;
}

.footer-contact-info li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--color-border);
    font-size: 14px;
}

.footer-contact-info svg {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(215, 212, 204, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Floating conversion dock for mobile */
.mobile-sticky-dock {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    background: rgba(21, 25, 24, 0.9);
    border: 1px solid rgba(215, 212, 204, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 32px rgba(21, 25, 24, 0.25);
    display: none;
    grid-template-columns: 1fr 1fr;
    padding: 6px;
    gap: 6px;
    z-index: 950;
    transition: var(--motion-standard);
}

.mobile-sticky-dock.scrolled {
    transform: translateY(0);
}

.dock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 14px;
    color: #FFFFFF;
    gap: 8px;
}

.dock-btn.phone {
    background-color: var(--color-primary);
}

.dock-btn.whatsapp {
    background-color: #25D366;
}

.dock-btn svg {
    width: 18px;
    height: 18px;
}

/* Scroll Animation Utilities */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--motion-reveal), transform var(--motion-reveal);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* --- Media Queries --- */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .site-header.scrolled {
        height: 70px;
    }
    
    .main-nav {
        display: none;
    }
    
    .header-actions .btn {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .mobile-sticky-dock {
        display: grid;
    }
}

/* 
    ======================================
    Cinematic Scrollytelling Experience
    ======================================
*/
.hero-scroll-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    background-color: var(--color-dark);
}

.hero-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    visibility: hidden;
}

.hero-panel.active-panel {
    visibility: visible;
}

.panel-1 { z-index: 5; }
.panel-2 { z-index: 4; }
.panel-3 { z-index: 3; }
.panel-4 { z-index: 2; }
.panel-5 { z-index: 1; }

.panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: -2;
    overflow: hidden;
}

.panel-1 .panel-bg-left { clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); }
.panel-1 .panel-bg-right { clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); }

.panel-2 .panel-bg-top { clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%); }
.panel-2 .panel-bg-bottom { clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%); }

.panel-3 .panel-bg-full { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

.panel-4 .panel-bg-left-slide { clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); }
.panel-4 .panel-bg-right-slide { clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); }

.panel-5 .panel-bg-top-slide { clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%); }
.panel-5 .panel-bg-bottom-slide { clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%); }

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, rgba(21, 25, 24, 0.2) 0%, rgba(21, 25, 24, 0.6) 100%);
    z-index: -1;
}

.panel-container {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 120px 24px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.panel-content {
    position: relative;
    z-index: 2;
    color: #FFFFFF;
    max-width: 850px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    transform: translateY(0);
}

.panel-content h1, 
.panel-content h2, 
.panel-content p {
    text-shadow: 0 4px 15px rgba(21, 25, 24, 0.8), 0 1px 3px rgba(21, 25, 24, 0.5);
}

.panel-number {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-accent);
    letter-spacing: 4px;
}

.panel-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(185, 111, 74, 0.15);
    border: 1px solid rgba(185, 111, 74, 0.3);
    color: var(--color-accent);
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 13px;
}

.panel-title {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.25;
    color: #FFFFFF;
}

.panel-subtitle {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-warm-bg);
}

.panel-desc {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-border);
    max-width: 650px;
}

.panel-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Dots navigation */
.scroll-progress-dots {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.scroll-progress-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-progress-dots .dot.active {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.3);
}

/* prefers-reduced-motion fallback */
@media (prefers-reduced-motion: reduce) {
    .hero-scroll-container {
        height: auto;
        overflow: visible;
    }
    .hero-panel {
        position: relative;
        height: auto;
        visibility: visible;
        display: block;
        padding: 80px 0;
    }
    .panel-bg {
        position: absolute;
        width: 100%;
        height: 100%;
    }
    .bg-image {
        width: 100%;
        height: 100%;
        transform: none !important;
    }
    .panel-1 .panel-bg-left,
    .panel-1 .panel-bg-right,
    .panel-2 .panel-bg-top,
    .panel-2 .panel-bg-bottom,
    .panel-4 .panel-bg-left-slide,
    .panel-4 .panel-bg-right-slide,
    .panel-5 .panel-bg-top-slide,
    .panel-5 .panel-bg-bottom-slide {
        clip-path: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    .scroll-progress-dots {
        display: none;
    }
}

/* Responsive breakpoint overrides for mobile viewports */
@media (max-width: 768px) {
    .panel-container {
        padding: 90px 16px 60px;
    }
    .panel-content {
        gap: 16px;
    }
    .panel-title {
        font-size: 32px;
    }
    .panel-subtitle {
        font-size: 18px;
    }
    .panel-desc {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 8px;
    }
    /* Keep dots visible on mobile for easy navigation */
    .scroll-progress-dots {
        left: 20px;
        gap: 8px;
    }
    .scroll-progress-dots .dot {
        width: 8px;
        height: 8px;
    }
}


