:root {
  --secondary-background-color: #f6e3cb;
  --background-color: #4f0803e2;
  --green-accent-color: #c5d83f;
  --primary-font: "space mono", sans-serif;
  --secondary-font: "Bebas Neue", sans-serif;
}
/* AI assisted (ChatGPT) for html element smooth scroll-behavior for navigation. This makes the link navigation scroll smoothly instead of jumping to each section.  */
html {
  scroll-behavior: smooth;
}
body {
  color: var(--secondary-background-color);
  background-color: var(--background-color);
  background-image: url("../assets/images/hong-kong-background.jpg");
  font-family: var(--primary-font)
}
nav {
  display: flex;
  justify-content: center;
}

nav ul {
  display: flex;
}
/* I used this article https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/cursor to add the property cursor-pointer so that it changes the mouse cursor thats usually an arrow to a hand icon.  */
nav ul li {
  padding: 1.5rem;
  position: relative;
  cursor: pointer;
  font-size: 0.75rem;
}
  .cantonese-text {
    font-family: "Noto Serif HK", serif;
    font-weight: 400;
    font-size: 2.5rem;
    white-space: nowrap;
  }


/* I used this CSS :not psuedo-class syntax from https://www.w3schools.com/cssref/sel_not.php. I used nav ul li:not(:last-child)::after to add a vertical seperator after each navigation item except the last one. This selector excludes the final <li> so that the seperaot only appears between links and not after the last one. */
nav ul li:not(:last-child)::after {
  content: "";
  width: 1.5px;
  height: 50%;
  background-color: #c6d83fa5;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

nav ul li:hover {
  color: var(--green-accent-color);
}

header {
  background-color: var(--background-color);
  z-index: 10;
  padding: 1.25rem 0.25rem 0.25rem;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  -webkit-box-shadow: 0px -14px 22px 5px #000000;
  box-shadow: 0px -14px 22px 5px #000000;
}
/* I Used Box Shadow Generator using: https://html-css-js.com/css/generator/box-shadow/
    This code adds a shadow effect to the header element. The shadow has 4 values with first shifting horizontal and second value vertically and the third value adding a blur and opacity value along with the color chosen.  */

.sticky-header {
  position: fixed;
  top: 0;
  display: none;
  opacity: 0;
  width: 100%;
  padding: 0.25rem;
}

/* I used the syntax for css animations from these articles https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Animations/Using,https://www.w3schools.com/css/css3_animations.asp,https://www.w3schools.com/cssref/atrule_keyframes.php,https://css-tricks.com/ease-out-in-ease-in-out/. These animations move the element vertically while changing its opacity to create a smooth slide and fade effect when showing or hiding it. */
.hidden {
  animation: slideFadeOut 1s ease-in-out forwards;
}
.visible {
  animation: slideFadeIn 1s ease-in-out forwards;
}
@keyframes slideFadeIn {
  from {
    transform: translateY(-300px);
    opacity: 0;
  }
  to {
    transform: translateY(0px);
    opacity: 1;
  }
}
@keyframes slideFadeOut {
  from {
    transform: translateY(0px);
    opacity: 1;
  }
  to {
    transform: translateY(-300px);
    opacity: 0;
  }
}

#scroll-container {
  width: 100%;
  height: 5px;
}
#scroll-bar {
  height: 100%;
  width: 0%;
  background-color: var(--green-accent-color);
}

.banner-video {
  width: 100%;
  height: 60vh;
  overflow: hidden;
  position: relative;
}
.banner-video video {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* I learned this CSS technique :has() pseudo-class to only target <p> elements that contain the element with the id channel-link so that I can apply padding only to those specific paragraphs */
/* I pulled this syntax from https://dev.to/mechcloud_academy/exploring-the-has-pseudo-class-in-css-4p63 */
p:has(#channel-link) {
  padding: 2rem;
}

h2 {
  font-family: var(--secondary-font);
  font-size: 4rem;
  color: var(--background-color);
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-inline: auto;
}

.block-background > h3 {
  font-family: var(--secondary-font);
  font-size: 4rem;
  color: var(--green-accent-color);
  text-shadow: 6px 2px 5px #aa1f1f;
  margin-block: 2rem 0;
  line-height: 0.8;
}

.intro-text {
  padding: 1rem 3rem 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  background-color: var(--secondary-background-color);
  color: #412b2e;
}
#channel-description {
  max-width: 800px;
  font-size: .9rem;
  position: relative;
  padding-block: 1rem;
}
#channel-description::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 50%;
  border-bottom: 2px solid #412b2e;
}
.intro-text p {
  padding-bottom: 2rem;
}
h1 {
  font-family: "Dela Gothic One", sans-serif;
  font-size: 2rem;
  color: #aa1f1f;
  text-align: center;
  padding-block: 1rem 0.25rem;
  text-shadow: 6px 2px 5px #c5d83f;
    /*I used W3Schools to apply the text-shadow property to get the text shadow effect from https://www.w3schools.com/css/css3_shadows.asp. The different values moves the shadows horizontally, vertically and adds a blur. */
}

