﻿/* ===== CSS Variables ===== */
:root {
  --primary-color: #2c3e50;   /* Dark Slate Blue */
  --secondary-color: #3498db; /* Bright Blue */
  --accent-color: #e74c3c;    /* Red for accents */
  --text-color: #34495e;      /* Wet Asphalt */
  --light-bg: #f8f9fa;        /* Lighter background */
  --card-bg: #ffffff;
  --border-color: #dee2e6;    /* Lighter border */
  --header-text: #ffffff;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* { margin:0; padding:0; box-sizing:border-box; }
    
/* ===== Base Styles ===== */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-color);
  margin: 0;
  padding-top: 76px;
  line-height: 1.6;
}

.headerInner {
  text-align:center;
  position: relative;
}

.headerInner h1 {
  color: var(--primary-color);
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

/* ===== Hero Section ===== */
.hero {
  /* background: url("https://picsum.photos/1600/700?tech") center/cover no-repeat; */
  position: relative;
  color: #fff;
  padding: 6rem 1rem;
  text-align: center;
  margin-top: -76px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
}

.hero .hero-container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero .btn {
  background: var(--accent-color);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.hero .btn:hover {
  background: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== Clickable Cards ===== */
.ia-items {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.ia-item {
  flex: 1 1 300px;
  margin: 10px;
  display: block;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.ia-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  color: var(--primary-color);
}

.ia-item-event-img {
  background-size: cover;
  background-position: center;
  height: 160px;
}

.ia-item-event-desc {
  padding: 20px;
}

.ia-item-event-desc h4 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.ia-item-event-desc p {
  margin: 0;
  font-size: 0.95rem;
}

/* ===== Footer ===== */
footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #e0a800;
  text-decoration: underline;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .ia-item {
    flex: 1 1 100%;
  }

  .radio-group {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ===== Right Column ===== */

/* ===== Content Cards ===== */
.content-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.right-column .cssLyrics {
  flex: 1; /* stretch to fill right-column height */
}

/* ===== Responsive Video Embeds ===== */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;   /* contain video on desktop */
  margin: 0 auto;

  aspect-ratio: 16 / 9;  /* replaces padding-bottom hack */
  overflow: hidden;

  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Native Video Styling ===== */
.video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  max-width: 800px;   /* contain video on desktop */

  object-fit: cover;   /* crop if aspect ratio differs */
  border-radius: 12px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);

  background-color: #000; /* fallback for unloaded video */
}

@media (max-width: 768px) {
  .video-wrapper {
    max-width: 100%;  /* full width on mobile */
  }
}

/* ===== Shared Base Styles for Lyrics & Notes ===== */
.cssLyrics,
.cssNote {
  max-width: 1000px;        
  margin: 1rem auto;        
  padding: 1.5rem 1rem;     
  width: 100%;
  box-sizing: border-box;

  border-radius: 12px;       
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}

/* ===== Lyrics Block ===== */
.cssLyrics {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  color: var(--primary-color);

  background: #fffbe6;
  border-left: 5px solid var(--accent-color);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
  position: relative;
  counter-reset: verse-counter;
}

/* Lyrics line spacing */
.cssLyrics br {
  display: block;
  margin: 0.6em 0;
  content: "";
}

.cssLyrics img {
  float: left;
  margin: 0 1rem 1rem 0;
  border-radius: 8px;
  max-width: 45%;
  height: auto;
}

/* ===== Note Block ===== */
.cssNote {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.cssNote p {
  margin-bottom: 1rem;
}

.cssNote ul,
.cssNote ol {
  margin: 0.5rem 0 1rem 1.2rem;
  padding: 0;
}

.cssNote ul li,
.cssNote ol li {
  margin: 0.4rem 0;
  line-height: 1.5;
  font-size: 1em;
}

.cssNote .main-image-link {
  text-decoration: none;
  color: var(--secondary-color);
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.cssNote .main-image-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.cssNote .main-image-link img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

/* ===== Magazine-style embedded images ===== */
.cssNote .magazine-float,
.cssNote .magazine-float-right {
  width: 35%;
  max-width: 400px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cssNote .magazine-float {
  float: left;
  margin-right: 15px;
}

.cssNote .magazine-float-right {
  float: right;
  margin-left: 15px;
}

/* ===== Mobile Optimization ===== */
@media (max-width: 768px) {
  .cssLyrics,
  .cssNote {
    margin: 0.5rem;
    padding: 0.5rem;
    font-size: 0.95em;
  }

  .cssLyrics h2 {
    font-size: 1.2em;
  }

  .cssLyrics img {
    float: none;
    display: block;
    margin: 0 auto 1rem auto;
    max-width: 100%;
  }

  .cssNote {
    padding: 1rem 1.5rem;
  }

  .cssNote .magazine-float,
  .cssNote .magazine-float-right {
    width: 100%;
    float: none;
    margin: 10px 0;
  }
}


/* ===== Poem Section ===== */
.cssPoem {
  max-width: 1000px;
  margin: 0 auto 2rem auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1rem;
}

.cssPoem-text {
  flex: 3 1 60%;
  text-align: center;
}

/* Poem text styles */
.cssPoem p {
  font-weight: bold;
  font-size: 1.3rem;
  line-height: 1.8em;
  margin-bottom: 1.2rem;
}

.cssPoem .chinese {
  letter-spacing: 0.1em;
  color: var(--text-color);
  text-align: center;
  margin-bottom: 2rem;
}

.cssPoem .english {
  letter-spacing: 0.05em;
  color: #555;
  text-align: left;
}

/* Larger text on big screens */
@media (min-width: 1024px) {
  .cssPoem .chinese,
  .cssPoem .english {
    font-size: 1.6rem;
  }
  .cssPoem .chinese {
    margin-bottom: 2.5rem;
  }
}

/* ===== Responsive for Tablets & Mobiles ===== */
@media (max-width: 900px) {
  .cssPoem {
    flex-wrap: wrap;               /* allow wrapping */
    flex-direction: column;        /* stack vertically */
    align-items: center;           /* center horizontally */
    text-align: center;
  }

  .cssPoem-text {
    width: 100%;
    order: 3;                      /* place text after both images */
  }

  .cssPoem .english {
    text-align: center;            /* center text for small screens */
  }
}


.cssPoem img {
  width: 280px;           /* fixed width */
  height: 280px;          /* fixed height */
  object-fit: cover;      /* crop to fit nicely */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  flex: none;              /* don’t let flexbox stretch it */
}


@media (max-width: 900px) {
  .cssPoem img {
    width: 70vw;           /* 70% of viewport width */
    height: 70vw;          /* keep square ratio */
    max-width: 320px;      /* don’t exceed desktop size */
    object-fit: cover;
  }
}


/* ===== Shared Container Styles ===== */
.box-layout,
.cssLink,
.cssJukebox {
  width: 100%;
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

/* ===== Link Lists (cssLink + cssJukebox) ===== */
.cssLink ul,
.cssJukebox ul {
  list-style: none;
  margin: 0;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem 1.25rem;
}

.cssLink li,
.cssJukebox li {
  display: flex;
}

.cssLink a,
.cssJukebox a {
  display: block;
  width: 100%;
  padding: 0.6rem 0.8rem;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;

  border-radius: 8px;
  transition: var(--transition);
  background-color: #fdfdfd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  position: relative;
}

.cssLink a:hover,
.cssJukebox a:hover {
  background-color: var(--secondary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

/* ===== cssJukebox Extra: Auto Play Icon ===== */
.cssJukebox a {
  padding-left: 2rem; /* leave space for icon */
}

.cssJukebox a::before {
  content: "\f144"; /* Font Awesome play-circle */
  font-family: "Font Awesome 6 Free"; 
  font-weight: 900;
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

.cssJukebox a:hover::before {
  color: #fff;
  transform: translateY(-50%) scale(1.2);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .box-layout,
  .cssLink,
  .cssJukebox {
    padding: 0.75rem 1rem;
    margin: 1rem auto;
  }

  .cssLink ul,
  .cssJukebox ul {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cssLink a,
  .cssJukebox a {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  .cssJukebox a {
    padding-left: 2rem;
  }
}

/* ===== Large Screen Optimization ===== */
@media (min-width: 1200px) {
  .cssLink ul,
  .cssJukebox ul {
    grid-template-columns: repeat(3, 1fr);
  }
}



/* ===== Box Layout (Intro + Search) ===== */
.box-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem auto;
  padding: 0.25rem 1rem;
}

/* Box Text Styles */
.box-text {
  background: var(--card-bg);
  padding: 0.25rem;
}

.box-text p {
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  font-weight: 400;
}

/* Link Search Styles */
.linkSearch {
  display: flex;
  justify-content: center;
}

#linkFilter {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid var(--border-color);
  border-radius: 25px;
  font-size: 0.95rem;
  background: var(--card-bg);
  color: var(--text-color);
  transition: var(--transition);
  box-shadow: var(--shadow);
}

#linkFilter:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
  transform: translateY(-1px);
}

#linkFilter::placeholder {
  color: #95a5a6;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (min-width: 768px) {
  .box-layout {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem auto;
  }
  
  .box-text {
    flex: 1;
    padding: 1.5rem;
  }
  
  .linkSearch {
    flex: 0 0 250px;
  }
}

@media (min-width: 1024px) {
  .box-layout {
    padding: 0 1.5rem;
  }
  
  .box-text p {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
  }
  
  #linkFilter {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }
}

/* Mobile Optimization */
@media (max-width: 480px) {
  .box-layout {
    margin: 0.75rem auto;
    padding: 0 0.75rem;
    gap: 0.75rem;
  }
  
  .box-text {
    padding: 1rem;
    border-radius: 6px;
  }
  
  .box-text p {
    font-size: 0.95rem;
  }
  
  #linkFilter {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 20px;
  }
}

/* Hover Effects */
#linkFilter:hover {
  border-color: #bdc3c7;
}




/* ===== PATCH ===== */
.floatLeft { 
    float: left; 
    margin: 4px; 
}

.floatRight { 
    float: right; 
    margin: 4px; 
}

.cssWarning {
 color: #ff0000;
}

.cssSource {
  border: 1px solid #999;
  overflow: auto;
  background: #FFFFDD;
  padding: 12px;
  margin: 1em 7px 1em 7px;
}

.cssSource pre {
  margin: 0px;
  padding: 0px;
}

.circle-img {
width: 150px;
height: 150px; 
border: 1px solid #000000;
border: 1px solid black;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
border: none;
overflow: hidden;
float: left;
margin: 0 auto 10px;
}

@media screen and (max-width: 767px) {
  .circle-img {
   width: 85px;
   height: 85px;
 }
}