:root {
  /* Configuración Centralizada de Colores (Manual de Marca Jiyakishany) */
  --primary-color: #3E4C21;
  /* Verde Principal */
  --secondary-color: #460E3D;
  /* Púrpura Oscuro (Encabezados) */
  --accent-color: #B57732;
  /* Dorado / Tierra (Destacados y Slogan) */
  --background-color: #f9fafb;
  /* Fondo General */
  --text-color: #371E12;
  /* Marrón Oscuro para Texto */
  --light-text: #ffffff;
  /* Texto Claro */
  --header-bg: #ffffff;
  /* Fondo del Encabezado */
  --footer-bg: #323722;
  /* Verde Oscuro para el Pie de Página */
  --transition-speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
  /* Permite navegar suavemente al hacer clic en el menú */
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- Encabezado y Navegación --- */
header {
  background-color: var(--header-bg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  transition: all var(--transition-speed);
}

.logo-container img {
  height: 112px;
  max-width: 338px;
  object-fit: contain;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 800;
  font-size: 1rem;
  transition: color var(--transition-speed);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-speed);
}

nav a:hover {
  color: var(--primary-color);
}

nav a:hover::after {
  width: 100%;
}

.lang-switch {
  background-color: var(--primary-color);
  color: var(--light-text);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
  transition: all var(--transition-speed);
}

.lang-switch:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(30, 64, 175, 0.4);
}

/* --- Sección de Portada (Hero) --- */
.hero {
  height: 85vh;
  /* Fondo por si la imagen no carga de inmediato */
  background-color: var(--secondary-color);
  /* Mezcla un gradiente oscuro con la imagen de portada */
  background-image: linear-gradient(rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.7)), url('images/portada.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--light-text);
  text-align: center;
  padding: 0 5%;
}

.hero-logo {
  max-width: 100%;
  height: auto;
  max-height: 450px;
  margin-bottom: 2rem;
  object-fit: contain;
  animation: fadeInDown 1s ease-out;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.hero p {
  font-size: 1.25rem;
  font-weight: 200;
  max-width: 700px;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Secciones Generales --- */
section {
  padding: 6rem 5%;
}

h2 {
  text-align: center;
  margin-bottom: 3.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--secondary-color);
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* --- Cuadrículas (Servicios y Productos) --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-speed);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background-color: #e5e7eb;
  /* Color de fondo mientras carga */
  transition: transform 0.5s ease;
}

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

.card-content {
  padding: 1.8rem;
  text-align: center;
  background-color: white;
  position: relative;
  z-index: 2;
}

.card-content h3 {
  margin-bottom: 0.8rem;
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 800;
}

.card-content p {
  color: #4b5563;
  font-size: 0.95rem;
}

/* --- Sección de Contacto --- */
#contacto {
  background-color: white;
}

.contact-container {
  max-width: 650px;
  margin: 0 auto;
  background: var(--background-color);
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 800;
  color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
  background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button[type="submit"] {
  width: 100%;
  padding: 1.2rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

button[type="submit"]:hover {
  background-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(217, 119, 6, 0.4);
}

/* --- Pie de Página (Footer) --- */
footer {
  background-color: var(--footer-bg);
  color: var(--light-text);
  padding: 4rem 5% 1.5rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-info h4,
.footer-social h4 {
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-weight: 800;
  font-size: 1.2rem;
}

.footer-info p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d1d5db;
}

.footer-info i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.social-icons {
  display: flex;
  gap: 1.2rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  font-size: 1.2rem;
  border-radius: 50%;
  text-decoration: none;
  transition: all var(--transition-speed);
}

.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #9ca3af;
}

/* --- Sección Quiénes Somos --- */
.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
  background-color: white;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text h3 {
  color: var(--secondary-color);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #4b5563;
}

.about-image {
  flex: 1;
  min-width: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.slogan-text {
  font-size: 1.8rem !important;
  font-weight: 200;
  font-style: italic;
  color: var(--accent-color);
  margin-bottom: 1rem !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-menu {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 6px rgba(181, 119, 50, 0.3);
}

.btn-menu:hover {
  background-color: #925c21;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(181, 119, 50, 0.4);
  color: white;
}

/* --- Responsividad --- */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 5%;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .contact-container {
    padding: 2rem 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-info p {
    justify-content: center;
  }

  .social-icons {
    justify-content: center;
  }
}