@import url('/tailwind.css');
@import url('/fonts.css');

/* Latest uploads component styling - Minimalist Edition */
:root {
  --background-color: #ffffff;
  --text-primary: #333333;
  --text-secondary: #6e6e6e;
  --border-radius: 0.5rem;

  /* Text rendering optimizations */
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  
  /* Ensure GPU acceleration */
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  
  /* Prevent subpixel rendering issues */
  perspective: 1000px !important;
  
  /* Improved kerning */
  font-kerning: normal !important;
  
  /* Prevent font-size adjustments */
  -webkit-text-size-adjust: 100% !important;
  -moz-text-size-adjust: 100% !important;
  -ms-text-size-adjust: 100% !important;
  
  /* Sharpen text edges */
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.01) !important;
}

/* Animation and Transitions */
.smoothen-text {
  /* Text rendering optimizations */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  /* Ensure GPU acceleration */
  transform: translateZ(0);
  backface-visibility: hidden;
  
  /* Prevent subpixel rendering issues */
  perspective: 1000px;
  
  /* Improved kerning */
  font-kerning: normal;
  
  /* Prevent font-size adjustments */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  
  /* Sharpen text edges */
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.01);
}

.smoothen-text-animated {
  /* Text rendering optimizations for animation */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  /* Animation optimizations */
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
  
  /* Other text improvements */
  font-kerning: normal;
  -webkit-text-size-adjust: 100%;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.01);
}

/* Base styles */
.container-latest-uploads {
  max-width: 1150px;
  /* max-width: 1400px; */
  /* max-width: 81.25rem; */
  margin: 0 auto;
  margin-bottom: 5rem;
  margin-top: 5rem;
  /* padding: 1.5rem 1rem; */
  /* font-family: var(--font-aileron); */
}

.latest-uploads-container h1 {
  color: #000000;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  white-space: nowrap;
}

/* This is the key part - remove the letter spacing between the last and first letter of each span */
.latest-uploads-container h1 span:first-child {
  margin-right: 0em; /* Counteract the letter spacing between N and C */
}

header {
  margin-bottom: 1rem;
  text-align: left; /* align Title here */
  padding-left: 1.25rem;
}

header h1 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  /* padding-left: 1.25rem; */
}

/* .header-section-latest-uploads h2 {
  font-size: 1.5rem;
  margin: 0;
  color: black;
  padding-left: 1.25rem;
} */

.header-section-latest-uploads h2 {
  /* font-size: 1.5rem; */
  margin: 0;
  color: black;
  padding-left: 1.25rem;

  text-transform: uppercase;
  font-family: var(--font-inter);
  font-weight: 900;
  font-size: 2rem; 
  text-align: center;
  /* margin: 0 0 1rem 0; */
  text-rendering: optimizeLegibility;

  /* text-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.5); */
  /* text-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.25); */
}

/* Header section with title and View All button */
.header-section-latest-uploads {
  display: flex;
  justify-content: space-between;
  align-items: center;
}



.view-all-button-latest-uploads {
  /* background: linear-gradient(135deg, #383837 0%, #000000 100%); */
  /* background: black; */
  color: #4c4c4c;
  padding: 0.75rem 1.5rem;
  border-radius: 10rem;
  text-decoration: none;
  font-family: var(--font-inter);
  letter-spacing: 0;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  /* margin-right: 1.25rem; */
}

.view-all-button-latest-uploads:hover {
  /* background: radial-gradient(circle at bottom center, #343434 10%, #000000 100%); */
  color: black;
  text-decoration: underline;
}





/* Video grid with precisely 3 videos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
   gap: 1.5rem;
  /* margin-bottom: 2rem; */
  margin-left: auto;
  margin-right: auto;
}

/* Video container with clean aesthetics - NO HOVER EFFECTS */
.video-container {
  display: flex;
  flex-direction: column;
  /* background: #ffffff; */
  border-radius: .75rem;
  overflow: hidden;
  position: relative;
  box-shadow: none !important; /* Explicitly remove any drop shadows */
  transition: none !important; /* Remove any transitions/animations */
  transform: none !important; /* Prevent any transform */
}

/* Remove hover effects */
.video-container:hover {
  transform: none !important;
  animation: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  scale: 1 !important;
}

/* Thumbnail styling - LARGER SIZE */
.thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  /* Standard 16:9 aspect ratio for YouTube videos */
  /* padding-top: 56.25%; */
  overflow: hidden;
  background-color: #f5f5f5;
  cursor: pointer;
  transition: none !important; /* Remove any transitions/animations */
  border-radius: .75rem; /* Rounded corners on all sides */
  transform: none !important; /* Prevent any transform */
}

