:root {
--red: #b91c1c;
--red-strong: #7f1d1d;
--yellow: #facc15;
--black: #0f0f0f;
--dark: #1a1a1a;
--white: #ffffff;
--gray: #9ca3af;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: 'Inter', sans-serif;
  background: var(--black);
  color: var(--white);
}

/* HEADER */
header {
  background: rgba(185,28,28,0.98);
  backdrop-filter: blur(6px);
  position: fixed;
  width: 100%;
  top: 0;
  padding: 1rem 5%;
  z-index: 9999;
  border-bottom: 2px solid var(--yellow);
  transition: all 0.3s ease;
}

header.scrolled {
  background: #000;
  box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

/* NAV */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  color: #ffffff;
  text-shadow: 2px 2px 5px #facc15;
  font-weight: bold;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav ul li a {
  text-decoration: none;
  color: var(--white);
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--yellow);
}

/* HERO */
#hero {
  height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 70px;

  background: linear-gradient(rgba(127,29,29,0.7), rgba(0,0,0,0.8)),
  url('https://c.pxhere.com/photos/7d/3f/old_trafford_manchester_united_stadium_stadion_red_devils_sport_jogging_games-1376987.jpg!d');

  background-size: cover;
  background-position: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.8rem;
}

.highlight {
  color: var(--yellow);
}

.hero-content p {
  color: #f1f5f9;
  margin-top: 10px;
}

/* BOTÓN */
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background: var(--yellow);
  color: var(--black);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
}

.btn:hover {
  background: var(--red);
  color: white;
  transform: scale(1.05);
}

/* SECCIONES */
.container {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 20px;
}

h2 {
  margin-bottom: 20px;
  border-left: 5px solid var(--yellow);
  padding-left: 10px;
}

/* BLOG (Flexbox mejorado) */
.blog-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.post-card {
  flex: 1 1 280px;
  background: var(--dark);
  padding: 20px;
  border-radius: 10px;
  transition: 0.3s;
  border: 1px solid transparent;
}

.post-card:hover {
  transform: translateY(-8px);
  border: 1px solid var(--yellow);
}

.post-card h3 {
  color: var(--yellow);
}

.post-card p {
  color: var(--gray);
}

.post-card a {
  color: var(--red);
  text-decoration: none;
}

/* PROYECTOS (Flexbox mejorado) */
.proyectos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.proyecto-card {
  flex: 1 1 250px;
  background: var(--dark);
  color: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, border 0.3s;
  border: 1px solid transparent;
}

.proyecto-card:hover {
  transform: translateY(-5px);
  border: 1px solid var(--yellow);
}

.proyecto-card h3 {
  color: var(--yellow);
}

/* CONTACTO */
.contact-info {
  background: var(--dark);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--yellow);
}

/* BOTÓN FLOTANTE */
.floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--red);
  color: white;
  padding: 15px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 18px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.floating-btn:hover {
  background: var(--yellow);
  color: black;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--red-strong);
  color: var(--white);
}

/* TEXTO */
p {
  text-align: justify;
}

.titulo-amarillo {
  color: var(--yellow);
}

/* ANIMACIÓN */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* 📱 RESPONSIVE FINAL */
@media (max-width: 768px) {

  nav {
    flex-direction: column;
    align-items: center;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .blog-grid,
  .proyectos-grid {
    flex-direction: column;
  }

  .container {
    padding: 0 15px;
  }

  p {
    text-align: left;
  }
}

/* SCROLL SUAVE */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}