/* ============================================
   NAFIDH VIP - Shared Stylesheet
   Cross-browser compatible CSS
   ============================================ */

/* ============================================
   1. CSS RESET & BASE NORMALIZATION
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-family: 'Cairo', sans-serif;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. CSS VARIABLES (Custom Properties)
   ============================================ */
:root {
    --gold: #E0C58F;
    --gold-light: #F5E6C8;
    --gold-rgb: 224, 197, 143;
    --deep-navy: #0B132B;
    --light-navy: #1C2541;
    --card-bg: #1C2541;
    --white: #ffffff;
    --gray: #9BA4B5;
}

/* ============================================
   3. BASE BODY STYLES
   ============================================ */
body {
    background: radial-gradient(ellipse at center, var(--light-navy) 0%, var(--deep-navy) 70%);
    min-height: 100vh;
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "calt" 0;
    font-variant-ligatures: no-common-ligatures;
    text-align: initial;
}

/* ============================================
   4. LAYOUT COMPONENTS
   ============================================ */

/* Mobile-First Container */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* Desktop Container */
@media (min-width: 769px) {
    .container {
        max-width: 1200px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid rgba(224, 197, 143, 0.2);
        border-radius: 24px;
        background: rgba(11, 19, 43, 0.8);
        box-shadow:
            0 0 0 1px rgba(224, 197, 143, 0.1),
            0 25px 50px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    @supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
        .container {
            background: rgba(11, 19, 43, 0.3);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
        }
    }
}

/* ============================================
   5. LANGUAGE TOGGLE
   ============================================ */
.lang-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(145deg, rgba(224, 197, 143, 0.2) 0%, rgba(224, 197, 143, 0.3) 100%);
    border: 2px solid rgba(224, 197, 143, 0.5);
    border-radius: 10px;
    padding: 6px 12px;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.lang-toggle:hover {
    border-color: rgba(224, 197, 143, 0.7);
    transform: scale(1.05);
    background: linear-gradient(145deg, rgba(224, 197, 143, 0.3) 0%, rgba(224, 197, 143, 0.4) 100%);
}

[dir="ltr"] .lang-toggle {
    right: auto;
    left: 12px;
}

@media (min-width: 769px) {
    .lang-toggle {
        top: 16px;
        right: 16px;
        padding: 8px 16px;
        font-size: 0.95rem;
    }

    [dir="ltr"] .lang-toggle {
        right: auto;
        left: 16px;
    }
}

/* Privacy Policy: lang-toggle opposite side from back button */
/* RTL: back button starts on right, so lang-toggle goes on left */
.privacy-container .lang-toggle {
    left: 12px;
    right: auto;
}

/* LTR: back button starts on left, so lang-toggle goes on right */
[dir="ltr"] .privacy-container .lang-toggle {
    left: auto;
    right: 12px;
}

@media (min-width: 769px) {
    .privacy-container .lang-toggle {
        left: 16px;
        right: auto;
    }

    [dir="ltr"] .privacy-container .lang-toggle {
        left: auto;
        right: 16px;
    }
}

/* ============================================
   6. HEADER & LOGO
   ============================================ */
header {
    text-align: center;
    padding: 40px 0 0;
    position: relative;
}

@media (min-width: 769px) {
    header {
        padding: 60px 0 0;
    }
}

.logo-container {
    width: 100%;
    padding: 32px 24px;
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.6) 0%, rgba(11, 19, 43, 0.8) 100%);
    border: 2px solid rgba(224, 197, 143, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

@media (min-width: 769px) {
    .logo-container {
        padding: 50px 30px;
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.logo-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(224, 197, 143, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.logo-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: float 4s ease-in-out infinite;
    user-select: none;
    -webkit-user-select: none;
    object-fit: cover;
}

@media (min-width: 769px) {
    .logo-img {
        width: 120px;
        height: 120px;
    }
}

.logo-text {
    font-size: clamp(2.5rem, 12vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--gold);
    filter: drop-shadow(3px 6px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 20px rgba(224, 197, 143, 0.15));
    margin-bottom: 8px;
    line-height: 1.2;
    user-select: none;
}

.tagline {
    font-size: clamp(1.1rem, 4vw, 1.7rem);
    font-weight: 800;
    color: var(--gold);
    line-height: 1.6;
    margin-top: 16px;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.6);
}

.tagline span {
    opacity: 0.9;
}

/* ============================================
   7. ABOUT SECTION
   ============================================ */
.about-section {
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.7) 0%, rgba(11, 19, 43, 0.9) 100%);
    border: 2px solid rgba(224, 197, 143, 0.4);
    border-radius: 16px;
    padding: 32px 24px;
    margin: 20px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (min-width: 769px) {
    .about-section {
        padding: 60px 40px;
        margin: 20px 0 60px;
        border-radius: 30px;
    }
}

.about-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--gold);
    letter-spacing: 2px;
    text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5), 0 0 30px rgba(224, 197, 143, 0.2);
    text-align: center;
}

@media (min-width: 769px) {
    .about-title {
        text-align: right;
        margin-bottom: 30px;
    }
}

.about-text {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    line-height: 1.9;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
}

@media (min-width: 769px) {
    .about-text {
        text-align: right;
        line-height: 2.2;
        font-weight: 700;
    }
}

/* ============================================
   8. FEATURES SECTION
   ============================================ */
.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

@media (min-width: 769px) {
    .features {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 25px;
        margin: 50px 0;
    }
}