/* Remove hover effects on thumbnail wrapper */
.thumbnail-wrapper:hover {
  transform: none !important;
  filter: none !important;
  scale: 1 !important;
  opacity: 1 !important;
}

.thumbnail-wrapper a {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  transition: none !important; /* Prevent any transitions on the anchor */
}

/* Remove hover effects on anchor tag */
.thumbnail-wrapper a:hover {
  transform: none !important;
  filter: none !important;
  scale: 1 !important;
  opacity: 1 !important;
}

.thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to show the entire image */
  transition: none !important; /* Remove any transitions/animations */
  transform: none !important; /* Prevent any transform */
  transition: filter 0.3s ease !important;
}

.thumbnail-wrapper:hover .thumbnail {
  filter: brightness(0.6);
}

/* Remove hover effects on thumbnail */
.thumbnail:hover {
  transform: none !important;
  scale: 1 !important;
  filter: none !important;
  opacity: 1 !important;
}

/* Duration badge */
.duration-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 3;
}

/* Video title styling - COMPLETELY SEPARATE FROM THUMBNAIL */
.video-title {
  text-align: center;
  font-size: 0.95rem; /*15px*/
  font-weight: 600;
  margin: 0.75rem 0 0.5rem;
  padding: 0 0.5rem;
  line-height: 1;
  color: black;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  height: 2.6em; /* Approximate height for 2 lines of text */
  background: transparent;
  position: relative;
  cursor: pointer;
}

/* Fix for the video title links */
.video-title a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  transition: none !important;
  cursor: pointer;
}

.video-title a:hover {
  transform: none !important;
  scale: 1 !important;
  filter: none !important;
  opacity: 1 !important;
}

