/* CronoRace - Identidade Racing Azul & Lilás */

/* Variáveis */
:root{
  --bg: #0a0a0f;
  --surface: #111827;
  --muted: #9ca3af;
  --text: #f9fafb;
  --accent: #3b82f6;    /* azul racing */
  --accent-600: #6366f1;  /* lilás racing */
  --card-bg: #1f2937;
  --radius: 12px;
  --container-width: 1100px;
  --gap: 1rem;
  --shadow-sm: 0 6px 18px rgba(0,0,0,0.6);
}

/* Reset */
* {box-sizing: border-box;}
html,body {height:100%;}
body{
  margin:0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg,#0a0a0f 0%, #111827 100%);
  color:var(--text);
  line-height:1.5;
  -webkit-text-size-adjust:100%;
}

/* Container */
.container{
  width: calc(100% - 2rem);
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 2rem 0;
}

/* Header */
.site-header{
  position: sticky;
  top:0;
  z-index: 60;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(10,15,30,0.7), rgba(10,15,30,0.3));
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header__inner{
  display:flex;
  align-items:center;
  gap:1rem;
  justify-content:space-between;
}
.logo{
  font-weight:800;
  letter-spacing:0.4px;
  color:var(--accent);
  text-decoration:none;
  font-size:1.3rem;
  text-transform: uppercase;
}

/* Nav */
.nav{
  position: absolute;
  inset: 72px 1rem auto 1rem;
  background: #111827;
  border-radius: 12px;
  padding: 1rem;
  width: calc(100% - 2rem);
  max-width: 420px;
  box-shadow: var(--shadow-sm);
  transform-origin: top right;
  transition: transform .18s ease, opacity .18s ease;
  opacity:0;
  pointer-events:none;
}
.nav-toggle { position: absolute; left:-9999px; }
.nav-toggle-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:8px;
  cursor:pointer;
}
.nav-toggle-label span{
  display:block;
  width:22px;
  height:2px;
  background:var(--text);
  position:relative;
  border-radius:2px;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after{
  content:"";
  position:absolute;
  left:0;
  width:22px;
  height:2px;
  background:var(--text);
  border-radius:2px;
}
.nav-toggle-label span::before{ top:-7px; }
.nav-toggle-label span::after{ top:7px; }
.nav-toggle:checked + .nav-toggle-label + .nav{
  opacity:1; transform:scale(1); pointer-events:auto;
}
.nav__list{ list-style:none; margin:0; padding:0; display:grid; gap:.6rem; }
.nav__link{
  display:block; color:var(--text);
  text-decoration:none; padding:.6rem .8rem;
  border-radius:8px; font-weight:600;
}
.nav__link:hover{ background: rgba(59,130,246,0.15); }

/* Hero */
.hero{
  padding: 3.5rem 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-600) 100%);
  color:#fff;
}
.hero__inner{
  display:grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items:center;
}
.hero__title{
  font-family: 'Oswald', sans-serif;
  font-size:2rem;
  text-transform: uppercase;
  margin:0 0 .5rem 0;
}
.hero__subtitle{
  margin:0 0 1rem 0;
  color:#e0e7ff;
}
.btn{
  display:inline-block;
  text-decoration:none;
  padding:.65rem 1rem;
  border-radius:10px;
  font-weight:700;
  border:1px solid transparent;
}
.btn--primary{
  background: #fff;
  color: var(--accent-600);
}
.btn--ghost{
  background:transparent;
  color:white;
  border:1px solid rgba(255,255,255,0.5);
}

/* --- Estilos do Contador --- */
.countdown-card {
    background: var(--card-bg); 
    border-radius: var(--radius);
    padding: 1.5rem;
    color: var(--text);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, #1f2937 0%, #171f2e 100%); 
}

.countdown-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
}

.timer-icon {
    width: 28px;
    height: 28px;
    fill: var(--accent);
}

.countdown-body p {
    margin: 0.5rem 0;
}

.event-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    line-height: 1.2;
}

.event-date {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap; 
    margin-bottom: 1.5rem;
}

.countdown-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    display: block; 
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    display: block; 
    margin-right: 1rem; 
}

.countdown-label:last-child {
    margin-right: 0;
}

.countdown-status {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-600);
    margin-top: 1rem;
}
/* --- Fim Estilos do Contador --- */


