:root {
  --primary: #8BC34A;
  --primary-dark: #689F38;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

@font-face {
  font-family: Lobster;
  src: url(fonts/Lobster-Regular.ttf);
  font-display: swap;
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  color: white;
  position: relative;
}

/* Fondo fijo sin saltos (cross-browser) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://descubreplasencia.admproject.es/images/main_bg.webp') no-repeat center center;
  background-size: cover;
  z-index: -1;
}

header {
  padding: 20px;
}

header h1 {
  font-family: 'Lobster', cursive;
  font-size: 2.5rem;
  color: white;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

main {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 20px;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  width: 100%;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 6px solid #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--primary);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 50px rgba(0,0,0,0.6);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.card:hover img {
  filter: brightness(0.85);
  transform: scale(1.05);
}

.card h2 {
  padding: 15px;
  font-size: 1.5rem;
  text-align: center;
  transition: color 0.3s ease;
}

.card:hover h2 {
  color: var(--primary-dark);
}

/* ===== Footer ===== */
footer{
  border-top: 1px solid #e5e7eb;
  background: #0f1114;
  color: #d1d5db;
}

.footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.foot-left{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
}

.foot-left .heart{
  color: var(--primary);
}

.foot-right{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.foot-right a{
  color: #cbd5e1;
  text-decoration: none;
  font-size: .85rem;
}

.foot-right a:hover{
  color: #fff;
}

.social{
  display: flex;
  align-items: center;
  gap: 10px;
}

.social a{
  display: inline-flex;
  line-height: 0;
}

.social svg{
  width: 16px;
  height: 16px;
  opacity: .8;
  transition: opacity .2s ease;
  fill: currentColor !important;
}

.social svg:hover{
  opacity: 1;
}

/* Accesibilidad foco teclado */
footer a:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Tablet */
@media (max-width: 900px) {
  .card-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .card img {
    height: 160px;
  }

  .card h2 {
    font-size: 1.2rem;
  }
}

/* Móvil */
@media (max-width: 600px) {
  main {
    justify-content: center;
    align-items: center;
  }

  .card-container {
    grid-template-columns: 1fr;
    padding: 10px 60px 30px;
  }

  .card img {
    height: 180px;
  }

  /* Desactivar hover en móvil */
  .card:hover {
    transform: none;
    box-shadow: 0 10px 35px rgba(0,0,0,0.5);
  }

  .card:hover img {
    filter: none;
    transform: none;
  }

  .card:hover h2 {
    color: var(--primary);
  }

  /* Footer responsive */
  .footer-inner{
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
  .foot-right{
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Movil mini*/
@media (max-width: 400px) {
  .card-container {
    padding: 10px 30px 30px;
  }
}