/* hanegr.css — V4 Optimized: SEO · Mobile-First · CRO · Accessibility */

@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;500;700;900&display=swap');

/* ==========================================
   CSS Custom Properties
   ========================================== */
:root {
    --primary-gold: #C5A059;
    --secondary-gold: #D4AF37;
    --gold-light: #F3E2B3;
    --dark-bg: #050505;
    --dark-surface: #121212;
    --radius-card: 1.5rem;
    --radius-btn: 1rem;
    --transition-base: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   Base
   ========================================== */
body {
    font-family: 'Noto Kufi Arabic', system-ui, sans-serif;
    background-color: var(--dark-bg);
    direction: rtl;
    color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--primary-gold);
    color: #000;
    padding: .5rem 1rem;
    border-radius: 0 0 .5rem .5rem;
    font-weight: bold;
    z-index: 9999;
    transition: top .2s;
}
.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard nav */
:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==========================================
   Typography
   ========================================== */
.gold-text {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--primary-gold) 50%, #8E6D2F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* ==========================================
   Cards
   ========================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    transition: all var(--transition-slow);
}
.glass-card:hover {
    border-color: rgba(197, 160, 89, 0.5);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   Buttons
   ========================================== */
.btn-gold {
    background: linear-gradient(45deg, var(--primary-gold), #e6c57d);
    color: #000 !important;
    font-weight: 900;
    border-radius: var(--radius-btn);
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
}
.btn-gold:hover,
.btn-gold:focus-visible {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.5);
    color: #000 !important;
}

/* ==========================================
   Hero Swiper
   ========================================== */
.hero-swiper {
    height: 80vh;
    width: 100%;
    min-height: 500px;
}
@media (min-width: 768px) {
    .hero-swiper { height: 90vh; }
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 10s ease-out;
    z-index: 1;
    will-change: transform;
}
.swiper-slide-active .slide-bg {
    transform: scale(1.12);
}
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #050505 0%, rgba(5, 5, 5, 0.75) 30%, rgba(5, 5, 5, 0.25) 100%);
    z-index: 2;
}
.slide-content {
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.3s;
}
.swiper-slide-active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Stats Strip
   ========================================== */
.stat-card {
    transition: transform var(--transition-base), border-color var(--transition-base);
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(197, 160, 89, 0.3) !important;
}

/* ==========================================
   Area Cards (Local SEO)
   ========================================== */
.area-card {
    transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}
.area-card:hover {
    transform: translateY(-2px);
}

/* ==========================================
   FAQ Accordion
   ========================================== */
.hg-faq-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.hg-faq-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--transition-base);
}
.hg-faq-item:hover {
    border-color: rgba(197, 160, 89, 0.3);
}

.hg-faq-toggle {
    display: none;
}

.hg-faq-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    user-select: none;
    transition: color var(--transition-base), background var(--transition-base);
    line-height: 1.5;
}
.hg-faq-label:hover {
    background: rgba(197, 160, 89, 0.05);
    color: var(--primary-gold);
}

.hg-faq-icon {
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.hg-faq-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    color: #ccc;
    font-size: .95rem;
    line-height: 1.75;
    opacity: 0;
    transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.35s ease;
}

.hg-faq-toggle:checked ~ .hg-faq-label .hg-faq-icon {
    transform: rotate(180deg);
}
.hg-faq-toggle:checked ~ .hg-faq-body {
    max-height: 600px;
    padding: 0 1.5rem 1.5rem;
    opacity: 1;
}
.hg-faq-toggle:checked ~ .hg-faq-label {
    color: var(--primary-gold);
}

.hg-content-link {
    color: var(--primary-gold);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hg-content-link:hover {
    color: var(--gold-light);
}

/* ==========================================
   Responsive Table
   ========================================== */
@media (max-width: 768px) {
    .responsive-table {
        min-width: unset !important;
    }
    .responsive-table thead {
        display: none;
    }
    .responsive-table tbody tr {
        display: block;
        background: rgba(255, 255, 255, 0.03);
        padding: 1rem;
        border-radius: .75rem;
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: .5rem;
        padding: .6rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        font-size: .875rem;
    }
    .responsive-table td:last-child {
        border-bottom: none;
    }
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--primary-gold);
        flex-shrink: 0;
        min-width: 80px;
    }
}

/* ==========================================
   Mobile Sticky Bar
   ========================================== */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--primary-gold);
    padding: .75rem 1rem;
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
    z-index: 9999;
    display: none;
    gap: .625rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   Mobile / Responsive Overrides
   ========================================== */

/* 320px — smallest phones */
@media (max-width: 374px) {
    .hero-swiper,
    .hero-swiper .swiper-slide {
        height: calc(100svh - 60px) !important;
        min-height: 480px;
    }
    .slide-content-wrapper {
        padding-top: 80px !important;
        padding-bottom: 60px !important;
    }
    .hg-faq-label {
        font-size: .875rem;
        padding: 1rem 1.125rem;
    }
}

/* 375–414px — common iPhones & Android */
@media (max-width: 414px) {
    .mobile-sticky-bar {
        display: flex;
    }
    body {
        padding-bottom: 76px;
    }
    .hero-swiper,
    .hero-swiper .swiper-slide {
        height: calc(100svh - 76px) !important;
        min-height: 500px;
    }
    .slide-content-wrapper {
        padding-top: 100px !important;
        padding-bottom: 76px !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .btn-gold,
    a[class*="py-4"] {
        padding-top: .875rem;
        padding-bottom: .875rem;
        font-size: 1rem;
    }
    /* Typography scale-down */
    h1, .text-3xl { font-size: 1.6rem !important; line-height: 1.3; }
    h2, .md\:text-5xl { font-size: 1.4rem !important; }
    .text-2xl { font-size: 1.1rem !important; }
}

/* 415–767px — larger phones / phablets */
@media (min-width: 415px) and (max-width: 767px) {
    .mobile-sticky-bar { display: flex; }
    body { padding-bottom: 76px; }
    .hero-swiper,
    .hero-swiper .swiper-slide {
        height: calc(100svh - 76px) !important;
        min-height: 520px;
    }
    .slide-content-wrapper {
        padding-top: 110px !important;
        padding-bottom: 80px !important;
    }
}

/* 768px — tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   CLS Prevention — Reserve space for images
   ========================================== */
.hero-swiper .swiper-slide img,
#portfolio img {
    aspect-ratio: 3 / 2;
    width: 100%;
    height: auto;
}
#portfolio .group {
    contain: layout style;
}

/* ==========================================
   Reduced Motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .swiper-slide-active .slide-bg {
        transform: none !important;
    }
}

/* ==========================================
   High Contrast Support
   ========================================== */
@media (forced-colors: active) {
    .btn-gold {
        border: 2px solid ButtonText;
    }
    .gold-text {
        -webkit-text-fill-color: unset;
        color: ButtonText;
    }
}

/* ==========================================
   Print — Hide decorative elements
   ========================================== */
@media print {
    .mobile-sticky-bar,
    .hero-swiper,
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination { display: none !important; }
    body { background: #fff; color: #000; }
}
