/* 
 * COMPONENTS CSS - Premium UI Elements
 */

/* ==========================================================================
   BUTTONS (Pill Shape, Glows)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.875rem 2rem;
    /* Spacious */
    font-family: var(--font-ar);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    /* Apple Pill */
    transition: all var(--transition-smooth);
    cursor: pointer;
    border: none;
    line-height: 1;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Primary Button - Deep Blue Gradient */
.btn-primary {
    background: var(--color-primary);
    /* Fallback */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    /* Blue Glow */
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary/Accent Button - Teal */
.btn-secondary {
    background: var(--color-accent);
    background: linear-gradient(135deg, var(--color-accent) 0%, #00b8e6 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 210, 255, 0.4);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

/* Glass Button (White Text) */
.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ==========================================================================
   NAVBAR (Glassmorphism Sticky)
   ========================================================================== */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--space-sm) 0;
    transition: background 0.4s ease, box-shadow 0.4s ease, border-bottom-color 0.4s ease;
}

/* Transparent state — visually merges with hero */
.navbar--hero {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
}

/* Scrolled state — fixed, solid bar */
.navbar--scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-bottom-color: rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
    transition: transform var(--transition-fast);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

/* Active Dot Indicator */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 50%;
}

/* ==========================================================================
   CARDS (Glass & Float)
   ========================================================================== */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Glass Card Variant */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
}

/* Feature Icon Box */
.feat-icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0, 114, 255, 0.05), rgba(0, 210, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    transition: transform var(--transition-smooth);
}

.card:hover .feat-icon-box {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(0, 114, 255, 0.1), rgba(0, 210, 255, 0.1));
}

/* ==========================================================================
   FORMS (Minimal Inputs)
   ========================================================================== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid #e5e5ea;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang-switcher {
    display: flex;
    background: #e5e5ea;
    /* Light grey track */
    border-radius: var(--radius-full);
    padding: 2px;
    cursor: pointer;
}

.lang-opt {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.lang-opt.active {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   MOBILE TOGGLE
   ========================================================================== */
.menu-toggle {
    display: none;
    /* Desktop hidden */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.bar {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-surface);
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        gap: var(--space-md);
    }

    .nav-links.active {
        display: flex;
    }
}