.awards-slider {
  position: relative;
  width: 100%;
  min-height: 280px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.award-slide img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}
.award-slide {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}
.award-slide.active {
  opacity: 1;
  z-index: 1;
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1);
}
.award-slide.prev {
  opacity: 0;
  z-index: 0;
}
/* Variables */
:root{
  --primary: #3cb4e5;
  --dark: #042a58;
  --white: #ffffff;
  --muted: #f4f6f8;
  --text: #042a58;
  --success: #2bb673;
  --bg-opacity: 0.12;
  --max-width: 1200px;
}

*{box-sizing:border-box}
html,body{height:100%}
/* Utility Classes */
.hidden { display: none !important; }

body{
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  margin:0;
  color:var(--text);
  background:linear-gradient(180deg,var(--white),#fbfdff);
  -webkit-font-smoothing:antialiased;
}

/* Page background image (decorative) using pseudo-element to not interfere with content */
body::before{
  content: '';
  position:fixed;inset:0;z-index:0;pointer-events:none;
  background-image: url('../image/background.png');
  background-repeat:no-repeat;background-position: center top;background-size:cover;
  opacity: var(--bg-opacity);
  filter: blur(1px) saturate(3.5);
}

/* make sure main content stacks above background */
main, .site-header, .site-footer{position:relative;z-index:2}
.container{width:90%;max-width:var(--max-width);margin:0 auto}

/* Header e Navbar */
.site-header{position:sticky;top:0;z-index:60;background:rgba(255,255,255,0.95);backdrop-filter:blur(10px);padding:12px 0;box-shadow:0 2px 8px rgba(4,42,88,0.06)}
.nav{display:flex;align-items:center;justify-content:space-between;position:relative}
.brand{font-weight:700;color:var(--dark);font-size:1.1rem;z-index:3}

/* Menu hamburguer */
.hamburger{display:none;flex-direction:column;gap:5px;background:transparent;border:none;cursor:pointer;padding:8px;z-index:3}
.hamburger span{display:block;width:25px;height:2px;background:var(--dark);transition:all 0.3s ease;border-radius:2px}
.hamburger.active span:nth-child(1){transform:rotate(45deg) translate(7px, 7px)}
.hamburger.active span:nth-child(2){opacity:0}
.hamburger.active span:nth-child(3){transform:rotate(-45deg) translate(7px, -7px)}

/* Menu de navegação */
.nav-menu{display:flex;gap:24px;align-items:center}
.nav-link{color:var(--dark);text-decoration:none;font-weight:500;font-size:0.95rem;transition:color 0.3s ease;padding:8px 12px;border-radius:6px}
.nav-link:hover{color:var(--primary);background:rgba(60,180,229,0.08)}
.nav-link.hidden{display:none}

/* Responsivo - Mobile */
@media(max-width:699px){
  .hamburger{display:flex}
  .nav-menu{position:fixed;top:0;right:-100%;width:280px;height:100vh;background:var(--white);box-shadow:-4px 0 20px rgba(4,42,88,0.15);flex-direction:column;padding:80px 30px 30px;gap:16px;transition:right 0.3s ease;align-items:flex-start;z-index:2}
  .nav-menu.active{right:0}
  .nav-link{width:100%;padding:12px 16px;border-radius:8px;font-size:1rem}
  .nav-link:hover{background:rgba(60,180,229,0.12)}
}

/* Buttons */
.btn{display:inline-block;padding:10px 18px;border-radius:10px;text-decoration:none;font-weight:600}
.btn.primary{background:var(--primary);color:var(--white);box-shadow:0 6px 18px rgba(60,180,229,0.18)}
.btn.ghost{background:transparent;border:1px solid rgba(4,42,88,0.06);color:var(--dark)}

/* HERO */
.hero{position:relative;min-height:70vh;display:flex;align-items:center}
.hero-inner{position:relative;padding:20px 0 6px 0;z-index:2}
.title{font-size:2.25rem;margin:0;color:var(--dark);letter-spacing:-0.02em}
.subtitle{margin-top:12px;color:rgba(4,42,88,0.8);max-width:680px}
.hero-actions{margin-top:20px;display:flex;gap:12px}

/* Metrics */
.metrics{position:relative;padding:40px 0}
.top-icon{width:34px;height:34px;vertical-align:middle;margin-left:10px}
.metrics-inner{position:relative;z-index:2}
.section-title{font-size:1.25rem;margin-bottom:18px;color:var(--dark)}
.cards{display:grid;grid-template-columns:repeat(1,1fr);gap:16px;align-items:stretch}
.card{background:var(--white);border-radius:14px;padding:18px;display:flex;align-items:center;gap:14px;box-shadow:0 6px 20px rgba(4,42,88,0.06);min-height:84px}
/* Icon on the left: fixed slot so all bodies line up consistently */
.card-icon{flex:0 0 64px;width:64px;height:64px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:transparent}
/* If icon is an image, make it fit nicely within the icon area */
.card-icon img{display:block;width:40px;height:40px;object-fit:contain}
.card-body{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
.card-number{font-size:1.6rem;font-weight:700;color:var(--dark);line-height:1}
.card-label{font-size:0.9rem;color:rgba(4,42,88,0.7);margin-top:4px}
.highlight{margin-top:18px;padding:16px;border-radius:10px;background:linear-gradient(90deg,rgba(60,180,229,0.06),rgba(4,42,88,0.03))}

/* Contributors */
.contributors{padding:40px 0}
.carousel{overflow:hidden}
.track{display:flex;gap:16px;align-items:center}
.contrib{background:var(--white);padding:14px;border-radius:12px;display:flex;align-items:center;gap:12px;box-shadow:0 6px 18px rgba(4,42,88,0.04);min-width:220px}
.contrib img{width:64px;height:64px;border-radius:50%;object-fit:cover}

/* Animation: move track from right to left */
.track{
  animation: scroll-left 18s linear infinite;
}

@keyframes scroll-left{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}

@keyframes scroll-right-tv{
  from{transform:translateX(-50%)}
  to{transform:translateX(0%)}
}

/* Pause on hover / focus */
.carousel:hover .track,
.carousel:focus-within .track{animation-play-state:paused}

/* Respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce){
  .track{animation: none}
  body::before{filter:none}
}
.contrib figcaption{display:flex;flex-direction:column}
.contrib figcaption strong{color:var(--dark)}

/* Vision & contribute */
.vision{padding:40px 0}
.contribute{padding:36px 0;background:linear-gradient(180deg,transparent,rgba(3,25,49,0.02))}

/* Footer */
.site-footer{padding:18px 0;background:rgba(63, 239, 252, 0.267);border-top:1px solid rgba(4,42,88,0.04)}
.footer-inner{display:flex;justify-content:space-between;align-items:center}

/* Responsive - mobile first */
@media(min-width:700px){
  .title{font-size:3.5rem}
  .hero{min-height:75vh}
  .cards{grid-template-columns:repeat(4,1fr)}
  .brand, .site-title{font-size:1.25rem}
}

/* Parallax helper - will be moved by JS */
.parallax{will-change:transform}

/* small tweaks */
.card-number.percent:after{content:'%';margin-left:4px;font-weight:600}

/* TV mode: layout sem scroll, seções dimensionadas para caber na tela inteira */
.tv-page{height:100vh;overflow:hidden}

.tv-page .site-header{height:44px;padding:6px 0}
.tv-page .site-footer{height:40px;padding:6px 0}
.tv-page main{height:calc(100vh - 90px);display:flex;flex-direction:column;gap:4px}
.tv-page .site-footer{display:none} /* esconder footer na página TV */

/* Distribuição das seções na tela da TV (valores ajustados para caber sem scroll) */
.tv-metrics{flex:0 0 auto;display:flex;align-items:center;padding-top:4px;padding-bottom:4px}
.tv-metrics .cards{display:flex;gap:8px;align-items:center;justify-content:space-around;width:100%}
.tv-metrics .card{flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;padding:4px 8px;min-height:48px}
.tv-metrics .card-icon{flex:0 0 40px;width:40px;height:40px;border-radius:8px;background:transparent;display:flex;align-items:center;justify-content:center}
.tv-metrics .card-icon img{width:30px;height:30px}
.tv-metrics .card-body{align-items:flex-start}
.tv-metrics .card-number{font-size:1.2rem}
.tv-metrics .card-label{font-size:0.8rem}

/* Awards slider (TV-only: scope under .tv-page to avoid affecting index) */
.tv-page .awards{flex:1;display:flex;flex-direction:column;margin-top:4px;min-height:0}
/* Fix container height inside flex parent */
.tv-page .awards .container {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.tv-page .awards-carousel{
  width:100%;
  flex: 1; /* Grow to fill remaining space in container */
  min-height:0;
  overflow:visible;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center
}

/* Slider structure */
.tv-page .awards-slider{position:relative;width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center}
.tv-page .award-slide{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:0;transform:translateX(30px);transition:opacity 0.6s ease,transform 0.6s ease;pointer-events:none}
.tv-page .award-slide.active{opacity:1;transform:translateX(0);pointer-events:auto;z-index:1}
.tv-page .award-slide.prev{transform:translateX(-30px)}
.tv-page .award-slide img{max-width:98%;max-height:calc(100vh - 120px);object-fit:contain;border-radius:10px;box-shadow:0 8px 24px rgba(4,42,88,0.10)}

/* Paginação do slider */
.slider-pagination{
  position:absolute;
  bottom: -2px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  z-index:10;
}
.slider-dot{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,0.5);border:2px solid rgba(4,42,88,0.3);cursor:pointer;transition:all 0.3s ease}
.slider-dot.active{background:#042a58;transform:scale(1.2)}
.slider-dot:hover{background:rgba(4,42,88,0.6)}

/* Fallback: awards-track para páginas que ainda não migraram */
.awards-track{display:flex;align-items:center;gap:14px;animation:scroll-left 20s linear infinite}
.award{flex:0 0 30%;display:flex;align-items:center;justify-content:center;aspect-ratio:1/1}
.award img{width:96%;height:96%;object-fit:contain;border-radius:10px;box-shadow:0 8px 24px rgba(4,42,88,0.10)}

/* Default (index) slider rules: keep slides stacked but only one visible, allow JS to toggle .active */
.awards-carousel{position:relative;overflow:hidden;width:100%}
.awards-slider{
  position:relative;
  width:100%;
  min-height:280px;
  height:60vh;
  max-height:80vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.award-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1);
}
.award-slide.active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1);
}
.award-slide.prev {
  opacity: 0;
  z-index: 0;
}
.award-slide img{
  display:block;
  margin:0 auto;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:10px;
}

