:root {
  --verde-principal: #329540;
  --verde-oscuro: #164a49;
  --blanco: #fff;
  --negro: #000;
  --gris-claro: #f0f0f0;
  --gris-medio: #d3d3d3;
  --verde-claro: #90ee90;
  --sombra-caja: rgba(0, 0, 0, 0.15);
  --transparente-oscuro: rgba(0, 0, 0, 0.7);
  --gradiente-fondo: linear-gradient(
    135deg,
    #0d2614 0%,
    #1f4d2a 50%,
    #0d2614 100%
  );
  --gradiente-verde: linear-gradient(135deg, #2ecc71 0%, #145a32 100%);
}

* {
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  background: url("/sorteos-barrera/public/assets/image/LogoHD.png") center
    top/contain no-repeat fixed;
  background-color: #0d2614;
  color: var(--blanco);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #0d2614, #1f4d2a, #0d2614);
  opacity: 0.7;
  z-index: -1;
}

/* HEADER - PANTALLAS GRANDES */
header {
  background-color: var(--verde-oscuro);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-logo {
  text-align: center;
}

header img.logosorteo {
  height: 60px;
  transition: transform 0.3s ease;
}

header img.logosorteo:hover {
  transform: scale(1.05);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

header nav a {
  color: var(--blanco);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 10px 18px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

header nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--verde-claro);
  transition: width 0.3s ease;
}

header nav a:hover::before {
  width: 100%;
}

header nav a:hover {
  transform: translateY(-2px);
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header nav .nav-button {
  padding: 10px 20px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--verde-oscuro);
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  font-weight: 600;
}

header nav .nav-button:hover {
  color: var(--verde-principal);
  transform: translateY(-2px);
  background-color: var(--blanco);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--verde-claro);
}

header nav .nav-contact {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(to bottom, rgba(22, 74, 73, 0.7), transparent);
  color: var(--blanco);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  padding: 70px 20px 50px;
  margin-top: 0;
  border-radius: 0 0 30% 30% / 100px;
}

.hero h1 {
  font-size: 3.8rem;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(to right, var(--blanco), var(--verde-claro));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3s infinite;
  background-size: 200% 100%;
}

@keyframes textShimmer {
  0% {
    background-position: -100% center;
  }
  100% {
    background-position: 200% center;
  }
}

#countdown-message {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 500;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Manteniendo el countdown original tal como pediste */
.countdown {
  opacity: 1;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
}

.time-box {
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--blanco);
  padding: 25px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
  min-width: 130px;
  transition: all 0.4s ease;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.time-box:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
}

.time-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.time-value {
  font-size: 3.2rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
  margin-bottom: 8px;
  background: linear-gradient(to right, var(--blanco), var(--verde-claro));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.time-unit {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 500;
  letter-spacing: 1px;
}

.no-sorteo,
.finished-sorteo {
  background-color: var(--transparente-oscuro);
  color: var(--blanco);
  padding: 25px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.3rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

/* Manteniendo el botón original como pediste */
.btn {
  display: inline-block;
  padding: 18px 40px;
  background: var(--gradiente-verde);
  color: var(--blanco);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s ease;
  border: none;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.7s ease;
  z-index: -1;
}

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

.btn:hover::before {
  left: 100%;
}

.pulse-effect {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

/* About section improved */
.about {
  padding: 60px 40px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--verde-oscuro);
  margin: 70px auto;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  max-width: 900px;
  width: calc(100% - 60px);
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradiente-verde);
}

.about h2 {
  font-size: 2.8rem;
  margin-bottom: 25px;
  color: var(--verde-oscuro);
  position: relative;
  display: inline-block;
}

.about h2::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 25%;
  width: 50%;
  height: 3px;
  background: var(--gradiente-verde);
  border-radius: 3px;
}

.about p {
  font-size: 1.3rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}

/* Footer improved */
footer {
  background-color: var(--verde-oscuro);
  color: var(--blanco);
  padding: 10px 20px;
  text-align: center;
  margin-top: auto;
  position: relative;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradiente-verde);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.copyright {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--blanco);
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

footer a {
  color: var(--blanco);
  text-decoration: none;
  margin: 0 10px;
  position: relative;
  transition: all 0.3s ease;
  display: inline-block;
}

footer a:hover {
  color: var(--verde-claro);
  transform: translateY(-2px);
}

footer a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--verde-claro);
  transition: width 0.3s ease;
}

footer a:hover::after {
  width: 100%;
}

footer .contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 25px 0;
  font-size: 1.1em;
  gap: 40px;
}

footer .contact-info a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.1);
}

footer .contact-info a:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

footer .contact-info img {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  transition: transform 0.3s ease;
  filter: brightness(1.2);
}

footer .contact-info a:hover img {
  transform: rotate(5deg) scale(1.1);
}

/* MEDIA QUERIES - AJUSTADO PARA MÓVILES */
@media (max-width: 768px) {
  /* En pantallas de 768px o menos (móviles y tablets) */
  header {
    padding: 12px 15px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .header-left {
    grid-column: 1;
    justify-self: start;
  }

  .header-logo {
    grid-column: 2;
    justify-self: center;
  }

  .header-right {
    grid-column: 3;
    justify-self: end;
  }

  header img.logosorteo {
    height: 50px;
    margin: 0 auto;
  }

  .header-nav a {
    font-size: 0.9rem;
    padding: 8px 12px;
    margin: 0;
  }

  .nav-button,
  .nav-contact {
    white-space: nowrap;
  }

  .hero {
    padding: 40px 15px;
  }

  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
  }

  #countdown-message {
    font-size: 1.2rem;
  }

  .countdown {
    gap: 15px;
  }

  .time-box {
    padding: 15px 20px;
    min-width: 90px;
  }

  .time-value {
    font-size: 2.2rem;
  }

  .about {
    padding: 35px 25px;
    margin: 40px auto;
    width: calc(100% - 40px);
  }

  .about h2 {
    font-size: 2rem;
  }

  .about p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  /* Para móviles más pequeños */
  header {
    padding: 10px 8px;
  }

  header img.logosorteo {
    height: 40px;
  }

  .header-nav a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .hero {
    padding: 30px 10px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  #countdown-message {
    font-size: 1rem;
  }

  .countdown {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
  }

  .time-box {
    padding: 10px 15px;
    min-width: calc(50% - 15px);
    flex: 0 0 calc(50% - 15px);
  }

  .time-value {
    font-size: 1.8rem;
  }

  .time-unit {
    font-size: 0.9rem;
  }

  .btn {
    padding: 15px 30px;
    font-size: 1.2rem;
  }

  .about {
    padding: 25px 15px;
    margin: 30px 15px;
    border-radius: 15px;
  }

  .about h2 {
    font-size: 1.8rem;
  }

  .about p {
    font-size: 1rem;
  }

  footer {
    padding: 30px 10px;
  }

  footer .contact-info {
    flex-direction: column;
    gap: 15px;
  }

  footer .contact-info a {
    width: 100%;
    max-width: 250px;
    justify-content: center;
    padding: 8px 15px;
  }
}