.arena-collection {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-block: 5rem 3rem;
}

.block-background {
  background-color: var(--background-color);
  width: 90vw;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-block: 1.25rem;
}

/* General Block Styling */

/* I chose column-count property because it more easily distributes images into vertical columns based on height to create a stacked gallery effect which I learned from: https://dev.to/ryandsouza13/creating-a-responsive-masonry-layout-using-the-css-column-count-property-4kf7. */
#image-blocks{
  column-count: 1;
  padding-block: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#article-blocks {
  display: flex;
  padding: 2rem;
  box-sizing: border-box;
  width: 100%;
  flex-direction: column;
  align-items: center;
  
}
.pdf-block,
.text-block,
.link-block > figure {
  padding: 1.5rem;
  width: 70%;
  margin-inline: auto;
}

/* This is for image-block styling */

li:has(.image-block) {
  position: relative;
  width: 80%;
  margin-bottom: 1rem;
}

.image-block {
  width: 100%;
  overflow: hidden;
  display: block;
}

.image-block img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
  transform: scale(1);
}
#image-blocks li:hover .image-block img {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #0000007a;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: opacity 0.2s;
  color: var(--secondary-background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.image-overlay:hover {
  opacity: 1;
}
.vintage-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  background-image:
    radial-gradient(ellipse, #0000, #0007), linear-gradient(0deg, #9725, #9725),
    url(https://i.ibb.co/vJt5HSh/noisy-texture-300x300-o10-d10-c-a82851-t1.png);
  filter: blur(0.05em) saturate(0.2) contrast(1.5) brightness(1.5);
}
/* I used the code from this site for background image and filter overlay for a vintage effect from https://dev.to/debadeepsen/vintage-photo-effect-with-css-16oj. The layered gradients and noise texture creates a tinted, grainy background. The filter reduces saturation and sdjusts contrast and brightness to achieve a faded retro look.  */

/* This is for link-block styling */
.link-block {
  break-inside: avoid;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* I was having issues with some blocks getting cut between columns and I asked chatGPT how to fix this and the syntax given was break-inside avoid and I also read this article https://www.geeksforgeeks.org/css/how-to-prevent-column-break-within-an-element/.This prevents the link block from being split between columns in the masonry layout and keeping each block visually intact. */


/* The :last-of-type selector targets the last <p> element inside the parent container so that I can style only the last paragraph within .linkblock. */
/* I pulled this syntax from https://css-tricks.com/almanac/pseudo-selectors/l/last-of-type/ */
.link-block p:last-of-type {
  text-align: center;
}

.link-block > figure {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.link-block picture {
  width: 80%;
  display: block;
  overflow: hidden;
}

.link-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
.link-block h3 {
  padding: 2rem 2rem 1rem;
  text-align: center;
}
figcaption {
  text-align: center;
  overflow-y: auto;
  height: 150px;
  scrollbar-width: none;
  padding-block: 1rem;
}
/* I learned scrollbar-width from https://css-tricks.com/almanac/properties/s/scrollbar-width/ to hide the vertical scrollbar in the figcaption so that users can scroll long text in the links within the descriptions. */

figcaption > p {
  padding-block: 1rem;
}

/* This is for video-block styling */
#video-blocks {
  display: flex;
  flex-direction: column;
  width: 90%;
}

.video-gallery {
  padding: 2rem;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* This is the Now showing element */

.video-gallery p {
  display: inline-block;
  margin-block: 2rem;
  color: var(--green-accent-color);
  position: relative;
}
.video-gallery p::after {
  content: "";
  width: 100%;
  height: 2px;
  background-color: var(--green-accent-color);
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translate(100%, -50%);
}
li:has(video) {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 2rem;
  align-self: center;
}

video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* This is styling for video-embed-block */
.video-embed-block {
  margin-bottom: 2rem;
  width: 100%;
  position: relative;
  align-self: center;
}

.screening-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.screening-header {
  display: flex;
  align-items: center;
  flex-direction: column;
}
.now-screening-text {
  height: auto;
}
.screening-header > h4 {
  font-size: 2rem;
  color:var(--green-accent-color);
  margin-block: 2rem;
}

.now-screening-text > p {
  font-size: 1.5rem;
  color: var(--secondary-background-color);
}
.screening-video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 80%;
  margin-block: 2rem;
}

.screening-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-block: 2rem;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-frame > iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  object-fit: cover;
  transition: opacity 0.2s ease;
}
.video-frame:hover .video-overlay {
  opacity: 0;
  pointer-events: none;
}
/* I used pointer-events property that I found on https://css-tricks.com/almanac/properties/p/pointer-events/.The pointer-events: none prevents the overlay from blocking clicks on the video. */

/* This is for styling for audio-block */
.audio-block {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  margin-block: 5rem;
}
.audio-block p {
  padding: 1rem;
}
.audio-block audio {
  width: 90%;
  height: 50px;
}

/* This is for styling audio-embed-block */
.audio-embed-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
}

.audio-embed-block > iframe {
  width: 100%;
  height: 100%;
}

/* This is styling for pdf-block */
.pdf-block {
  height: 500px;
  display: flex;
  justify-content: center;
}

.pdf-block > iframe {
  width: 100%;
  height: 100%;
}

/* The selector p:first-of-type targets the first <p> element within the parent container so that I only style the first paragraph inside .text-block and not the entire page. */
/* I pulled this syntax from https://css-tricks.com/almanac/pseudo-selectors/f/first-of-type/ */
.text-block p:first-of-type {
  font-family: var(--secondary-font);
  font-size: 3rem;
  text-align: center;
}

.text-block p:last-of-type {
  text-align: center;
}

p:has(#channel-count) {
  margin-block: 2rem;
}

footer {
  width: 100%;
  background-color: #150c0c;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--secondary-background-color);
}
.footer-top {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  flex-direction: column-reverse;
}
.footer-links {
  padding: 4rem 6rem;
  text-align: center;
  color: var(--green-accent-color);
}
.back-to-top {
  cursor: pointer;
}
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  flex-direction: column;
  text-align: center;
}