/* Sections */
.section{ padding: 3rem 0; }
.section--light{ background: #0f172a; }
.section--dark{ background: #111827; }
.section__title{ font-size:1.4rem; margin:0 0 .25rem 0; text-transform: uppercase; }
.section__lead{ color:var(--muted); margin:0 0 1.25rem 0; }
.section__lead--small { font-size: 0.9rem; margin-top: 2rem; }
.section__title--center,
.section__lead--center {
    text-align: center;
} 


/* Grid */
.grid{ display:grid; gap:1rem; }
.grid--3up{ grid-template-columns: 1fr; }
@media(min-width:720px){
  .grid--3up{ grid-template-columns: repeat(3, 1fr); }
}

/* Card */
.card{
  background: var(--card-bg);
  padding:1.25rem;
  border-radius:12px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.card__title{ margin:0 0 .5rem 0; font-size:1.1rem; }
.card__text{ color:var(--muted); margin:0; }

/* Gallery */
.gallery{ display:grid; gap:1rem; grid-template-columns: 1fr; }
.gallery__item{
  overflow:hidden; border-radius:12px;
  background:var(--card-bg);
}
.gallery__item img{ width:100%; height:auto; display:block; }
.gallery__item figcaption{ padding:.6rem; font-size:.9rem; color:var(--muted); }


/* --- Resultados Oficiais --- */

.results-list {
  display: grid;
  gap: 1.2rem; 
  max-width: 900px; 
  margin: 0 auto 2rem auto;
}

.result-item {
  display: flex;
  flex-direction: column; 
  align-items: flex-start;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.result-info {
  flex-grow: 1; 
  margin-bottom: 0.75rem; 
}

.result-title {
  font-size: 1.15rem;
  margin: 0 0 0.25rem 0;
  color: var(--text);
}

.result-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Estilos para o status do resultado */
.result-status {
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-block;
  margin-left: 0.5rem;
}

.status-final {
  background: rgba(34, 197, 94, 0.15); /* Verde */
  color: #22c55e;
}

.status-provisional {
  background: rgba(251, 191, 36, 0.15); /* Amarelo */
  color: #fcae12;
}

/* Estilo para o botão PDF */
.btn--secondary {
  background: var(--accent-600); /* Lilás */
  color: #fff;
  font-weight: 700;
  padding: 0.5rem 1rem;
  align-self: flex-start; 
}

.btn--secondary:hover {
  background: var(--accent); /* Azul */
}

/* Layout para Ecrãs Maiores */
@media (min-width: 720px) {
  .result-item {
    flex-direction: row; 
    align-items: center;
    justify-content: space-between;
  }
  
  .result-info {
    margin-bottom: 0;
  }

  .btn--secondary {
    align-self: center; 
  }
}

/* --- Fim Resultados Oficiais --- */


/* --- Estilos para Patrocinadores --- */

.sponsor-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
  background-color: #fff;
  padding: 2rem 0;
}

.sponsor-track {
  display: flex;
  width: calc(200%); /* duplicado para o loop */
  animation: scroll 25s linear infinite; /* velocidade ajustável */
}

.sponsor-track img {
  height: 80px;
  margin: 0 3rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.sponsor-track img:hover {
  opacity: 1;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Responsivo */
@media (max-width: 600px) {
  .sponsor-track img {
    height: 50px;
    margin: 0 1.5rem;
  }
}

@media (min-width: 600px) {
    .sponsor-track img {
        grid-column: span 2; 
    }
}

/* --- Fim Estilos para Patrocinadores --- */


/* Contact */
.contact{ display:grid; gap:1rem; grid-template-columns: 1fr; }
.contact__card{
  background: var(--card-bg);
  padding:1.25rem;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.05);
}
.contact__info{ padding:1rem; color:var(--muted); }

/* Form */
.form__grid{ display:grid; gap:0.75rem; grid-template-columns:1fr; }
@media(min-width:720px){ .form__grid{ grid-template-columns: 1fr 1fr; } }
.form__field{ display:block; margin-bottom:.75rem; }
.form__label{ display:block; margin-bottom:.35rem; color:var(--muted); font-size:.9rem; }
input,textarea{
  width:100%; padding:.6rem; border-radius:8px;
  border:1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color:var(--text); resize:vertical;
}
.form__actions{ display:flex; gap:.5rem; margin-top:.5rem; }

/* Footer */
.site-footer{
  padding:1rem 0;
  border-top:1px solid rgba(255,255,255,0.05);
  color:var(--muted);
}
.footer__inner{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
}
.footer__links{ list-style:none; margin:0; padding:0; display:flex; gap:.75rem; }
.footer__links a{ color:var(--muted); text-decoration:none; font-size:.95rem; }

/* Larger layouts */
@media(min-width:900px){
  .hero__inner{ grid-template-columns: 1fr 480px; }
  .nav{ position:static; opacity:1; transform:none; pointer-events:auto;
    background:transparent; padding:0; width:auto; max-width:none; box-shadow:none; }
  .nav__list{ display:flex; gap:.5rem; align-items:center; }
  .nav-toggle-label{ display:none; }
  .gallery{ grid-template-columns: repeat(4, 1fr); }
  .contact{ grid-template-columns: 1fr 320px; }
}

/* Focus */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 3px solid rgba(99,102,241,0.6);
  outline-offset:3px;
}