/* File: style.css */
/* COMPLETELY CLEAN VERSION - Phase 2 Ready */

/* 1. CSS Variables (from your brand guide) */
:root {
    --brand-dark-blue: #001A45;
    --brand-accent: #3B82F6;
    --brand-gold: #FBBF24;
    --brand-text-dark: #1F2937;
    --brand-text-light: #FFFFFF;
    --brand-subtle: #6B7280;
    --page-bg: #F3F4F6;
    --card-bg: #FFFFFF;
    --font-serif: "DM Serif Display", serif;
    --font-sans: "Inter", sans-serif;
    /* Shared values for consistency */
    --max-content-width: 1200px;
    --z-footer: 50;
    --z-floating-search: 500;
}

/* 2. Modern CSS Reset (makes browsers behave consistently) */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background-color: #F3F4F6; /* Ensure grey background */
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* 3. Global Body Styles - Consolidated */
body {
    font-family: var(--font-sans);
    color: var(--brand-text-dark);
    background-color: #F3F4F6 !important; /* Grey background for all pages */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure Tailwind class also applies grey background */
body.bg-page-bg {
    background-color: #F3F4F6 !important;
}

/* 4. Basic Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--brand-dark-blue);
    line-height: 1.2;
}

a {
    color: var(--brand-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* 5. Utility Classes */
.container {
    width: 90%;
    max-width: var(--max-content-width);
    margin-left: auto;
    margin-right: auto;
}

/* Page Header - Centered title styling for about, privacy, contact pages */
.page-header {
    background: linear-gradient(135deg, rgba(0, 26, 69, 0.03), rgba(59, 130, 246, 0.02));
    padding: 3rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 26, 69, 0.1);
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-dark-blue);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--brand-subtle);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Prose content styles for about and privacy pages */
.prose {
    max-width: 65ch;
    margin: 0 auto;
    line-height: 1.7;
}

.prose-centered {
    text-align: center;
}

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.875rem;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Contact Page Styles */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-details h3 {
    color: var(--brand-dark-blue);
    margin-bottom: 1rem;
}

.contact-details p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.form-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--brand-text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-button {
    background: var(--brand-accent);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .prose {
        padding: 0 1rem;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-card {
        padding: 1.5rem;
    }
}

/* NO HEADER OR NAVIGATION STYLES */
/* Clean slate ready for Phase 2 sophisticated system */


/* =====================================================
   LEARNING CENTER REDESIGN - NO SIDEBAR VERSION
   ===================================================== */

/* Remove all sidebar styles and layout */
.learning-center-layout {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.learning-sidebar {
    display: none !important;
}

.learning-content-pane {
    width: calc(100% - 4rem) !important;
    max-width: 1200px !important;
    margin: 2rem auto !important;
    padding: 3rem !important;
    background: #FFFFFF !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1) !important;
    position: relative !important;
    z-index: 1 !important;
    min-height: auto !important; /* Don't force full height */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .learning-content-pane {
        width: calc(100% - 2rem) !important;
        margin: 1rem auto !important;
        padding: 1.5rem !important;
    }
}

/* Ensure main content has proper spacing */
.learning-content-pane > div {
    /* Removed conflicting styles - now handled by parent */
}

/* =====================================================
   FLOATING SEARCH COMPONENT
   ===================================================== */

.floating-search {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-floating-search);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-search-button {
    width: 56px;
    height: 56px;
    background: var(--brand-accent);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    font-size: 20px;
}

.floating-search-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.floating-search-button:active {
    transform: scale(0.95);
}

/* Search panel */
.floating-search-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-search.expanded .floating-search-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-search.expanded .floating-search-button {
    background: var(--brand-dark-blue);
    transform: rotate(45deg);
}

/* Search form */
.floating-search-form {
    padding: 20px;
}

.floating-search-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-dark-blue);
    margin-bottom: 12px;
    text-align: center;
}

.floating-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    outline: none;
}

.floating-search-input:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.floating-search-input::placeholder {
    color: var(--brand-subtle);
}

/* Search results */
.floating-search-results {
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
    padding-top: 12px;
}

