/* PS Interview Scribes - Main Stylesheet
   Based on PS Interview Coach Framework
   Theme: Bureaucratic Elegance (Navy Blue & White)
*/

:root {
    /* Updated Palette for PS Interview Scribes */
    --primary-color: #003366; /* Navy Blue - High Authority */
    --primary-hover: #002244; /* Darker Navy */
    --secondary-color: #1a1a1a; /* Almost Black for Footer */
    --accent-gold: #C5A065; /* Subtle Gold for accenting high-value items */
    
    --bg-light: #f4f6f8; /* Cool Grey for backgrounds */
    --bg-white: #ffffff;
    
    --text-dark: #111827; /* High contrast black */
    /* UPDATED: Darkened for better contrast (WCAG AAA) */
    --text-light: #374151; /* Gray-700 - Previously #4B5563 was too light */
    --text-white: #ffffff;
    
    --border-light: #e5e7eb;
    --border-color: #d1d5db;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-full: 9999px;
}

/* Base Styles & Accessibility Enforcers */
body {
    font-family: 'Inter', 'Arial', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-white);
}

/* WCAG 2.1 AA Focus States */
:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    color: #066953; /* Updated to Teal Green as requested */
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease-in-out;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--text-white);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Navigation & Header */
header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.navbar-menu > li > a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.navbar-menu > li > a:hover,
.navbar-menu > li > a.active {
    color: var(--primary-color);
}

.navbar-menu > li > a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Mega Menu / Dropdown Logic */
.navbar-dropdown {
    position: relative;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -50px; /* Slight offset for alignment */
    width: 500px; /* Fixed width as requested */
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 1.5rem;
    gap: 1.5rem;
    border-top: 3px solid var(--primary-color);
    flex-direction: row;
}

.navbar-dropdown:hover .mega-menu {
    display: flex;
}

.mega-menu-column {
    flex: 1;
}

.mega-menu-header {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.mega-menu a {
    color: var(--text-light);
    padding: 0.4rem 0;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.mega-menu a:hover {
    color: var(--primary-color);
    padding-left: 4px; /* Subtle movement interaction */
}

/* Sections */
section {
    padding: 5rem 0;
}

/* RESTORED: Default striping for visual depth */
section:nth-child(even) {
    background-color: var(--bg-light);
}

/* CRITICAL FIX: Force the Navy background to override section striping 
   Uses CSS escaping to target the Tailwind class .bg-[#003366]
   and applies !important to win the specificity war against nth-child
*/
.bg-\[\#003366\] {
    background-color: #003366 !important;
    color: #ffffff !important;
}

/* FORCE WHITE TEXT inside Navy sections */
.bg-\[\#003366\] h1,
.bg-\[\#003366\] h2,
.bg-\[\#003366\] h3,
.bg-\[\#003366\] p,
.bg-\[\#003366\] i,
.bg-\[\#003366\] .text-gray-300 {
    color: #ffffff !important;
}


/* Footer Specifics */
footer {
    background-color: var(--primary-color) !important; /* Force Navy Background */
    color: var(--text-white) !important;
    padding: 4rem 0 2rem;
}

.footer-title {
    color: #ffffff !important; /* White for accessibility on dark background */
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Explicitly set all headings in the footer to white */
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
    color: #ffffff !important;
}

.footer-links a {
    color: #e2e8f0;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.son-badge {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Mobile Menu Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background-color: white;
    z-index: 1100;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1.5rem;
}

.mobile-menu.active {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1090;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

/* Online Indicator */
.online-status-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    margin-left: 1rem;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.online-text {
    font-weight: 600;
    color: #166534;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

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