/*
Theme Name: Casa Rural Valle del Cabriel
Version: 3.5
*/

/* ==========================================================================
   1. ESTRUCTURA BASE
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #2f2f2f;
  background: #f6f3ee;
  padding-top: 80px;
  font-family: "Inter", sans-serif;
}

#page-container {
  flex: 1 0 auto;
  background: #f6f3ee;
  display: flex;
  flex-direction: column;
}

.entry-content, .post-content {
  padding: 100px 15%;
  background: #f6f3ee;
  min-height: 400px;
}

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

h1, h2, h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
}

/* ==========================================================================
   SEGURIDAD VISUAL Y ACCESIBILIDAD
   ========================================================================== */

/* Foco visible — obligatorio para navegación por teclado y accesibilidad */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #3f5f4a;
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Evita selección accidental de texto en elementos de interfaz */
.header,
.menu-toggle,
.btn,
.footer {
  -webkit-user-select: none;
  user-select: none;
}

/* ==========================================================================
   2. HEADER Y NAVEGACIÓN
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
}

.header nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.header nav ul li a {
  text-decoration: none;
  color: #2f2f2f;
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

.header nav ul li a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 3px;
  background: #3f5f4a;
  transition: width 0.3s ease;
}

.header nav ul li a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.menu-toggle .bar {
  width: 28px; height: 3px;
  background-color: #2f2f2f;
  transition: 0.3s;
  border-radius: 2px;
}

/* ==========================================================================
   3. HERO
   ========================================================================== */
.hero {
  min-height: calc(100vh - 80px);
  background-size: cover !important;
  background-position: center !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none; /* El overlay no bloquea clics en el botón */
}

.hero-content {
  position: relative;
  max-width: 700px;
  padding: 70px 50px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  text-align: center;
  z-index: 2;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.05;
  margin-bottom: 20px;
  font-family: "Playfair Display", serif;
}

/* Botón hero — href apunta a /precios-y-ofertas/#reservas */
:where(.btn) {
  display: inline-block;
  margin-top: 10px;
  padding: 15px 42px;
  background: #3f5f4a;
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.btn:hover { background: #2f4839; transform: translateY(-2px); }

/* ==========================================================================
   4. SECCIONES Y CONTENIDOS
   ========================================================================== */
.section { padding: 80px 10%; text-align: center; background: #f6f3ee; }
.section-alt { background: #eee9df; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
  margin-top: 40px;
}

.casa-card {
  display: flex;
  gap: 40px;
  margin-bottom: 70px;
  align-items: center;
}

.casa-card img { width: 45%; border-radius: 8px; object-fit: cover; aspect-ratio: 3/2; }
.casa-info { width: 55%; text-align: left; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 4px;
}

/* ==========================================================================
   5. FORMULARIO DE CONTACTO
   ========================================================================== */
.contact {
  background: #2f4839;
  color: #fff;
  padding: 100px 10%;
  text-align: center;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  color: #2f2f2f;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
}

.contact input:focus,
.contact textarea:focus {
  outline: 2px solid #a8c5aa;
  outline-offset: 2px;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer {
  flex-shrink: 0;
  background: #1f1f1f;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  width: 100%;
}

/* ==========================================================================
   7. RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .header { padding: 0 20px; }

  .header .logo, .header .logo a {
    display: block !important;
    max-width: 155px !important;
    line-height: 1.1 !important;
    font-size: 1.05rem !important;
    text-align: left !important;
    font-family: "Playfair Display", serif;
    font-weight: 700;
  }

  .menu-toggle { display: flex !important; }

  .header .main-navigation {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #eee9df !important;
    padding: 30px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    z-index: 999;
  }

  .header .main-navigation.toggled {
    display: block !important;
    animation: slideDown 0.3s ease-out;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    list-style: none;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem !important;
    line-height: 1.1 !important;
    max-width: 250px !important;
    margin: 0 auto !important;
    text-align: center;
  }

  .hero-content { width: 90%; padding: 40px 20px; }
}