.floating-search-result {
    display: block;
    padding: 8px 12px;
    color: var(--brand-text-dark);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.floating-search-result:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.floating-search-result-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.floating-search-result-excerpt {
    color: var(--brand-subtle);
    font-size: 12px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .floating-search {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-search-panel {
        width: 280px;
        right: -20px;
    }
    
    .floating-search-button {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
}

/* Hide on very small screens to avoid interference */
@media (max-width: 480px) {
    .floating-search-panel {
        width: calc(100vw - 80px);
        right: -20px;
    }
}

/* Learning Center specific content styles */
.tutorial-container {
    max-width: none !important;
}

.tutorial-container h2 {
    scroll-margin-top: 80px; /* Account for fixed header */
}

/* Ensure proper spacing for learning center content */
.learning-content-pane .max-w-4xl {
    max-width: var(--max-content-width) !important;
}

/* Global fix for hero titles in Learning Center - prevents text cutoff */
.hero-title {
    line-height: 1.35 !important; /* Prevent descender cutoff */
    padding-bottom: 0.15em !important; /* Additional space for descenders */
    margin-bottom: 0.5rem !important; /* Proper spacing below */
    display: block !important; /* Ensure block display */
}

/* Ensure hero container has proper spacing */
.hero-container {
    padding-bottom: 2rem !important; /* Space at bottom of container */
    margin-bottom: 3rem !important; /* Space before content */
}

/* ==========================================================================
   FOOTER STYLES - MyFedPath - COMPACT VERSION WITH FULL DISCLAIMER
   ========================================================================== */

.site-footer {
    background: var(--brand-dark-blue);
    color: var(--brand-text-light);
    padding: 8px 0;
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: var(--z-footer);
}

.footer-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* Footer Navigation */
.footer-nav {
    margin-bottom: 4px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-nav li {
    margin: 0;
}

.footer-nav a {
    color: var(--brand-text-light);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-nav a:hover {
    color: var(--brand-gold);
}

/* Copyright Text with full disclaimer */
.copyright-text {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

/* ==========================================================================
   GLOSSARY TOOLTIP STYLES
   ========================================================================== */

/* Tooltip container - the term that triggers the tooltip */
.glossary-term {
    position: relative;
    display: inline;
    border-bottom: 2px dotted var(--brand-accent);
    color: var(--brand-dark-blue);
    cursor: help;
    font-weight: 500;
    transition: border-color 0.2s ease;
}

.glossary-term:hover {
    border-bottom-color: var(--brand-dark-blue);
}

/* Tooltip content - hidden by default */
.glossary-term .tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-width: 90vw;
    padding: 12px 16px;
    background: var(--brand-dark-blue);
    color: white;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.4;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Tooltip arrow */
.glossary-term .tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 0 6px;
    border-color: var(--brand-dark-blue) transparent transparent transparent;
}

/* Show tooltip on hover */
.glossary-term:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Responsive adjustments for tooltips */
@media (max-width: 768px) {
    .glossary-term .tooltip-content {
        width: 240px;
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .glossary-term .tooltip-content {
        width: 200px;
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* Alternative positioning when tooltip would go off-screen */
.glossary-term .tooltip-content.tooltip-below {
    bottom: auto;
    top: calc(100% + 8px);
}

.glossary-term .tooltip-content.tooltip-below::after {
    top: auto;
    bottom: 100%;
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent var(--brand-dark-blue) transparent;
}

/* Main content sizing */
main {
    /* Removed flex grow to prevent full viewport fill */
    background-color: transparent !important; /* Ensure main doesn't override background */
    padding: 2rem 0; /* Add vertical padding to create space */
}

/* Override any conflicting styles */
#footer-placeholder {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.site-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-footer {
        padding: 6px 0;
    }
    
    .footer-nav ul {
        gap: 15px;
    }
    
    .footer-nav a {
        font-size: 10px;
    }
    
    .copyright-text {
        font-size: 8px;
        padding: 0 10px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .footer-container {
        padding: 0 10px;
    }
    
    .footer-nav ul {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .footer-nav a {
        font-size: 9px;
    }
    
    .copyright-text {
        font-size: 7px;
    }
}
