/* ==========================================================================
   Base: design tokens, reset, page background, shared utilities
   ========================================================================== */

:root {
    --primary: #FFD700;
    --secondary: #1A1A1A;
    --accent: #C19A6B;
    --dark: #000000;
    --light: #FFFFFF;
    --glass-bg: rgba(26, 26, 26, 0.92);
    --glass-border: rgba(193, 154, 107, 0.25);
    --section-border: rgba(255, 215, 0, 0.12);
    --gold-glow: 0 0 15px rgba(255, 215, 0, 0.6),
                 0 0 30px rgba(255, 215, 0, 0.4),
                 0 0 45px rgba(255, 215, 0, 0.2),
                 0 0 60px rgba(255, 215, 0, 0.1);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    --luxury-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #DAA520 50%, #C19A6B 100%);
    --premium-gradient: linear-gradient(135deg, #FFD700 0%, #FDB931 25%, #C19A6B 50%, #DAA520 75%, #FFD700 100%);
    --section-divider: linear-gradient(90deg,
        transparent,
        rgba(255, 215, 0, 0.08) 20%,
        rgba(255, 215, 0, 0.4) 50%,
        rgba(255, 215, 0, 0.08) 80%,
        transparent
    );
    --shimmer: linear-gradient(90deg,
        transparent,
        rgba(255, 215, 0, 0.3) 25%,
        rgba(255, 215, 0, 0.5) 50%,
        rgba(255, 215, 0, 0.3) 75%,
        transparent
    );
    --gold-border: linear-gradient(to right, transparent, var(--primary) 50%, transparent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* The hidden attribute must always win over component display rules */
[hidden] {
    display: none !important;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--light);
    background: var(--secondary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(255, 215, 0, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 85% 85%, rgba(193, 154, 107, 0.08) 0%, transparent 60%),
        linear-gradient(45deg, rgba(0, 0, 0, 0.9) 0%, rgba(26, 26, 26, 0.9) 100%);
    background-attachment: fixed;
    background-size: 200% 200%, 200% 200%, 100% 100%;
    animation: gradientShift 15s ease infinite;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        url('https://www.transparenttextures.com/patterns/carbon-fibre.png'),
        radial-gradient(circle at top right, rgba(255, 215, 0, 0.15), transparent 50%),
        radial-gradient(circle at bottom left, rgba(193, 154, 107, 0.1), transparent 50%);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    background: var(--secondary);
}

::-webkit-scrollbar-track {
    background: var(--secondary);
    border-left: 1px solid rgba(255, 215, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-gradient);
    border-radius: 6px;
    border: 3px solid var(--secondary);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: var(--gold-glow);
}

/* Glass panel (must stay before component styles that override it) */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass:hover {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Shared page section: padding, glowing top divider, soft corner glow */
.section {
    position: relative;
    overflow: hidden;
    padding: 6rem 5%;
    background: var(--secondary);
    scroll-margin-top: 80px;
}

.section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 215, 0, 0.1), transparent 60%),
        radial-gradient(circle at bottom left, rgba(193, 154, 107, 0.05), transparent 60%);
    pointer-events: none;
}

.section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--section-divider);
    box-shadow: var(--gold-glow);
}

.section > * {
    position: relative;
    z-index: 1;
}

/* Animated dark gradient background for alternating sections */
.section-animated {
    background: linear-gradient(-45deg,
        rgba(18, 18, 18, 1),
        rgba(22, 22, 22, 1),
        rgba(20, 20, 20, 1),
        rgba(18, 18, 18, 1));
    background-size: 400% 400%;
    animation: subtleGradient 15s ease infinite;
}

/* Shared section headings */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    margin-bottom: 1.5rem;
    font-size: 2.8rem;
    color: var(--primary);
    text-align: center;
    text-shadow: var(--text-shadow);
}

.title-icon {
    margin-inline-end: 1rem;
    color: var(--primary);
    font-size: 2rem;
    opacity: 0.8;
    vertical-align: middle;
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto 4rem;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.9;
}

/* Shared animations */
@keyframes gradientShift {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes subtleGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%   { opacity: 0.8; }
    50%  { opacity: 1; }
    100% { opacity: 0.8; }
}

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

@media (max-width: 1024px) {
    .section {
        padding: 4.5rem 1.25rem;
    }

    .section-subtitle {
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 3.5rem 1rem;
    }

    .section-title {
        gap: 0.6rem;
        font-size: 1.75rem;
    }

    .title-icon {
        margin-inline-end: 0;
        font-size: 1.2rem;
    }

    .section-subtitle {
        margin-bottom: 2rem;
        font-size: 1rem;
    }
}
