/* ============================
   PALETA CORPORATIVA
   ============================ */
:root {
  --green: #4CAF50;
  --green-dark: #3d8b41;
  --gray-dark: #333333;
  --gray: #666666;
  --gray-light: #f5f5f5;
  --white: #ffffff;
  --border: #e0e0e0;

  --radius: 12px;
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* ============================
   MODO OSCURO
   ============================ */
.dark {
  --gray-light: #121212;
  --white: #1e1e1e;
  --gray-dark: #e5e5e5;
  --gray: #bbbbbb;
  --border: #2a2a2a;
  --shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* ============================
   RESET
   ============================ */
body {
  margin: 0;
  background: var(--gray-light);
  color: var(--gray-dark);
  font-family: system-ui, sans-serif;
  transition: background 0.3s, color 0.3s;
}

/* ============================
   HEADER
   ============================ */
.header {
  background: var(--white);
  padding: 1rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-top {
  display: flex;
  justify-content: center;
  padding-bottom: 0.8rem;
}

.logo-centered {
  height: 110px;
  width: auto;
  object-fit: contain;
}

/* ============================
   MENÚ DESKTOP
   ============================ */
.nav-centered {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.6rem 0 0.8rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.nav-centered a {
  color: var(--gray-dark);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.2rem;
}

.nav-centered a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.25s ease;
}

.nav-centered a:hover::after {
  width: 100%;
}

.btn-nav {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ============================
   MENÚ HAMBURGUESA MOBILE
   ============================ */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 25px;
  z-index: 1001;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--gray-dark);
  border-radius: 3px;
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Overlay */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1000;
}

/* Menú mobile */
#mobileMenu {
  display: none;
  position: fixed;
  top: 0;
  right: -260px;
  width: 260px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  padding: 4rem 1.5rem;
  flex-direction: column;
  gap: 1.4rem;
  transition: right 0.3s ease;
  z-index: 1002;
}

#mobileMenu.open {
  right: 0;
}

/* ============================
   HERO
   ============================ */
.hero {
  max-width: 1100px;
  margin: auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  background: rgba(76,175,80,0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--green-dark);
}

.hero-title {
  font-size: 2.4rem;
  color: var(--gray-dark);
}

.hero-subtitle {
  color: var(--gray);
  margin-bottom: 1.2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.btn-primary {
  background: var(--green);
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--gray-dark);
}

.hero-image img {
  width: auto !important;
  max-width: 100%;
  max-height: 420px;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
}

/* ============================
   SECCIONES
   ============================ */
.section {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1.5rem;
}

.section-title {
  font-size: 1.8rem;
  color: var(--gray-dark);
}

.section-subtitle {
  color: var(--gray);
  margin-bottom: 1rem;
}

/* ============================
   SERVICIOS (INDEX)
   ============================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain;
  margin-bottom: 0.8rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ============================
   TESTIMONIOS
   ============================ */
.carousel-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  animation: slide 25s linear infinite;
}

@keyframes slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonial-card {
  min-width: 300px;
  background: var(--white);
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ============================
   CONTACTO
   ============================ */
.contact-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-card {
  flex: 1 1 320px;
  background: var(--white);
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-image {
  width: auto !important;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 1rem;
}

/* ============================
   ORGANISMOS (NO TOCAR)
   ============================ */

.org-group-title {
  margin-top: 2.5rem;
  font-size: 1.4rem;
  color: var(--green-dark);
  border-left: 4px solid var(--green);
  padding-left: 0.6rem;
}

.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.2rem;
}

.org-card {
  background: var(--white);
  padding: 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--gray-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 200px;
}

.org-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 0.8rem;
}

/* ============================
   FOOTER
   ============================ */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.footer-logo {
  height: 60px;
  margin-bottom: 0.8rem;
}

/* ============================
   MOBILE
   ============================ */
@media (max-width: 768px) {

  .hamburger {
    display: flex;
  }

  .nav-centered {
    display: none;
  }

  #mobileMenu {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image img {
    max-height: 260px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .org-grid {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 1.5rem 1rem;
  }
}
