/*
 * Chronicles of AI Education in Canada
 * Design System & Core Styles
 * aiacademycanadapathways.com
 */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    line-height: 1.65;
    color: #333;
    background-color: #FAFAFA;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', serif;
    font-weight: 600;
    line-height: 1.3;
    color: #002B5C;
    margin-bottom: 1rem;
}

h1 {
    font-size: 46px;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 38px;
}

h3 {
    font-size: 30px;
}

h4 {
    font-size: 24px;
}

.caption, .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== COLOR PALETTE ===== */
:root {
    --primary-dark: #002B5C;
    --primary-light: #1976D2;
    --accent-red: #D32F2F;
    --silver: #B0BEC5;
    --white: #FAFAFA;
    --gradient-primary: linear-gradient(135deg, #002B5C 0%, #1976D2 100%);
    --gradient-overlay: linear-gradient(rgba(0, 43, 92, 0.85), rgba(25, 118, 210, 0.75));
}

/* ===== LAYOUT BLOCKS ===== */
.container-jumbo {
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.container-medium {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.container-compact {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== EDUCATION GRID ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 43, 92, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 43, 92, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    font-family: 'Lora', serif;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-red);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(255,255,255,0.03) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255,255,255,0.03) 50%, transparent 52%);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(60px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 2rem;
}

.hero h1 {
    color: var(--white);
    font-size: 56px;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 22px;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Noto Sans', sans-serif;
}

.btn-primary {
    background: var(--accent-red);
    color: var(--white);
}

.btn-primary:hover {
    background: #B71C1C;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 43, 92, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 43, 92, 0.15);
}

.card:hover::before {
    transform: scaleY(1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.card-title {
    font-size: 24px;
    color: var(--primary-dark);
    margin: 0;
}

.card-body p {
    color: #555;
    margin-bottom: 1rem;
}

/* ===== SECTIONS ===== */
.section {
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    color: var(--accent-red);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 42px;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 20px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
}

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

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

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

.timeline-content {
    width: 45%;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 43, 92, 0.1);
}

.timeline-marker {
    width: 20px;
    height: 20px;
    background: var(--accent-red);
    border: 4px solid var(--white);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.2);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

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

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--silver);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--silver);
    font-size: 14px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 43, 92, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--primary-dark);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-red);
}

/* ===== ACCORDION ===== */
.accordion-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 43, 92, 0.08);
}

.accordion-header {
    padding: 1.5rem;
    background: var(--white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #F5F5F5;
}

.accordion-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--primary-dark);
}

.accordion-icon {
    font-size: 24px;
    color: var(--primary-light);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content-inner {
    padding: 1.5rem;
    color: #555;
}

/* ===== FILTER BUTTONS ===== */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--silver);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    h1 { font-size: 38px; }
    .hero h1 { font-size: 42px; }
    .section-title { font-size: 36px; }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .timeline-marker {
        left: 30px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 { font-size: 32px; }
    .hero h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    .section-title { font-size: 30px; }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-dark);
        padding: 2rem;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .container-jumbo,
    .container-wide,
    .container-medium,
    .container-compact {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 28px; }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 18px; }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 14px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
}
