/* Reset and Base Styles */
* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

body {
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, Helvetica, sans-serif;
   font-size: 16px;
   line-height: 1.6;
   color: #1a1a1a;
   background-color: #ffffff;
}

/* Container */
.container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
   font-family: Georgia, 'Times New Roman', serif;
   font-weight: normal;
   line-height: 1.3;
}

h1 { font-size: 2.5em; margin-bottom: 0.5em; }
h2 { font-size: 1.8em; margin-bottom: 0.5em; }
h3 { font-size: 1.3em; margin-bottom: 0.5em; }
h4 { font-size: 1.1em; margin-bottom: 0.3em; }

p { margin-bottom: 1em; }

a {
   color: #2c5aa0;
   text-decoration: none;
}

a:hover {
   text-decoration: underline;
}

/* Header */
.site-header {
   background-color: #ffffff;
   border-bottom: 1px solid #e0e0e0;
   position: fixed;
   width: 100%;
   top: 0;
   z-index: 1000;
}

.header-content {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 15px 0;
}

.logo img {
   vertical-align: middle;
}

.site-title {
   font-size: 1.2em;
   margin: 0;
   flex-grow: 1;
   text-align: center;
}

.main-nav {
   display: flex;
   gap: 20px;
}

.main-nav a {
   color: #1a1a1a;
}

.mobile-menu-toggle {
   display: none;
   background: none;
   border: none;
   font-size: 1.5em;
   cursor: pointer;
}

/* Hero Section */
.hero {
   padding: 120px 0 60px;
   background-color: #f9f9f9;
   text-align: center;
}

.hero h1 {
   font-size: 2.8em;
   margin-bottom: 0.3em;
}

.subtitle {
   font-size: 1.2em;
   color: #666;
   margin-bottom: 0.5em;
}

.instructor {
   font-style: italic;
   color: #666;
}

/* Main Content */
.main-content {
   padding: 60px 0;
   min-height: calc(100vh - 300px);
   overflow-x: hidden;
}

.content-wrapper {
   display: flex;
   gap: 40px;
}

/* Table of Contents */
.toc {
   flex: 0 0 250px;
   position: sticky;
   top: 100px;
   height: fit-content;
}

.toc h2 {
   margin-bottom: 1em;
   font-size: 1.2em;
   color: #666;
}

.toc ul {
   list-style: none;
}

.toc ul ul {
   margin-left: 20px;
   margin-top: 5px;
}

.toc a {
   display: block;
   padding: 8px 0;
   color: #666;
   border-left: 2px solid transparent;
   padding-left: 10px;
   transition: all 0.3s ease;
}

.toc a:hover {
   color: #2c5aa0;
   border-left-color: #2c5aa0;
}

/* Sections */
.sections {
   flex: 1;
   overflow-x: hidden;
}

.course-section {
   margin-bottom: 80px;
   scroll-margin-top: 80px;
}

.section-header {
   display: flex;
   align-items: flex-start;
   gap: 20px;
   margin-bottom: 2em;
}

.section-number {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 50px;
   height: 50px;
   background-color: #2c5aa0;
   color: white;
   font-size: 1.5em;
   border-radius: 50%;
   flex-shrink: 0;
}

/* Session Day Headers */
.session-day {
   margin-bottom: 3em;
}

.session-day h3 {
   margin-bottom: 1.5em;
   padding-bottom: 0.5em;
   border-bottom: 2px solid #e0e0e0;
   color: #2c5aa0;
}

/* Session Cards Container */
.session-cards-container {
   position: relative;
   margin: 0;
   padding: 0;
   overflow: hidden;
}

