/* Base Styles */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

a, .btn-link {
    color: #006bb7;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover, .btn-link:hover {
    color: #00508c;
    text-decoration: underline;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #155d9c;
    border-color: #134f85;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Timeline Specific Styles */
.timeline-wrapper {
    position: relative;
    padding: 2rem 0;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #9b59b6, #e74c3c);
    border-radius: 10px;
}

.timeline-section {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
    display: block;
}

.timeline-header {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-content {
    padding: 2rem;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.timeline-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.timeline-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

/* Responsive Timeline */
@media (max-width: 991.98px) {
    .timeline-wrapper::before {
        left: 30px;
    }
    
    .timeline-section {
        padding-left: 60px;
    }
    
    .timeline-content {
        margin-left: 0;
    }
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.125);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Timeline section animations */
.timeline-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: block;
}

.timeline-section.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Staggered animation delays */
.timeline-section.visible:nth-child(1) { transition-delay: 0.1s; }
.timeline-section.visible:nth-child(2) { transition-delay: 0.2s; }
.timeline-section.visible:nth-child(3) { transition-delay: 0.3s; }
.timeline-section.visible:nth-child(4) { transition-delay: 0.4s; }
.timeline-section.visible:nth-child(5) { transition-delay: 0.5s; }

/* Checkmark animations */
.timeline-content .fa-check {
    animation: checkmarkPop 0.3s ease-out;
    animation-delay: calc(var(--i) * 0.1s);
    animation-fill-mode: both;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation for checkmarks */
@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.timeline-content li i.fa-check {
    animation: checkmark 0.5s ease-out forwards;
    animation-delay: calc(0.1s * var(--i, 0));
}

/* Blazor Error Boundary */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTE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TI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Custom styles for NCAA Scholarship Guide */
.hero-section {
    background: linear-gradient(135deg, #1b6ec2 0%, #0d47a1 100%);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #17a2b8 0%, #17a2b8 25%, #ffc107 25%, #ffc107 50%, #28a745 50%, #28a745 75%, #dc3545 75%, #dc3545 100%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid white;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: 1rem;
}

.card {
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

/* Visual Timeline Styles */
.timeline-visual {
    position: relative;
    padding: 2rem 0;
}

.timeline-visual::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #17a2b8, #ffc107, #28a745, #dc3545);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-visual .timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-visual .timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-visual .timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-visual .timeline-marker {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin: 0 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 4px solid white;
}

.timeline-visual .timeline-content-visual {
    flex: 1;
    max-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

.timeline-visual .timeline-item:nth-child(even) .timeline-content-visual {
    text-align: right;
}

@media (max-width: 768px) {
    .timeline-visual::before {
        left: 30px;
    }
    
    .timeline-visual .timeline-item {
        flex-direction: row !important;
        margin-left: 0;
    }
    
    .timeline-visual .timeline-marker {
        margin: 0 1rem 0 0;
        width: 50px;
        height: 50px;
    }
    
    .timeline-visual .timeline-content-visual {
        text-align: left !important;
        max-width: none;
    }
}

.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Colleges Finder Styles */
.college-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.college-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.college-card .card-header {
    border-bottom: 2px solid #e9ecef;
}

.college-card .badge {
    font-size: 0.75em;
}

.college-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%);
    border-color: #0891b2;
}

/* Z-Index Management - Ensure proper layering */
.dropdown-menu {
    z-index: 1050 !important; /* Higher than top-row and modals */
}

.top-row {
    z-index: 1030 !important; /* Above content but below dropdowns */
}

.sidebar {
    z-index: 1020 !important; /* Above content */
}

/* Ensure dropdown toggle button doesn't get covered */
.dropdown .btn {
    z-index: 1031;
    position: relative;
}

/* Hide Bootstrap's default dropdown caret/arrow */
.dropdown-toggle::after {
    display: none !important;
}

/* ============================================
   GLOBAL DESIGN SYSTEM - Consistent UI Styles
   ============================================ */

/* Color Variables */
:root {
    --color-primary: #0ea5e9;
    --color-primary-dark: #0284c7;
    --color-accent: #f97316;
    --color-accent-dark: #ea580c;
    --color-dark: #0f172a;
    --color-dark-blue: #1e3a5f;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-bg-light: #f8fafc;
    --color-border: #e5e7eb;
}

/* Global Hero Section */
.page-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0ea5e9 100%);
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-hero .hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Global Breadcrumb */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-nav a:hover {
    color: #f97316;
}

.breadcrumb-nav i.fa-chevron-right {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

.breadcrumb-nav span {
    color: white;
}

/* Global Content Container */
.page-container {
    padding: 48px 0;
    background: var(--color-bg-light);
}

/* Global Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Global Content Card */
.content-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.content-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--color-border);
}

.content-card .card-header i {
    font-size: 1.3rem;
    color: var(--color-accent);
}

.content-card .card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.content-card .card-content {
    padding: 28px;
}

/* Global Sidebar Card */
.sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-card h3 {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.sidebar-card h3 i {
    color: var(--color-accent);
}

/* Global CTA Card */
.sidebar-card.cta-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: white;
}

.sidebar-card.cta-card h3 {
    color: white;
}

.sidebar-card.cta-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Global Quote Card */
.quote-card {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
}

.quote-card .quote-icon {
    position: absolute;
    top: 20px;
    left: 24px;
    font-size: 3rem;
    color: rgba(249, 115, 22, 0.3);
}

.quote-card blockquote {
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.8;
    margin: 0 0 16px 0;
    padding-left: 20px;
    border-left: 4px solid var(--color-accent);
}

.quote-card .quote-author {
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Global Buttons */
.btn-primary-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
    color: white;
}

.btn-secondary-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: white;
    color: var(--color-dark);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: var(--color-dark);
}

/* Global Meta Badges */
.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.meta-badge i {
    color: var(--color-accent);
}

/* Global College Badge */
.college-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.college-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.college-badge.attended {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

/* Global Featured Badge */
.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Global Stats Section */
.stats-section {
    display: flex;
    gap: 24px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 28px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-item i {
    color: var(--color-accent);
    font-size: 1.2rem;
}

.stat-item .stat-value {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-item .stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

/* Global Share Buttons */
.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn.twitter { background: #1da1f2; color: white; }
.share-btn.facebook { background: #4267b2; color: white; }
.share-btn.linkedin { background: #0077b5; color: white; }
.share-btn.copy { background: #f1f5f9; color: #64748b; }
.share-btn:hover { transform: translateY(-2px); }

/* Global Quick Facts */
.quick-facts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.fact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fact-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.fact-value {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
    font-weight: 600;
}

/* Global Loading & Error States */
.loading-container, .error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.loading-container .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-container i {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.error-container h2 {
    color: var(--color-text);
    margin-bottom: 10px;
}

.error-container p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* Global Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--color-accent);
}

/* Global Country Flag */
.country-flag {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.mini-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

/* Global Responsive Grid */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-column {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 80px 0 40px;
    }
    
    .content-card .card-content {
        padding: 20px;
    }
    
    .quote-card {
        padding: 28px;
    }
    
    .quote-card blockquote {
        font-size: 1.2rem;
    }
    
    .sidebar-column {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        flex-wrap: wrap;
        justify-content: center;
    }
}
