/* SaborCasa CL - Estilos principales */

/* Paleta de colores */
:root {
  --aji-rojo: #D84343;
  --maiz: #F2C94C;
  --humo: #2B2F36;
  --crema: #FFF5E6;
  --verde-huerto: #20C6B7;
  --blanco: #FFFFFF;
  --gris-claro: #F8F9FA;
  --gris-medio: #6C757D;
  --sombra: rgba(43, 47, 54, 0.1);
  --sombra-hover: rgba(43, 47, 54, 0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--humo);
  background-color: var(--crema);
  font-size: 16px;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3.1rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
}

/* Enlaces */
a {
  color: var(--aji-rojo);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--verde-huerto);
}

/* Botones */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--aji-rojo);
  color: var(--blanco);
}

.btn-primary:hover {
  background-color: #b83333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--sombra-hover);
}

.btn-secondary {
  background-color: var(--verde-huerto);
  color: var(--blanco);
}

.btn-secondary:hover {
  background-color: #1a9d9d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--sombra-hover);
}

/* Grid y contenedor */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

/* Header */
.header {
  background: var(--blanco);
  box-shadow: 0 2px 10px var(--sombra);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--aji-rojo);
}

.nav {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav a {
  color: var(--humo);
  font-weight: 500;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--aji-rojo);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--aji-rojo);
}

/* Menú móvil */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--humo);
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, var(--aji-rojo), var(--maiz));
  color: var(--blanco);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M30 30c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20zM50 30c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Buscador */
.search-section {
  background: var(--blanco);
  padding: 3rem 0;
}

.search-form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: var(--blanco);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--sombra);
  overflow: hidden;
}

.search-input {
  flex: 1;
  padding: 1rem;
  border: none;
  font-size: 1rem;
  outline: none;
}

.search-btn {
  background: var(--aji-rojo);
  color: var(--blanco);
  border: none;
  padding: 1rem 2rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: #b83333;
}

/* Secciones generales */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--humo);
}

/* Tarjetas */
.card {
  background: var(--blanco);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px var(--sombra);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--aji-rojo), var(--maiz), var(--verde-huerto));
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--sombra-hover);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--humo);
}

.card-text {
  color: var(--gris-medio);
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gris-claro);
  font-size: 0.9rem;
  color: var(--gris-medio);
}

/* Grid de recetas */
.recipes-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Grid de técnicas */
.techniques-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.technique-card {
  text-align: center;
  padding: 2rem 1rem;
}

.technique-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--maiz), var(--verde-huerto));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  font-size: 1.5rem;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--verde-huerto), var(--aji-rojo));
  color: var(--blanco);
  padding: 4rem 0;
  text-align: center;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 2rem auto 0;
  gap: 1rem;
}

.newsletter-input {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

/* Footer */
.footer {
  background: var(--humo);
  color: var(--blanco);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--maiz);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--blanco);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-section a:hover {
  opacity: 1;
  color: var(--maiz);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.7;
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--gris-claro);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.breadcrumbs-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumbs-list li:not(:last-child)::after {
  content: '>';
  margin-left: 0.5rem;
  color: var(--gris-medio);
}

/* Contenido de página */
.page-header {
  background: var(--blanco);
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 2rem;
}

.page-content {
  background: var(--blanco);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--sombra);
  margin-bottom: 2rem;
}

/* Iconos SVG */
.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--aji-rojo);
  color: var(--blanco);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #b83333;
  transform: translateY(-2px);
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive design */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blanco);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 20px var(--sombra);
  }
  
  .nav.active {
    display: flex;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .search-form,
  .newsletter-form {
    flex-direction: column;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .recipes-grid {
    grid-template-columns: 1fr;
  }
  
  .techniques-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .page-content {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .techniques-grid {
    grid-template-columns: 1fr;
  }
}

/* Utilidades */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* Animación de carga */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--gris-claro);
  border-radius: 50%;
  border-top-color: var(--aji-rojo);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Efectos especiales */
.steam-effect::before {
  content: '💨';
  position: absolute;
  top: -10px;
  right: 10px;
  font-size: 1.5rem;
  animation: steam 2s ease-in-out infinite;
}

@keyframes steam {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-10px) scale(1.1); opacity: 0.7; }
}

/* Mejoras de accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--verde-huerto);
  outline-offset: 2px;
}

/* Alto contraste */
@media (prefers-contrast: high) {
  :root {
    --sombra: rgba(0, 0, 0, 0.3);
    --sombra-hover: rgba(0, 0, 0, 0.4);
  }
}