@media (width>=550px) {
  #image-blocks
   {
    column-count: 2;
    display: block;
    width: 80%;
  }
  h1 {
    font-size: 3rem;
    line-height: 0.75;
  }

  .heading-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .cantonese-text {
    font-weight: 400;
    font-size: 4rem;
  }
  nav ul li {
    font-size: 1rem;
    padding: 2.5rem;
  }
  #channel-description {
  font-size: 1.25rem;
  padding-block: 2rem;
}
.intro-text {
  padding: 1rem 6rem 4rem;
}
.block-background {
  width: 85vw;
  padding-block: 1.5rem;
}
li:has(.image-block) {
  width: 100%;
}
li:has(video), 
 .video-embed-block  {
  width: 60vw;
 }
}

@media (width>=1024px) {
  .footer-top {
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
  }
  h1 {
    font-size: 6rem;
    
  }
  nav ul li {
    font-size: 1rem;
  }
  .screening-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50vh;
    margin-top: 2rem;
  }
  .screening-header {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 40%;
    height: 100%;
  }
  .now-screening-text {
    height: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .screening-header > h4 {
    font-size: 2rem;
    margin-block: 0;
    align-self: flex-start;
    padding: 2rem;
  }

  .now-screening-text > p {
    font-size: 1.5rem;
  }
  .screening-video-container {
    width: 50%;
    margin-block: 2rem;
  }
  #channel-description {
  
  font-size: 1.5rem;
  padding-block: 2rem;
}
.block-background {
  width: 80vw;
  padding-block: 2rem;
}
li:has(.image-block) {
  width: 30vw;
}
li:has(video), 
 .video-embed-block  {
  width: 50%;
  padding: 1rem;
 }
   
  #video-blocks, #article-blocks {
    flex-direction: row;
    flex-wrap: wrap;
  }
   .audio-embed-block {
   width: 40vw;
}
.audio-block audio {
  width: 85%;
}
 .pdf-block > iframe {
  width: 80%;
  height: 100%;
}

.link-block {
  width: 50%;
}
#text-blocks{
  display: flex;
  align-items: center;
  flex-direction: column;
}
}

/* Referenced this article for media query breakpoints. I used 550px as a breakpoint for small tablet layouts and 1024px for desktop screens to create responsive layout https://penpot.app/blog/how-to-use-css-and-media-query-breakpoints-to-create-responsive-layouts/ */
