:root {
  --primary: #c51d1d;
  --primary-dark: #8b0000;
  --secondary: #1a1a1a;
  --accent: #fcd34d;
  --bg-dark: #0f172a;
  --bg-light: #f8fafc;
  --glass: rgba(255, 255, 255, 0.8);
  --glass-dark: rgba(15, 23, 42, 0.7);
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  background: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
}

/* HEADER */
header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 8%;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

header .logo {
  height: 60px;
  transition: transform 0.3s ease;
}

header .logo:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.025em;
  transition: var(--transition);
  position: relative;
}

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

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

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

/* HERO */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)), url("assets/portada.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 40px;
  animation: fadeInDown 1s ease-out;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 500;
  margin-bottom: 48px;
  opacity: 0.9;
  letter-spacing: 0.01em;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition);
  box-shadow: 0 10px 20px rgba(185, 28, 28, 0.3);
  border: 2px solid transparent;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(185, 28, 28, 0.4);
}

/* SECTIONS */
section {
  padding: 100px 8%;
  text-align: center;
}

section h2 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 60px;
  color: var(--secondary);
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background: var(--primary);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nosotros {
  background-color: var(--white);
}

.about {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
  text-align: left;
}

.about img.jh-img {
  width: 400px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.about img.jh-img:hover {
  transform: scale(1.02);
}

.about-text {
  flex: 1;
  padding: 20px;
}

.about-text p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ==== Misión y Visión ==== */
.misionvision {
  background: radial-gradient(circle at top right, rgba(197, 29, 29, 0.05), transparent),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text-main);
  position: relative;
}

.misionvision h2 {
  color: var(--secondary);
}

.mv-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.mv-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  padding: 48px;
  text-align: left;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.mv-card:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(197, 29, 29, 0.1);
}

.mv-card .icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mv-card h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--secondary);
}

.mv-card p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* PRODUCTOS */
.products {
  background: var(--bg-light);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  background-color: transparent;
  width: 100%;
  height: 350px;
  perspective: 1000px;
  cursor: pointer;
}

.product-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover .product-card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-card-front,
.product-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--white);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.product-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  color: var(--text-main);
  border: 1px solid var(--primary);
  padding: 20px;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  transition: transform 0.6s ease;
}

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

.product-card h3 {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}

.product-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  transition: var(--transition);
  border: 1px solid transparent;
}

/* CONTACTO */
.contact {
  background: radial-gradient(circle at bottom left, rgba(197, 29, 29, 0.03), transparent),
    var(--white);
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  text-align: left;
}

.contact-card.glass {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item i {
  font-size: 1.8rem;
  color: var(--primary);
  background: rgba(197, 29, 29, 0.05);
  padding: 15px;
  border-radius: 14px;
}

.contact-item h3 {
  font-size: 1.2rem;
  margin: 0 0 8px 0;
  color: var(--secondary);
}

.contact-item p {
  margin: 0;
  font-size: 1.05rem;
}

.contact-item a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 30px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.contact-btn.whatsapp {
  background: rgba(37, 211, 102, 0.05);
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.1);
}

.contact-btn.email {
  background: rgba(234, 67, 53, 0.05);
  color: #EA4335;
  border-color: rgba(234, 67, 53, 0.1);
}

.contact-btn:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.contact-btn.whatsapp:hover {
  background: #25D366;
  color: white;
}

.contact-btn.email:hover {
  background: #EA4335;
  color: white;
}

/* FOOTER */
footer {
  background: var(--secondary);
  color: var(--white);
  padding: 60px 8%;
  text-align: center;
}

footer p {
  opacity: 0.7;
  font-size: 0.95rem;
}

/* ANIMATIONS */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

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

.reveal {
  position: relative;
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.8s ease-out;
}

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

/* RESPONSIVE */
@media (max-width: 992px) {
  .about {
    flex-direction: column;
    text-align: center;
  }

  .about img.jh-img {
    width: 100%;
    max-width: 500px;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 20px;
    gap: 15px;
  }

  nav {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  section {
    padding: 60px 5%;
  }

  section h2 {
    font-size: 2.2rem;
  }

  .mv-card {
    padding: 30px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}