/* FILEPATH: /Users/nickydtricky/Desktop/Programming/Apps/personalwebsite/homepage/static/homepage/style.css */

body {
    background-color: #F3EAE1; /* offwhite gray */
    font-family: 'Lexend Giga', sans-serif;
}

/* Navbar styles */
.navbar {
    background-color: #f8f8f8;
    padding: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.navbar li {
    display: inline-block;
    margin-right: 10px;
}

.navbar a {
    @media (max-width: 649px) {
        font-size: 12px;
    }
    @media (min-width: 650px) {
        font-size: 1.4vw;
    }
    text-decoration: none;
    color: #333;
    padding: 12px;
}

.navbar a:hover {
    color: #555;
}


/* Centered images with rounded borders */
.centered_img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 50%;
  width: 30vw;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
  padding: 10px;
  box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5);
}

@media (max-width: 649px) {
  .centered_img {
    width: 50vw;
  }
}

@media (min-width: 650px) {
  .centered_img {
    width: 30vw;
  }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Custom styles for h1 and h5 tags within the .intro class */
.intro h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.intro h5 {
    font-size: 16px;
    color: #555;
    margin-top: 5px;
    text-align: center;
}


.intro-desc {
    @media (max-width: 649px) {
        margin-left: 20px;
        margin-right: 20px;
    }
    @media (min-width: 650px) {
        margin-left: 100px;
        margin-right: 100px;
    }

    display: flex;
    align-items: center;
    margin-top: 100px;
    background-color: #f8f8f8;
    padding: 2%;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}


.intro-desc p {
    flex: 1.3;
    text-align: center; /* Align text to the left */
    font-size: 1.2vw; /* Adjust font size based on viewport width */
    padding-left: 1%;
    padding-right: 1%;
    margin: 20px; /* Add wider margins */
}

.intro-desc img {
    flex: 3;
    max-width: 30%;
    object-fit: cover; /* Ensure the image fills the remaining space */
    width: 30vw;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.intro-desc ul {
    flex: 1;
    font-size: 1.4vw;
    padding-left: 3%;
    padding-right: 3%;
    margin: 20px;
    list-style: none;
}

.black-line {
    display: block;
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 5px;
    background-color: black;
    border: none;
}

.classes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding-left: 20%;
    padding-right: 20%
}

.classes h2 {
    flex: 0.5;
    font-size: 200%;
    text-align: center;
}

.classes ul {
    flex: 1;
    font-size: 140%;

}

.classes li {
    margin-bottom: 10px;
    font-size: 100%;
}

.listing {
    align-items: flex-start; /* Align items to the left */
    justify-content: flex-start; /* Align content to the left */
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin: 0 auto;
    width: 70%;
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.listing + .listing {
    margin-top: 20px;
}

.listing h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.listing small {
    font-size: 14px;
    color: #888;
}

.listing p {
    font-size: 16px;
    margin-top: 10px;
}

.post {
    @media (max-width: 649px) {
        margin: 0;
    }
    @media (min-width: 650px) {
        margin: 5vh 20vw;
    }
    padding-bottom: 20vh;
    padding-left: 1.3vw;
    padding-right: 1.3vw;
    line-height: 1.3;
    background-color: whitesmoke;
    font-family: 'Merriweather', serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.post mjx-math {
    font-size: 1.1rem;
}

.post h1 {
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.post h2 {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.post h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.post h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.post h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.post p, li {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.post small {
    text-align: center;
}

/* Centered images with rounded borders */
.post img {
    @media (max-width: 649px) {
        width: 80vw;
    }
    @media (min-width: 650px) {
        width: 25vw;
    }
    
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.post pre {
    background-color: rgb(172, 168, 168);
    padding: 10px;
    border-radius: 10px;
    outline: 3px solid #333; /* Added blue outline */
}

.post table {
    border-collapse: collapse;
    width: 100%;
}

.post th {
    background-color: #a48b8b2e;
    padding: 8px;
}

.post th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.songInfo {
    text-align: center;
    font-size: 0.75em;
    font-family: OCR A Std, monospace;
    list-style-type : none;
}

.center {
    padding-left: 30%;
    padding-right: 30%;
}

.index_post {
    padding: 10px;
    background-color: #dfdfdf;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Global Styles */
body {
  margin: 0;
  padding: 0;
  background: #F3EAE1;
  font-family: 'Lexend Giga', sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.tabs ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}
.tab-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: #666;
  position: relative;
  transition: color 0.2s ease;
}
.tab-button:hover {
  color: #444;
}
.tab-button.active {
  color: #000;
}
.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: #a48b8b;
}

/* Panels */
.tab-panel {
  display: none;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.tab-panel.active {
  display: block;
}

/* Course Cards Grid: default 2 columns, expand to 4 on wide screens */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding: 2rem;
}
@media (min-width: 1200px) {
  .classes-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.course-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  padding: 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.course-card h2 {
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #a48b8b;
  padding-bottom: 0.75rem;
  color: #333;
}

/* Season grouping */
.season {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}
.season h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Class boxes inside each season */
.season-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.season-list li {
  background: #F3EAE1;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem;
}
.gallery-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive: single column under 800px */
@media (max-width: 800px) {
  .classes-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.5rem;
  }
  .course-card {
    padding: 1.5rem;
  }
  .course-card h2 {
    font-size: 1.5rem;
  }
  .season h3 {
    font-size: 1.1rem;
  }
  .season-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .season-list li {
    font-size: 0.9rem;
  }
}

/* ──────────────────────────────────────────────
   Mobile-first tweaks for the “intro-desc” pane
   (nothing else on the site is affected)
   ────────────────────────────────────────────── */

@media (max-width: 650px) {

  /* stack items instead of cramming them side-by-side */
  .intro-desc{
    flex-direction: column;      /* 🔑   vertical on small screens   */
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    margin: 2rem 1rem;
    padding: 1.5rem;
  }

  /* fine-tune each child */
  .intro-desc p{
    flex: none;                  /* stop forcing width ratios       */
    font-size: 1rem;             /* readable body text              */
    margin: 0;
  }

  .intro-desc img{
    flex: none;
    width: 80vw;                 /* big but never wider than 80 %   */
    max-width: 340px;
    height: auto;
  }

  .intro-desc ul{
    flex: none;
    font-size: .95rem;
    padding: 0;
  }

  .intro-desc .index_post{
    font-size: .95rem;
    margin: .4rem auto;
  }
}

/* (optional but nice on tablets) */
@media (min-width: 651px) and (max-width: 1000px){
  .intro-desc p   { font-size: 1rem; }
  .intro-desc ul  { font-size: 1rem; }
}

/* ──────────────────────────────────────────────
   Responsive “hover-card” blocks  (ABOUT page)
   ────────────────────────────────────────────── */

.hover-card{
  /* the same look you defined inline, now centralised */
  background:#fff;
  border-radius:8px;
  box-shadow:0 2px 5px rgba(0,0,0,.1);
  transition:transform .3s ease, box-shadow .3s ease;
  padding:20px;
  display:flex;
  align-items:center;
  gap:20px;
  margin:20px 0;
}
.hover-card:hover{
  transform:translateY(-5px) scale(1.02);
  box-shadow:0 8px 20px rgba(0,0,0,.2);
}

/* child elements */
.hover-card img{
  width:100%;                /* full-width inside the card   */
  max-width:320px;           /* never explode on desktop      */
  border-radius:8px;
}
.hover-card .intro-text,
.hover-card .middle-text{
  font-size:1.15em;
  line-height:1.5;
}

/* ── Mobile tweaks ── */
@media (max-width:650px){
  .hover-card{
    flex-direction:column;   /*   🔑  stack vertically        */
    text-align:center;
    gap:1.2rem;
  }
  .hover-card img{ max-width:85vw; }
  .hover-card .intro-text,
  .hover-card .middle-text{ font-size:1em; }

  /* make the tab bar wrap nicely on phones */
  .tabs ul{flex-wrap:wrap;gap:.5rem;}
  .tab-button{font-size:1rem;padding:.4rem .75rem;}
}

/* ──────────────────────────────────────────────
   Center the course cards on small screens
   ────────────────────────────────────────────── */
@media (max-width: 800px){
  .classes-grid{
    grid-template-columns: 1fr;   /* you already had this */
    padding-left: 0;              /* remove side-padding   */
    padding-right: 0;
    justify-items: center;        /* 🔑  center each cell  */
  }

  /* optional: give each card a fixed-ish width so they look balanced */
  .course-card{
    width: 90%;                   /* 90 % of viewport, leaves some margin */
    max-width: 500px;             /* don’t let them grow too wide on tablets */
  }
}

/* ──────────────────────────────────────────────
   Final tweak: truly center the course cards
   on narrow screens
   ────────────────────────────────────────────── */
@media (max-width: 800px){
  /* make the container a vertical flex stack */
  .classes-grid{
    display: flex;               /* overrides the grid for phones */
    flex-direction: column;
    align-items: center;         /* 🔑 centers every card          */
    gap: 1.5rem;                 /* keeps nice spacing             */
    padding-left: 0;
    padding-right: 0;
  }

  /* size of each card inside that stack */
  .classes-grid .course-card{
    width: 92%;                  /* leave a little margin on sides */
    max-width: 480px;            /* don’t get too wide on tablets  */
  }
}

/* ──────────────────────────────────────────────
   Season-list: switch to a single centred column
   on extra-small screens to avoid text overflow
   ────────────────────────────────────────────── */
@media (max-width: 600px){
  .season-list{
    grid-template-columns: 1fr;      /* one column                 */
    justify-items: center;           /* centre the single card     */
  }
  .season-list li{
    width: 90%;                      /* don’t hug the edges        */
    max-width: 420px;                /* keep a sensible upper bound*/
    word-break: break-word;          /* just in case a long token  */
  }
}