.session-cards {
   display: flex;
   gap: 20px;
   overflow-x: auto;
   padding: 10px 0 20px;
   scroll-behavior: smooth;
   -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.session-cards::-webkit-scrollbar {
   height: 8px;
}

.session-cards::-webkit-scrollbar-track {
   background: #f1f1f1;
   border-radius: 10px;
}

.session-cards::-webkit-scrollbar-thumb {
   background: #c0c0c0;
   border-radius: 10px;
}

.session-cards::-webkit-scrollbar-thumb:hover {
   background: #999;
}

/* Session Card */
.session-card {
   flex: 0 0 280px;
   background: #ffffff;
   border: 1px solid #e0e0e0;
   border-radius: 8px;
   overflow: hidden;
   transition: transform 0.3s ease, box-shadow 0.3s ease;
   display: flex;
   flex-direction: column;
}

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

/* Card Image */
.card-image {
   width: 100%;
   height: 160px;
   background: #f5f5f5;
   overflow: hidden;
   border-bottom: 1px solid #e0e0e0;
   position: relative;
}

.card-image img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
}

/* Card Content */
.card-content {
   padding: 15px;
   display: flex;
   flex-direction: column;
   flex-grow: 1;
}

.card-content h4 {
   margin-bottom: 0.5em;
   font-size: 1.1em;
   line-height: 1.3;
   color: #1a1a1a;
}

.card-time {
   font-size: 0.9em;
   color: #666;
   margin-bottom: 0.5em;
   font-weight: 500;
}

.card-description {
   font-size: 0.9em;
   color: #666;
   line-height: 1.4;
   margin-bottom: 1em;
   flex-grow: 1;
}

/* Card Resources */
.card-resources {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   margin-top: auto;
   padding-top: 10px;
   border-top: 1px solid #f0f0f0;
}

.resource-link {
   display: inline-flex;
   align-items: center;
   gap: 5px;
   font-size: 0.85em;
   color: #2c5aa0;
   padding: 4px 8px;
   background: #f9f9f9;
   border-radius: 4px;
   transition: background 0.3s ease;
}

.resource-link:hover {
   background: #e8f0ff;
   text-decoration: none;
}

.resource-icon {
   font-size: 1.1em;
}

/* Scroll Buttons */
.scroll-btn {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   background: #ffffff;
   border: 1px solid #e0e0e0;
   border-radius: 50%;
   width: 40px;
   height: 40px;
   font-size: 1.5em;
   cursor: pointer;
   z-index: 10;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all 0.3s ease;
   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.scroll-btn:hover {
   background: #2c5aa0;
   color: white;
   border-color: #2c5aa0;
}

.scroll-btn-left {
   left: 0;
}

.scroll-btn-right {
   right: 0;
}

/* Hide scroll buttons on touch devices */
@media (hover: none) {
   .scroll-btn {
       display: none;
   }
}

/* Additional Information Section */
.additional-info {
   margin-top: 80px;
   padding-top: 40px;
   border-top: 2px solid #e0e0e0;
}

.additional-info h2 {
   margin-bottom: 2em;
   text-align: center;
}

.info-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
   gap: 30px;
}

.info-card {
   background: #f9f9f9;
   padding: 25px;
   border-radius: 8px;
   border-left: 4px solid #2c5aa0;
}

.info-card h3 {
   margin-bottom: 1em;
   color: #2c5aa0;
}

.info-card ul {
   list-style-position: inside;
   color: #666;
}

.info-card ul li {
   margin-bottom: 0.5em;
}

/* Footer */
.site-footer {
   background-color: #1a1a1a;
   color: #ffffff;
   padding: 40px 0 20px;
   margin-top: 80px;
   overflow-x: hidden;
}

.footer-content {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   margin-bottom: 30px;
   gap: 40px;
}

.contact-info h3 {
   color: #ffffff;
   margin-bottom: 1em;
}

.contact-info h4 {
   color: #ffffff;
   margin-top: 1.5em;
   margin-bottom: 0.5em;
}

.contact-info p {
   color: #ccc;
   line-height: 1.8;
}

.contact-info a {
   color: #7eb3ff;
}

.social-links {
   margin-top: 1.5em;
}

.social-links a {
   margin: 0 5px;
   color: #7eb3ff;
}

.social-links a:hover {
   color: #ffffff;
}

.footer-logo {
   text-align: center;
}

.footer-logo img {
   margin-bottom: 10px;
   opacity: 0.8;
}

.footer-logo p {
   color: #ccc;
}

.footer-logo a {
   color: #7eb3ff;
}

