* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f8f6fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  color: #333;
  line-height: 1.6;
}

#header {
  background-image: url("perro.jpg");
  background-size: cover;
  background-position: center;
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 30px;
  color: white;
}

#header::before {
  content: "";
  position: absolute;
  inset: 0;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px, 60px;
  position: relative;
  z-index: 1;
}

nav, .logo {
  position: relative;
  z-index: 2;
} 
.logo img {
  height: 100px;
  width: auto;
}

/* NAV */
.nav {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav li {
  position: relative;
}

.nav li a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  font-size: 18px;
  transition: 0.3s;
}

.nav li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 17px;
}

/* Submenú */
.nav li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(5, 5, 5, 0.651);
  border-radius: 6px;
  padding: 8px 0;
  min-width: 130px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 100;
}

.nav li:hover > ul {
  display: block;
}

.nav li ul li {
  display: block;
}

.nav li ul li a {
  color: #fff9f9;
  padding: 10px 20px;
  font-size: 16px;
  display: block;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.nav li ul li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fdfcfc;
  border-radius: 2px;
}

.main-title {
  text-align: center;
  font-size: 48px;
  color: #222;
  padding: 80px 20px 30px;
  justify-content: center;
}
.presentation {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* === BLOQUE DE TEXTO === */
.text-content {
  max-width: 600px;
  flex: 1;
}

.text-content h2 {
  font-size: 28px;
  color: #111;
  margin-bottom: 20px;
}

.text-content p {
  font-size: 17px;
  margin-bottom: 15px;
  line-height: 1.6;
}

@media screen and (max-width: 768px) {
  .presentation {
    flex-direction: column;
    align-items: center;
  }

  .text-content {
    text-align: center;
    padding: 0 10px;
  }
}


.cards-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  padding: 40px 20px;
}

.flip-card {
  background-color: transparent;
  width: 300px;
  height: 400px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.flip-card-back {
  background-color: #ffe4ec;
  color: #333;
  padding: 20px;
  transform: rotateY(180deg);
}

.flip-card-back p {
  text-align: justify;
  text-align-last: justify;
  hyphens: auto;
  margin: 0 10px; /* para que no quede pegado a los bordes */
  font-size: 0.95rem;
  line-height: 1.4;
}


.flip-card-back h3 {
  text-align: justify;
  text-align-last: justify;
}


/* FOOTER */
.pie-pagina {
  width: 100%;
  background-color: #f0d0e7;
  padding-top: 40px;
}

.pie-pagina .grupo-1 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

.pie-pagina .grupo-1 .box figure {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pie-pagina .grupo-1 .box figure img {
  width: 200px;
}

.pie-pagina .grupo-1 .box h2 {
  margin-bottom: 10px;
  font-size: 22px;
  color: #111;
}

.pie-pagina .grupo-1 .box p {
  margin-bottom: 12px;
  color: #333;
}

.red-social {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 10px;
  justify-content: flex-start;
}

.red-social img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.red-social a img:hover {
  transform: scale(1.1);
  filter: grayscale(0%);
}

.pie-pagina .grupo-2 {
  background-color: #222;
  text-align: center;
  padding: 10px;
  color: #fff;
}

.pie-pagina .grupo-2 small {
  font-size: 14px;
}

/* RESPONSIVO */
@media screen and (max-width: 768px) {
  .presentation {
    flex-direction: column;
    padding: 20px;
  }

  .cards-grid {
    flex-direction: column;
    align-items: center;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

.veterinarias-section {
  margin-top: 60px;
}

.veterinarias-section .section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

.veterinaria-card {
  background-color: #f9f9f9;
  padding: 25px;
  margin: 20px 0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.veterinaria-card h3 {
  color: #5a3e85;
  margin-bottom: 10px;
}

.veterinaria-card p {
  line-height: 1.6;
}

.mapa-vet {
  margin-top: 15px;
  border-radius: 10px;
  overflow: hidden;
}


.text-content {
  text-align: justify;
  text-align-last: justify;
}
