/*
  Estilos para el sitio "Vivir sin Azúcar"
  Paleta inspirada en tonos mediterráneos: tierra, verde oliva y naranja.
*/

/* Variables CSS */
:root {
  --primary-color: #b46a35; /* terracota / naranja suave */
  --secondary-color: #5a7d34; /* verde oliva */
  --accent-color: #d99f2a; /* amarillo dorado */
  --light-bg: #f7f0e9; /* beige claro */
  --dark-text: #333328; /* marrón grisáceo */
  --muted-text: #6f6f66; /* gris oliva */
  --border-radius: 8px;
  --transition-speed: 0.3s;
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Lora', serif;
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--dark-text);
  background: var(--light-bg);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}
a:hover {
  color: var(--secondary-color);
}

h1, h2, h3 {
  font-family: var(--font-secondary);
  color: var(--dark-text);
  margin-bottom: 0.5em;
}

/* Contenedor genérico */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Encabezado */
.header {
  background: var(--light-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}
.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
}
.nav {
  display: flex;
  gap: 1rem;
}
.nav a {
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* Hero */
.hero {
  position: relative;
  height: 70vh;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}
.hero__content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.hero__title {
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
}
.hero__subtitle {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  max-width: 600px;
}
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition-speed);
}
.btn:hover {
  background: var(--secondary-color);
}

/* Secciones generales */
.section {
  padding: 4rem 0;
}
.section__title {
  font-size: 1.8rem;
  position: relative;
  margin-bottom: 2rem;
  display: inline-block;
}
.section__title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-color);
  margin-top: 0.4rem;
}

/* Sobre mí */
.sobre-mi__wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sobre-mi__text p {
  max-width: 700px;
}

/* Facts */
.facts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.fact-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.fact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.fact-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.8rem;
  color: var(--secondary-color);
}
.fact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.fact-card p {
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Tips */
.tips__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 800px;
  margin: 0 auto;
}
.tips__list li {
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--muted-text);
}
.tips__list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--secondary-color);
  font-size: 1rem;
  line-height: 1.2;
}

/* Stats */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.stat-item {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.stat-item h3 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 0.4rem;
}
.stat-item p {
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Recipes */
.recipes__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}
.recipes__image {
  flex: 1 1 350px;
}
.recipes__image img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.recipes__content {
  flex: 1 1 350px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.recipe-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}
.recipe-item p {
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Stories */
.stories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.story-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}
.story-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--primary-color);
}
.story-card p {
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Contacto */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
  padding: 0.6rem;
  border: 1px solid #dcdcdc;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-family: var(--font-primary);
}
.form-group textarea {
  resize: vertical;
}
.form-group--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.form-group--checkbox label {
  font-size: 0.9rem;
  cursor: pointer;
}
.contact-form button {
  align-self: start;
}

/* Footer */
.footer {
  background: var(--light-bg);
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted-text);
  border-top: 1px solid #e5ddd0;
}

/* Responsive navigation */
@media (max-width: 768px) {
  .nav {
    display: none;
    flex-direction: column;
    background: var(--light-bg);
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  .nav a {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e5ddd0;
  }
  .nav-toggle {
    display: block;
  }
  .nav.open {
    display: flex;
  }
  .hero {
    height: 60vh;
  }
  .hero__title {
    font-size: 1.8rem;
  }
  .hero__subtitle {
    font-size: 1rem;
  }
  .facts__grid {
    grid-template-columns: 1fr;
  }
  .stories__grid {
    grid-template-columns: 1fr;
  }
  .recipes__grid {
    flex-direction: column;
  }
  .recipes__image,
  .recipes__content {
    flex: 1 1 100%;
  }
}