/* No videos message */
.no-videos {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Footer styling */
footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.caching-info {
  font-style: italic;
  color: #999;
}

/* Disable all hover transitions and animations globally */
/* * {
  transition: none !important;
}

*:hover {
  transition: none !important;
  transform: none !important;
  scale: 1 !important;
  filter: none !important;
  animation: none !important;
} */

.w-full {
  /* width: 100%; */
  width: 100vw;
  height: 100vh;
  /* margin-top: -20px; */
}





/* Play button overlay for latest uploads */
.play-button-overlay-latest-uploads {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
  z-index: 2;
}

.play-button-overlay-latest-uploads:hover {
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  will-change: transform !important;
}

.play-button-latest-uploads {
  width: 65px;
  height: 65px;
  color: white;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  will-change: transform !important;
  pointer-events: none;
}

.play-button-overlay-latest-uploads:hover .play-button-latest-uploads {
  transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform !important;
  opacity: 1 !important;
}

.play-button-overlay-latest-uploads:active .play-button-latest-uploads {
  transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Responsive play button sizes for latest uploads */
/* @media (max-width: 1024px) {
  .play-button-latest-uploads {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 768px) {
  .play-button-latest-uploads {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .play-button-latest-uploads {
    width: 40px;
    height: 40px;
  }
} */





/* Making latest-uploads.php responsive on all devices */

/* Desktop | 1281px - 1440px  */
@media (max-width: 1280px) {
  /* None, coded on macbook m1 pro */
}

/* Medium Laptop/Desktop | 1515px - 1920px */
@media (max-width: 1515px) {
 /* None, coded on macbook m1 pro */
}

/* Small Laptop/Desktop | 1024px - 1280px */
@media (max-width: 1024px) {
  /* None, coded on macbook m1 pro */
}

/* Mobile Small Portrait (Normal) | up to 480px */
/* S20+, iPhone 12, iPhone 13 */
@media (max-width: 480px) and (orientation: portrait) {

  .play-button-latest-uploads {
    width: 52px;
    height: 52px;
  }

  .container-latest-uploads {
    margin-top: 0rem;
    margin-bottom: 0rem;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
  }
  
  .header-section-latest-uploads {
    margin-bottom: -.75rem;

    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .header-section-latest-uploads h2 {
    font-size: 1.5rem;
    text-align: center;
    padding-left: 0;
  }
  
  .view-all-button-latest-uploads {
    display: none;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
    gap: .5rem;
    max-width: 70%;
    margin: 1.5rem auto 0;
    order: 1;
  }
  
  .video-grid::after {
    content: "VIEW ALL";
    display: block;
    grid-column: 1;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #4c4c4c;
    text-transform: uppercase;
    margin-top: -.5rem;
    margin-bottom: 0rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .video-grid:hover::after {
    color: black;
    text-decoration: underline;
  }
  
  .thumbnail-wrapper {
    border-radius: 0.5rem;
  }
  
  .video-title {
    font-size: 0.85rem;
    margin: 0.5rem 0;
    padding: 0 0.25rem;
    height: 2.2em;
  }
  
  .duration-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    bottom: 0.25rem;
    right: 0.25rem;
  }
}

/* Mobile Small Landscape (Seitlich gehlaten) | up to 950px */
/* S20+, iPhone 14, iPhone 15 Pro in Landscape (Seitlich gehlaten) */
@media (max-width: 950px) and (orientation: landscape) {
  .container-latest-uploads {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 100vw;
  }
  
  .header-section-latest-uploads {
    padding: 0 2rem;
  }
  
  .header-section-latest-uploads h2 {
    font-size: 1.5rem;
    padding-left: 0;
  }
  
  .view-all-button-latest-uploads {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
  }
  
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin: 0rem 1rem 0rem;
  }
  
  .thumbnail-wrapper {
    border-radius: 0.5rem;
  }
  
  .video-title {
    font-size: 0.8rem;
    margin: 0.5rem 0;
    padding: 0 0.25rem;
    height: 2em;
  }
  
  .duration-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.25rem;
    bottom: 0.25rem;
    right: 0.25rem;
  }
}

/* Mobile Large Portrait (Normal) | 481px - 600px */
/* iPhone 14 Pro Max, Pixel 7 Pro, larger phones */
@media (min-width: 481px) and (max-width: 600px) and (orientation: portrait) {
  .container-latest-uploads {
    max-width: 100%;
  }
  
  .header-section-latest-uploads {
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
  }
  
  .header-section-latest-uploads h2 {
    font-size: 1.5rem;
    text-align: center;
    padding-left: 0;
  }
  
  .view-all-button-latest-uploads {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 85%;
    margin: 2rem auto 0;
  }
  
  .thumbnail-wrapper {
    border-radius: 0.625rem;
  }
  
  .video-title {
    font-size: 0.9rem;
    margin: 0.625rem 0;
    padding: 0 0.375rem;
    height: 2.4em;
  }
  
  .duration-badge {
    font-size: 0.7rem;
    padding: 0.125rem 0.35rem;
    bottom: 0.375rem;
    right: 0.375rem;
  }
}

/* Tablet Portrait (Normal) | 601px - 1024px */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
  .container-latest-uploads {
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 100%;
  }
  
  .header-section-latest-uploads {
    padding: 0 1rem;
  }
  
  .header-section-latest-uploads h2 {
    font-size: 2rem;
    padding-left: 0.5rem;
  }
  
  .view-all-button-latest-uploads {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin: 0rem 1rem 0rem;
  }
  
  .thumbnail-wrapper {
    border-radius: 0.75rem;
  }
  
  .video-title {
    font-size: 1rem;
    margin: 0.75rem 0;
    padding: 0 0.5rem;

    /* This limits text up to 2 linse then making it '...' */
    line-height: 1.3em;
    height: 2.6em;       /* height is 2x line-height, so two lines will display */
    overflow: hidden;  /* prevents extra lines from being visible */
    
    /* This makes it only for one line */
    /* white-space: nowrap; */
  }
  
  .duration-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    bottom: 0.5rem;
    right: 0.5rem;
  }
}

/* Tablet Landscape (Seitlich gehlaten) | 951px - 1366px */
@media (min-width: 951px) and (max-width: 1366px) and (orientation: landscape) {
  .container-latest-uploads {
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 100%;
  }
  
  .header-section-latest-uploads {
    padding: 0 2rem;
  }
  
  .header-section-latest-uploads h2 {
    font-size: 2rem;
    padding-left: 0.75rem;
  }
  
  .view-all-button-latest-uploads {
    padding: 0.625rem 1.375rem;
    font-size: 0.9rem;
  }
  
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin: 0rem 1rem 0rem;
  }
  
  .thumbnail-wrapper {
    border-radius: 0.75rem;
  }
  
  .video-title {
    font-size: 1rem;
    margin: 0.75rem 0;
    padding: 0 0.5rem;

    /* This limits text up to 2 linse then making it '...' */
    line-height: 1.3em;
    height: 2.6em;       /* height is 2x line-height, so two lines will display */
    overflow: hidden;  /* prevents extra lines from being visible */
    
    /* This makes it only for one line */
    /* white-space: nowrap; */
  }
  
  .duration-badge {
    font-size: 0.8rem;
    padding: 0.125rem 0.35rem;
    bottom: 0.375rem;
    right: 0.375rem;
  }
}