/* Mobile: increase award images by ~60% for better visibility on small screens */
@media (max-width:699px){
  /* Increase image visibility without cropping: enlarge the awards area and cards */
  .awards{
    padding:14px 0;
    min-height: auto; /* Remove fixed height to reduce gap */
    display: block;
  }
  .awards-carousel, .awards-slider {
    min-height: 350px; /* Reduce container height */
  }
  .award-slide img{
    max-width:95%;
    max-height:320px;
  }
  .slider-pagination{bottom:5px;gap:6px}
  .slider-dot{width:8px;height:8px}
  /* Fallback carousel */
  .awards .award{flex:0 0 65%}
  .awards .award img{width:auto;max-width:100%;max-height:70vw;object-fit:contain;display:block;margin:0 auto}
  /* mobile pacing: faster for better flow */
  .awards-track{gap:36px;animation-duration:8s}
  /* speed up contributors carousel on mobile for better pacing */
  .contributors .track{animation-duration:8s}

  /* Ensure contributors on the normal index (non-TV) get similar reduced-height tuning */
  .contributors .contrib{min-width:160px;padding:8px}
  .contributors .contrib img{width:56px;height:56px}


/* Contributors reduced height but still visible */
.tv-contributors{flex:0 0 auto;display:flex;align-items:center;padding-top:4px;padding-bottom:4px}
.tv-contributors .carousel{width:100%;overflow:hidden}
.tv-contributors .track{
  display:flex !important;
  width: max-content !important; /* Ensure track width equals content width, not viewport width */
  gap:0 !important; /* Use margins for seamless loop */
  padding-right: 0 !important;
  animation: scroll-left 15s linear infinite !important;
}
.tv-contributors .contrib{
  min-width:140px;
  padding:4px 8px;
  flex-shrink:0;
  margin-right: 12px; /* Spacing attached to item for correct loop math */
}
.tv-contributors .contrib img{width:36px;height:36px}

  /* Mirror important animation and sizing rules for non-TV contributors inside the same media query scope */
  /* This ensures the index mobile view receives the same pacing and sizing adjustments. */
  @media (max-width:699px){
    .contributors .track{animation-duration:8s}
    .contributors .contrib{min-width:160px;padding:8px}
    .contributors .contrib img{width:56px;height:56px}
  }

.tv-vision{display:none !important}
/* Titles smaller spacing in TV mode */
.tv-page .section-title{margin-bottom:8px}
.tv-vision .section-title{font-size:1.05rem}
.tv-vision p{font-size:0.98rem;max-width:1200px}
}

