:root {
  --primary-color: #2c5530;
  --secondary-color: #4a7c59;
  --accent-color: #8bc34a;
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #f8f9fa;
}

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

body {
  margin-top: 80px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Header Styles */
.navbar {
  background: rgba(44, 85, 48, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: var(--primary-color);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: white !important;
}

.navbar-nav .nav-link {
  color: white !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
  background: url("../img/background.png");
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #e8f5e8;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.btn-primary-custom {
  background: var(--accent-color);
  border: none;
  padding: 1rem 2.5rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary-custom:hover {
  background: #7cb342;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 195, 74, 0.3);
}

/* Services Grid */
.service-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid #e9ecef;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

.service-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* About Section */
.about-section {
  background: var(--bg-light);
  padding: 5rem 0;
}

.profile-image {
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* Team Section */
.team-section {
  padding: 5rem 0;
}

.team-highlight {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 3rem;
}

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

.footer h5 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-color);
}

/* Responsive */
/* Ajustes para mobile */
@media (max-width: 310px) {
  .hero-title {
    font-size: 1.6rem;
    line-height: 1.3;
    text-align: center;
    padding: 0 0.5rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
    margin: 0 auto 1.2rem;
    max-width: 95%;
  }
  .btn-primary-custom {
    display: block;
    width: 85%;
    margin: 0 auto;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
  .hero-section .container {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }
}

/* Animation Classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* === WhatsApp Floating Chat - CORREGIDO === */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 15px; /* Reducido de 20px a 15px */
  background: #25d366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 5000;
  /* Asegurar que no se salga del viewport */
  max-width: calc(100vw - 30px);
}

.whatsapp-box {
  position: fixed;
  bottom: 85px;
  right: 15px; /* Ajustado para alinear con el botón */
  width: 300px;
  max-width: calc(100vw - 30px); /* Asegurar que no se salga del viewport */
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  z-index: 5000;
}

/* Ajustes específicos para pantallas muy pequeñas */
@media (max-width: 350px) {
  .whatsapp-button {
    right: 10px;
    width: 55px;
    height: 55px;
    font-size: 24px;
  }

  .whatsapp-box {
    right: 10px;
    width: 280px;
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 320px) {
  .whatsapp-button {
    right: 8px;
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .whatsapp-box {
    right: 8px;
    width: 260px;
    max-width: calc(100vw - 16px);
  }
}

.whatsapp-header {
  background: #25d366;
  color: white;
  padding: 10px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

.whatsapp-header #close-chat {
  cursor: pointer;
  font-size: 18px;
}

.whatsapp-body {
  padding: 15px;
  font-size: 14px;
  color: #333;
}

.whatsapp-body .btn {
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
}
