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

body {
  font-family: "Roboto", Arial, sans-serif;
  background-color: #f8f9fa;
  color: #374151;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Color Variables
   ============================================ */
:root {
  --boao-blue: #0055a4;
  --boao-dark: #003366;
  --boao-accent: #0099cc;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --green-600: #16a34a;
  --green-700: #15803d;
  --purple-600: #9333ea;
  --purple-700: #7e22ce;
  --red-500: #ef4444;
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem;
}

.bg-white {
  background-color: #ffffff;
}

.bg-gray {
  background-color: #eaeef6;
}

.bg-dark {
  background: url("../img/videos-bg.png") no-repeat center center;
  background-size: cover;
}

.section-title.text-white {
  color: #ffffff;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  background-color: var(--white);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 50;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--boao-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-text h1 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--boao-blue);
  line-height: 1;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--boao-blue);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--boao-accent);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.btn-register {
  background-color: var(--boao-blue);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn-register:hover {
  background-color: #004488;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
}

.mobile-menu-btn:hover {
  color: var(--gray-700);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero img {
  width: 100%;
  height: auto;
}

.hero .pc {
  display: block;
}

.hero .mobile {
  display: none;
}

/* ============================================
   Section Styles
   ============================================ */
.section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.section-header-center {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
  padding-left: 3rem;
}

/* ============================================
   Top News Section
   ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.news-featured {
  cursor: pointer;
}

.news-image-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 587/339;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.news-featured:hover .news-image {
  transform: scale(1.05);
}

.news-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--boao-blue);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
}

.news-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.news-featured:hover .news-title {
  color: #faa500;
}

.news-excerpt {
  color: #262626;
  font-size: 1.1rem;
  font-weight: 200;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #8e9fbb;
}

.news-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
  gap: 1rem;
}

.news-item {
  cursor: pointer;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #e7eaf0;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
  transition: color 0.3s;
}

.news-item:hover .news-item-title {
  color: #faa500;
}

.news-item-excerpt {
  font-size: 1rem;
  color: #262626;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-meta {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #8e9fbb;
}

/* ============================================
   Key Themes Carousel
   ============================================ */
.carousel-viewport {
  overflow-x: auto;
  padding: 0;
  margin: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.carousel-viewport::-webkit-scrollbar-track {
  display: none;
  background: transparent;
}

.carousel-viewport::-webkit-scrollbar-thumb {
  display: none;
  background: transparent;
}

.carousel-container {
  margin-left: -2rem;
  margin-bottom: 5rem;
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: visible;
  gap: 2.3rem;
  padding: 0 1.5rem 2rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.theme-card {
  flex: none;
  width: 100%;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  scroll-snap-align: center;
}

.carousel-btn:disabled,
.carousel-btn[style*="pointer-events: none"] {
  cursor: not-allowed;
  opacity: 0.5;
}

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

.theme-image {
  height: 15rem;
  overflow: hidden;
}

.theme-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.theme-content {
  height: 12rem;
  padding: 4.5rem 1.5rem 10rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: #ffffff;
  margin-top: 0.3rem;
  position: relative;
}

.theme-tag {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: #dcf6fd;
  position: absolute;
  left: -0.2rem;
  top: 1.2rem;
  padding: 0.15rem 1rem;
  z-index: 10;
  white-space: nowrap;
}

.tag-technology {
  background-color: #00a8d2;
}

.tag-sustainability {
  background-color: #21873a;
}

.tag-economy {
  background-color: #0062f7;
}

.tag-digital {
  background-color: #00a8d2;
}

.tag-health {
  background-color: #21873a;
}

.tag-green {
  background-color: #0062f7;
}

.theme-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.theme-excerpt {
  color: #85888d;
  font-size: 1rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.carousel-btn {
  position: absolute;
  top: 103%;
  z-index: 10;
  color: #faa500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid #faa500;
  cursor: pointer;
  transition:
    opacity 0.3s,
    background-color 0.3s,
    color 0.3s;
}

.carousel-btn:hover {
  background-color: #faa500;
  color: #faf1ef;
}

.carousel-container:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn-left {
  left: 45.5%;
}

.carousel-btn-right {
  right: 45.5%;
}

.icon {
  width: 1.2rem;
  height: 1.2rem;
}

/* ============================================
   Theme Clickable Link Styles
   ============================================ */
.theme-clickable {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  width: 100%;
  height: 100%;
  outline: none;
}

.theme-clickable:focus-visible {
  outline: 2px solid #faa500;
  outline-offset: 2px;
  border-radius: 4px;
}

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

.theme-clickable:hover .theme-title {
  color: #faa500;
  transition: color 0.2s ease;
}

.theme-clickable:hover .theme-image img {
  transform: scale(1.03);
  transition: transform 0.3s ease;
}

.theme-image img {
  transition: transform 0.3s ease;
}

.theme-excerpt {
  pointer-events: none;
}

/* ============================================
   Videos Section
   ============================================ */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Featured Video */
.video-featured {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.video-image {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  transition: opacity 0.3s;
}

.video-featured:hover .video-image {
  opacity: 1;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-btn .play-icon {
  width: 4rem;
  height: 4rem;
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.video-play-btn .play-icon::before {
  content: "";
  margin-left: 0.25rem;
}

.video-featured:hover .play-icon {
  transform: scale(1.1);
}

.video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.video-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.video-duration {
  font-size: 0.875rem;
  color: #d1d5db;
  margin-top: 0.25rem;
}

/* Video List */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  height: 100%;
}

.video-item {
  flex: 1;
  display: flex;
  gap: 1rem;
  background-color: rgba(24, 45, 75, 0.4);
  padding: 0.75rem;
  cursor: pointer;
  transition: background-color 0.3s;
  overflow: hidden;
}

.video-item:hover {
  background-color: rgba(24, 45, 75, 0.2);
}

.video-item-thumb {
  position: relative;
  width: 8.5rem;
  flex-shrink: 0;
  overflow: hidden;
  background-color: var(--gray-700);
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.play-icon-small {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 3rem;
  color: var(--white);
  padding: 0.375rem;
  z-index: 2;
  transition: all 0.2s ease;
  pointer-events: none;
}

.video-item:hover .video-thumb-img {
  transform: scale(1.05);
}

.video-item:hover .play-icon-small {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(250, 165, 0, 0.4);
}

.video-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 0.15rem;
}

.video-item-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.video-item-date {
  font-size: 1rem;
  color: #faa500;
}

/* ============================================
   Highlights Gallery
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.1rem 1.3rem;
}

.gallery-item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 3/2;
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item-featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-label {
  background-color: var(--white);
  color: var(--boao-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
}

.highlights-section {
  padding-bottom: 7rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--gray-900);
  color: var(--white);
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  grid-column: span 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.logo-icon-small {
  width: 2rem;
  height: 2rem;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--boao-blue);
  font-weight: 700;
}

.footer-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
}

.footer-description {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-list li a {
  color: var(--gray-400);
  font-size: 0.875rem;
  transition: color 0.3s;
}

.footer-list li a:hover {
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 2rem;
  height: 2rem;
  background-color: var(--gray-800);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.social-icon:hover {
  background-color: var(--boao-blue);
}

.footer-bottom {
  border-top: 1px solid #2a3d60;
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 1rem;
  color: #2a3d60;
}

/* ============================================
   Responsive Styles - Mobile First
   ============================================ */

/* Small Mobile (max-width: 640px) */
@media (max-width: 640px) {
  /* Video section */
  .video-item-thumb {
    width: 6rem;
    height: 4rem;
  }

  .play-icon-small {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.25rem;
  }

  .video-item-title {
    font-size: 0.875rem;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item-featured {
    grid-column: span 1;
  }
}

/* Tablet & Mobile (max-width: 767px) */
@media (max-width: 767px) {
  /* Hero */
  .hero .pc {
    display: none;
  }

  .hero .mobile {
    display: block;
  }

  /* Section title */
  .section-title {
    padding-left: 0;
  }

  /* Carousel */
  .carousel-btn {
    display: none;
  }

  .carousel-viewport {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .theme-card {
    width: 100%;
  }
}

/* Tablet (min-width: 768px) */
@media (min-width: 768px) {
  /* Navigation */
  .nav-links {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  /* Video grid */
  .video-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Carousel */
  .theme-card {
    width: 50%;
  }
}

/* Large Tablet & Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
  /* Carousel */
  .theme-image {
    height: 11rem;
  }

  .carousel-container {
    margin-bottom: 0;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .gallery-item-featured {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* Desktop (min-width: 1024px) */
@media (min-width: 1024px) {
  /* News grid */
  .news-grid {
    grid-template-columns: 587fr 660fr;
  }

  /* Carousel */
  .theme-card {
    width: 32%;
  }
}