/* Specific: slower/disabled animation if reduced motion preferred */
@media (prefers-reduced-motion: reduce){
  .awards-track, .tv-contributors .track{animation:none}
}

/* Large screens (TVs) tweaks */
@media(min-width:1200px){
  .tv-metrics .card-number{font-size:2.6rem}
  .tv-metrics .card-label{font-size:1.05rem}
  .hero-inner{padding:40px 0 12px 0}
  .tv-contributors .contrib{min-width:260px}
}

/* Desktop / Large screens (>=1200px) - tune to emphasize Awards */
@media (min-width:1200px) {
  /* Reduce header and metric footprint to free vertical space */
  .tv-page .site-header{height:48px;padding:8px 0}
  .tv-page main{height:calc(100vh - 96px)}

  /* Metrics: compact but legible */
  .tv-metrics{flex:0 0 auto;padding:6px 0}
  .tv-metrics .card{padding:6px 10px;min-height:56px}
  .tv-metrics .card-icon{width:44px;height:44px;flex:0 0 44px}
  .tv-metrics .card-icon img{width:30px;height:30px}
  .tv-metrics .card-number{font-size:1.6rem}
  .tv-metrics .card-label{font-size:0.85rem}

  /* Contributors: smaller, compact tiles */
  .tv-contributors{flex:0 0 auto;padding:6px 0;margin-top:24px}
  .tv-contributors .contrib{min-width:120px;padding:6px 10px;margin-right:10px}
  .tv-contributors .contrib img{width:36px;height:36px}
  .tv-contributors figcaption strong{font-size:0.78rem}
  .tv-contributors figcaption span{font-size:0.68rem}

  /* Awards: make main award image much larger and center it (TV-only) */
  .tv-page .awards{flex:1;display:flex;flex-direction:column;justify-content:center;margin-top:8px}
  .tv-page .awards .container{height:100%;display:flex;flex-direction:column;justify-content:center}
  .tv-page .awards-carousel{flex:1;display:flex;align-items:center;justify-content:center;overflow:visible}
  /* ensure carousel parent is positioning context */
  .tv-page .awards-carousel{position:relative;overflow:visible}
  .tv-page .awards-slider{height:100%;align-items:center}
  /* Center the slide absolutely so it's perfectly centered in carousel */
  .tv-page .award-slide{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%) translateX(30px);
    max-width:980px;
    width:76%;
    max-height:82vh;
    height:auto;
    display:flex;align-items:center;justify-content:center;
    transition:opacity 0.6s ease, transform 0.6s ease;
    overflow:visible;
  }
  .tv-page .award-slide.active{opacity:1;transform:translate(-50%,-50%) translateX(0);pointer-events:auto;z-index:1}
  .tv-page .award-slide.prev{transform:translate(-50%,-50%) translateX(-30px)}
  .tv-page .award-slide img{max-width:100%;max-height:50vh;object-fit:contain;border-radius:10px}

  /* Reduce pagination size for large screens */
  .slider-dot{width:9px;height:9px}
}

