/* Reset y variables */
:root {
  --primary-green: #1b7b3a;
  --primary-dark: #14592a;
  --primary-light: #8fd694;
  --dark-bg: #0b1720;
  --light-bg: #f5f8f4;
  --text-dark: #1f2933;
  --text-light: #6c757d;
  --white: #ffffff;
  --border-color: rgba(11, 23, 32, 0.1);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 1rem;
}

/* Override Bootstrap primary colors */
:root {
  --bs-primary: var(--primary-green);
  --bs-primary-rgb: 27, 123, 58;
  --bs-primary-dark: var(--primary-dark);
  --bs-success: #198754;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

/* Accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-green);
  color: white;
  padding: 8px;
  z-index: 9999;
  text-decoration: none;
}

.skip-to-content:focus {
  top: 0;
}

/* Navbar - ÚNICO */
#mainNavbar {
  background-color: var(--dark-bg) !important;
  padding: 1rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#mainNavbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand img {
  height: 45px;
  width: auto;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: var(--white) !important;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
}

.navbar-dark .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

.navbar-dark .navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

/* Buttons - ELIMINAR AZUL */
.btn-primary {
  background-color: var(--primary-green) !important;
  border-color: var(--primary-green) !important;
  color: white !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 123, 58, 0.3);
}

.btn-outline-light {
  color: white !important;
  border-color: white !important;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background-color: white !important;
  color: var(--primary-green) !important;
}

.btn-link {
  color: var(--primary-green) !important;
  text-decoration: none;
  font-weight: 500;
}

.btn-link:hover {
  color: var(--primary-dark) !important;
  text-decoration: underline;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(11, 23, 32, 0.85), rgba(11, 23, 32, 0.9)),
              url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  padding: 120px 0 80px;
  margin-top: 0;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-info {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 1;
  min-width: 250px;
}

.info-item i {
  color: var(--primary-light);
  font-size: 1.25rem;
  margin-top: 0.25rem;
}

.info-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

.info-item p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.hero-card {
  background: rgba(11, 23, 32, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(143, 214, 148, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-5px);
}

.hero-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.card-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-content li {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-content li i {
  color: var(--primary-light);
}

/* Section Commons */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 4px;
  background-color: var(--primary-green);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  max-width: 700px;
}

.lead {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

/* About Section */
.about-section {
  background-color: var(--light-bg);
}

.about-section .lead {
  color: var(--text-dark);
}

.stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 200px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-green);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Services Section */
.services-section {
  background-color: var(--white);
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  height: 100%;
  margin-bottom: 2rem;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-green);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(27, 123, 58, 0.1), rgba(143, 214, 148, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.service-card li {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.service-card li:before {
  content: "•";
  color: var(--primary-green);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Contact Section */
.contact-section {
  background-color: var(--light-bg);
}

.contact-info {
  margin: 2rem 0;
}

.info-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.info-box i {
  color: var(--primary-green);
  font-size: 1.25rem;
  margin-top: 0.25rem;
}

.info-box h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.info-box p {
  margin: 0;
  color: var(--text-light);
}

.info-box a {
  color: var(--primary-green);
  text-decoration: none;
}

.info-box a:hover {
  text-decoration: underline;
}

.why-choose {
  margin-top: 2rem;
}

.why-choose h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.why-choose ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.why-choose li {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.why-choose li i {
  color: var(--primary-green);
}

.contact-form-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.contact-form-wrapper h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.form-control,
.form-select {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(27, 123, 58, 0.1);
}

.form-check-input:checked {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 1rem;
  text-align: center;
}

.alert {
  border-radius: 0.75rem;
  margin-top: 1rem;
}

/* Footer */
.footer {
  background-color: var(--dark-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem;
}

.footer-logo img {
  margin-bottom: 1rem;
}

.footer-description {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-green);
  transform: translateY(-3px);
}

.footer h5 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-details li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.contact-details i {
  color: var(--primary-light);
  margin-top: 0.25rem;
}

.contact-details a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.contact-details a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 991.98px) {
  section {
    padding: 4rem 0;
  }
  
  .hero-section {
    padding: 100px 0 60px;
    text-align: center;
    background-attachment: scroll;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-info {
    justify-content: center;
  }
  
  .info-item {
    min-width: 100%;
  }
  
  .section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 767.98px) {
  .section-title {
    font-size: 1.75rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .stats {
    flex-direction: column;
  }
  
  .stat-item {
    width: 100%;
  }
  
  .contact-form-wrapper {
    padding: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .hero-info {
    flex-direction: column;
  }
  
  .info-item {
    width: 100%;
  }
  
  .navbar-brand img {
    height: 35px;
  }
}

/* Print styles */
@media print {
  .navbar,
  .btn,
  .hero-section,
  .social-links,
  .contact-form-wrapper {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* Corrección para botones de enlace en modales */
.service-card .btn-link {
  color: var(--primary-green) !important;
  text-decoration: none;
  font-weight: 500;
  padding: 0;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.service-card .btn-link:hover {
  color: var(--primary-dark) !important;
  text-decoration: underline;
  transform: translateX(5px);
}

/* Estilos para modales */
.modal-content {
  border-radius: var(--radius);
  border: none;
  overflow: hidden;
}

.modal-header.bg-primary {
  background-color: var(--primary-green) !important;
  color: white;
}

.modal-header .btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-body h4 {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}

.modal-body h6 {
  color: var(--primary-green);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.modal-body ul {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* Asegurar que los botones en modales no sean azules */
.modal-footer .btn-primary {
  background-color: var(--primary-green) !important;
  border-color: var(--primary-green) !important;
}

.modal-footer .btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

/* Cookie Banner Styles */
.cookie-banner {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}

.cookie-banner .modal-backdrop {
    z-index: 9998;
}

/* Print styles for policies */
@media print {
    .navbar,
    .footer,
    .cookie-banner,
    .btn {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .page-break {
        page-break-before: always;
    }
}