.footer-bottom {
   text-align: center;
   padding-top: 20px;
   border-top: 1px solid #333;
   color: #999;
}

.footer-bottom a {
   color: #7eb3ff;
   margin: 0 10px;
}

/* Print Styles */
@media print {
   .site-header,
   .toc,
   .mobile-menu-toggle,
   .scroll-btn,
   .social-links {
       display: none !important;
   }
   
   .hero {
       padding: 40px 0;
   }
   
   .content-wrapper {
       display: block;
   }
   
   .session-cards {
       display: block;
   }
   
   .session-card {
       page-break-inside: avoid;
       margin-bottom: 20px;
       flex: none;
   }
   
   .course-section {
       page-break-before: always;
   }
   
   body {
       font-size: 12pt;
   }
   
   a {
       color: #000;
       text-decoration: underline;
   }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus {
   outline: 2px solid #2c5aa0;
   outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
   position: absolute;
   left: -9999px;
   top: 0;
   z-index: 999;
   padding: 10px;
   background-color: #2c5aa0;
   color: white;
   text-decoration: none;
}

.skip-to-content:focus {
   left: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
   .toc {
       display: none;
   }
   
   .content-wrapper {
       display: block;
   }
   
   .session-card {
       flex: 0 0 260px;
   }
}

@media (max-width: 768px) {
   .main-nav {
       display: none;
       position: absolute;
       top: 100%;
       left: 0;
       right: 0;
       background-color: #ffffff;
       flex-direction: column;
       padding: 20px;
       box-shadow: 0 2px 5px rgba(0,0,0,0.1);
   }
   
   .main-nav.active {
       display: flex;
   }
   
   .mobile-menu-toggle {
       display: block;
   }
   
   .hero h1 {
       font-size: 2em;
   }
   
   .hero {
       padding: 100px 0 40px;
   }
   
   .section-header {
       flex-direction: column;
   }
   
   .section-number {
       width: 40px;
       height: 40px;
       font-size: 1.2em;
   }
   
   .session-cards-container {
       margin: 0;
       padding: 0;
   }
   
   .session-card {
       flex: 0 0 240px;
   }
   
   .card-image {
       height: 140px;
   }
   
   .info-grid {
       grid-template-columns: 1fr;
   }
   
   .footer-content {
       flex-direction: column;
       gap: 30px;
   }
}

@media (max-width: 480px) {
   .hero h1 {
       font-size: 1.6em;
   }
   
   .subtitle {
       font-size: 1em;
   }
   
   .session-card {
       flex: 0 0 220px;
   }
   
   .card-content {
       padding: 12px;
   }
   
   .card-content h4 {
       font-size: 1em;
   }
   
   .card-time,
   .card-description {
       font-size: 0.85em;
   }
   
   .resource-link {
       font-size: 0.8em;
       padding: 3px 6px;
   }
}

/* Loading State for Images */
.card-image::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
   background-size: 200% 100%;
   animation: loading 1.5s infinite;
   z-index: 1;
}

.card-image img {
   position: relative;
   z-index: 2;
}

.card-image img[src] + ::before {
   display: none;
}

@keyframes loading {
   0% {
       background-position: 200% 0;
   }
   100% {
       background-position: -200% 0;
   }
}

/* Smooth Scrolling Enhancement */
html {
   scroll-behavior: smooth;
}

/* Card Hover Effects */
.session-card {
   position: relative;
   overflow: hidden;
}

.session-card::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 3px;
   background: linear-gradient(90deg, #2c5aa0, #4d7bc7);
   transform: translateX(-100%);
   transition: transform 0.3s ease;
}

.session-card:hover::before {
   transform: translateX(0);
}

/* Active Section Indicator */
.course-section:target .section-header {
   animation: highlight 1s ease;
}

@keyframes highlight {
   0%, 100% {
       background: transparent;
   }
   50% {
       background: rgba(44, 90, 160, 0.05);
   }
}

/* Utilities */
.sr-only {
   position: absolute;
   width: 1px;
   height: 1px;
   padding: 0;
   margin: -1px;
   overflow: hidden;
   clip: rect(0,0,0,0);
   white-space: nowrap;
   border: 0;
}