.feature-card {
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.8) 0%, rgba(11, 19, 43, 0.95) 100%);
    border: 2px solid rgba(224, 197, 143, 0.4);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
    .feature-card {
        background: linear-gradient(145deg, rgba(28, 37, 65, 0.6) 0%, rgba(11, 19, 43, 0.8) 100%);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

@media (min-width: 769px) {
    .feature-card {
        padding: 50px 30px;
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .feature-card:hover {
        transform: translateY(-12px) scale(1.02);
        border-color: rgba(224, 197, 143, 0.5);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(224, 197, 143, 0.1);
    }
}

.feature-title {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    color: var(--gold);
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4);
}

@media (min-width: 769px) {
    .feature-title {
        margin-bottom: 15px;
    }
}

.feature-desc {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: clamp(0.9rem, 3vw, 1.05rem);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 769px) {
    .feature-desc {
        font-weight: 700;
        line-height: 1.9;
    }
}

/* ============================================
   9. CTA SECTION
   ============================================ */
.cta-section {
    margin: 20px 0;
    text-align: center;
}

@media (min-width: 769px) {
    .cta-section {
        margin: 60px 0;
    }
}

.cta-btn {
    display: block;
    width: 100%;
    padding: 20px 24px;
    border: 2px solid rgba(224, 197, 143, 0.4);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.5) 0%, rgba(11, 19, 43, 0.7) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 2px;
    text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5), 0 0 30px rgba(224, 197, 143, 0.2);
    user-select: none;
    -webkit-touch-callout: none;
}

.cta-btn:active {
    transform: scale(0.98);
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.7) 0%, rgba(11, 19, 43, 0.9) 100%);
}

@media (min-width: 769px) {
    .cta-btn {
        display: inline-block;
        width: auto;
        min-width: 350px;
        padding: 25px 40px;
        border-radius: 20px;
    }

    .cta-btn:hover {
        transform: scale(1.03);
        border-color: rgba(224, 197, 143, 0.6);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(224, 197, 143, 0.15);
    }
}

/* ============================================
   10. FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid rgba(224, 197, 143, 0.15);
    color: var(--gray);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    margin-top: 20px;
}

footer p {
    text-align: center;
}

.footer-copyright {
    margin-bottom: 10px;
}

.footer-link {
    font-size: 0.85rem;
    margin-top: 10px;
}

.footer-link a,
.footer-link a:link,
.footer-link a:visited {
    color: var(--gold) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link a:hover {
    color: var(--white) !important;
}

@media (min-width: 769px) {
    footer {
        padding: 40px 0;
        margin-top: 40px;
    }
}

.gold {
    color: var(--gold);
    font-weight: 800;
}

/* ============================================
   11. PRIVACY POLICY SPECIFIC - Unique Design
   ============================================ */
.privacy-container {
    padding: 20px 16px;
    position: relative;
}

@media (min-width: 769px) {
    .privacy-container {
        padding: 40px 30px;
    }
}

/* Privacy title - large and centered */
.privacy-title {
    color: var(--gold);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 15px;
    margin-top: 60px;
    text-align: center;
    text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

@media (min-width: 769px) {
    .privacy-title {
        margin-top: 80px;
        margin-bottom: 20px;
    }
}

/* Privacy page back-link at bottom - centered style */
.privacy-container .back-link {
    display: block;
    width: fit-content;
    margin: 40px auto;
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 12px 20px;
    border: 2px solid rgba(var(--gold-rgb), 0.3);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.5) 0%, rgba(11, 19, 43, 0.7) 100%);
}

.back-link:hover {
    border-color: rgba(var(--gold-rgb), 0.6);
    transform: translateX(-5px);
}

[dir="ltr"] .back-link:hover {
    transform: translateX(5px);
}

[dir="ltr"] .back-link {
    left: auto;
    right: 12px;
}

.privacy-title {
    color: var(--gold);
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5), 0 0 30px rgba(var(--gold-rgb), 0.2);
    letter-spacing: 1px;
}

.update-date {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
}

.privacy-section {
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.6) 0%, rgba(11, 19, 43, 0.8) 100%);
    border: 2px solid rgba(var(--gold-rgb), 0.4);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (min-width: 769px) {
    .privacy-section {
        padding: 32px 28px;
        border-radius: 20px;
    }
}

.privacy-section h2 {
    color: var(--gold);
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: 1px;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4);
}

.privacy-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    line-height: 1.9;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-note {
    margin-top: 40px;
    padding: 24px 20px;
    background: linear-gradient(145deg, rgba(28, 37, 65, 0.6) 0%, rgba(11, 19, 43, 0.8) 100%);
    border: 2px solid rgba(var(--gold-rgb), 0.4);
    border-radius: 16px;
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (min-width: 769px) {
    .footer-note {
        padding: 28px;
        border-radius: 20px;
    }
}

/* ============================================
   12. LTR SPECIFIC STYLES
   ============================================ */
[dir="ltr"] body {
    text-align: left;
}

[dir="ltr"] .about-title,
[dir="ltr"] .about-text {
    text-align: left;
}

[dir="ltr"] .about-title {
    text-align: center;
}

@media (min-width: 769px) {
    [dir="ltr"] .about-title {
        text-align: left;
    }
}

[dir="ltr"] .feature-card {
    text-align: left;
}

[dir="ltr"] .logo-text {
    letter-spacing: 2px;
}

/* ============================================
   13. UTILITY CLASSES
   ============================================ */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ============================================
   14. ANIMATIONS
   ============================================ */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ============================================
   15. TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) {
    .feature-card:hover {
        transform: none;
    }

    .cta-btn:hover {
        transform: none;
    }

    .cta-btn:active {
        transform: scale(0.98);
    }
}
