/**
 * Components CSS - Floating Cards, Sidebar Navigation, Header
 * 
 * Responsibilities:
 * - Floating card component styles
 * - Sidebar navigation UI
 * - Header components
 * - Interactive states
 */

/* ============================================================================
   FLOATING CARDS
   ========================================================================= */

.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid #f3f4f6;
}

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

.card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-main);
    margin-bottom: var(--space-3);
}

.card-text {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

/* ============================================================================
   SIDEBAR NAVIGATION
   ========================================================================= */

.nav-container {
    padding: var(--space-8) 0;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: block;
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
}

.nav-link:hover {
    color: var(--text-main);
    background-color: rgba(254, 74, 73, 0.05);
    border-left-color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    background-color: rgba(254, 74, 73, 0.1);
    border-left-color: var(--primary);
    font-weight: var(--font-weight-semibold);
}

/* ============================================================================
   SECTION BACKGROUNDS & ALTERNATING COLORS
   ========================================================================= */

.content-section:nth-child(even) {
    background-color: var(--bg-light);
}

.content-section:nth-child(odd) {
    background-color: var(--white);
}

/* ============================================================================
   MOBILE HAMBURGER MENU (if needed)
   ========================================================================= */

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: calc(var(--z-fixed) + 1);
    background-color: var(--primary);
    color: var(--white);
    padding: var(--space-3);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-lg);
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* ============================================================================
   FOCUS STATES (Accessibility)
   ========================================================================= */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================================
   SCROLL MARGIN (for anchor links)
   ========================================================================= */

section[id] {
    scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

/* ============================================================================
   STEP 3: CARD HIERARCHY (FEATURED CARDS)
   ========================================================================= */

/* First card in each section is subtly featured */
.card:first-child {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(254, 74, 73, 0.08);
}

/* On desktop, featured card can span 2 columns in anchor sections */
@media (min-width: 1024px) {
    #vertex-nexus .card:first-child,
    #uk-healthcare .card:first-child,
    #operations-framework .card:first-child {
        grid-column: span 2;
    }
}

.card:first-child .card-title {
    font-size: var(--font-size-2xl);
    color: var(--primary);
}

/* ============================================================================
   STEP 4: SIDEBAR STATE FEEDBACK (ENHANCED)
   ========================================================================= */

.nav-link {
    transition: all 180ms var(--ease-out);
}

.nav-link.active {
    font-weight: var(--font-weight-semibold);
    background-color: rgba(254, 74, 73, 0.12);
    color: var(--primary);
    transform: translateX(3px);
}

.nav-link:hover:not(.active) {
    background-color: rgba(254, 74, 73, 0.05);
    transform: translateX(2px);
}

/* Active state indicator - subtle left border animation */
.nav-link::before {
    transition: transform 180ms var(--ease-out);
}

.nav-link.active::before {
    transform: scaleY(1);
}

/* ============================================================================
   STEP 5: VISUAL SPINE (STRUCTURAL COHERENCE)
   ========================================================================= */

/* Subtle vertical guide for visual flow */
.content-section {
    position: relative;
}

.content-section::after {
    content: '';
    position: absolute;
    left: 48px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(254, 74, 73, 0.08) 10%,
        rgba(254, 74, 73, 0.08) 90%,
        transparent 100%
    );
    opacity: 0.5;
}

/* Section header marker aligned with spine */
.section-title {
    position: relative;
    padding-left: var(--space-2);
}

.section-title::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary);
    opacity: 0.3;
}