/* Silk Browser / Low Res TV (960x540) adjustments */
@media (min-width: 700px) and (max-height: 600px) {
  .tv-page .site-header {
    height: 35px;
    padding: 4px 0;
  }
  
  .tv-page main {
    height: calc(100vh - 35px);
    gap: 2px;
    padding-bottom: 2px;
  }

  .brand { font-size: 0.9rem; }
  .site-title { font-size: 0.9rem; }

  /* Metrics */
  .tv-metrics {
    flex: 0 0 auto;
    height: auto;
    padding: 2px 0;
  }
  .tv-metrics .card {
    padding: 4px 8px;
    min-height: 45px;
    gap: 8px;
  }
  .tv-metrics .card-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 6px;
  }
  .tv-metrics .card-icon img {
    width: 18px;
    height: 18px;
  }
  .tv-metrics .card-number { font-size: 1rem; }
  .tv-metrics .card-label { font-size: 0.65rem; margin-top: 0; }
  .section-title { font-size: 0.9rem; margin-bottom: 2px; }

  /* Awards - The main content (Silk/low-res TVs: TV-only) */
  .tv-page .awards {
    flex: 1; /* Take remaining space */
    min-height: 0; /* Allow shrinking */
    margin-top: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .tv-page .awards .container {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .tv-page .awards-carousel, .tv-page .awards-slider {
    min-height: 0;
    height: 100%;
    flex: 1;
  }
  .tv-page .award-slide img {
    max-height: 100%; /* Fill available space */
    height: auto;
    max-width: 90%;
    object-fit: contain;
  }
  .slider-pagination {
    bottom: 2px;
  }
  .slider-dot { width: 6px; height: 6px; }

  /* Contributors */
  .tv-contributors {
    flex: 0 0 auto;
    height: auto;
    padding: 0;
    margin-bottom: 1px;
  }
  .tv-contributors .contrib {
    min-width: 110px;
    padding: 2px 6px;
    gap: 6px;
    border-radius: 6px;
    margin-right: 8px;
  }
  .tv-contributors .contrib img {
    width: 22px;
    height: 22px;
  }
  .tv-contributors figcaption strong { font-size: 0.65rem; }
  .tv-contributors figcaption span { font-size: 0.55rem; }
}
