/*
Theme Name: INAFO SRL One Page
Theme URI: https://inafosrl.com.py
Author: INAFO SRL
Author URI: https://inafosrl.com.py
Description: Tema corporativo one-page para INNOVACIÓN AGROFORESTAL SRL con navegación por anclas.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inafo-srl
*/

/* Reset básico y tipografía */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background-color: #ffffff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Paleta de colores */
:root {
  --inafo-green: #4caf50; /* verde principal */
  --inafo-green-dark: #2e7d32;
  --inafo-ocre: #c88a3d;
  --inafo-ocre-dark: #9b6725;
  --inafo-bg-light: #f5f7f4;
  --inafo-text-main: #222222;
  --inafo-text-muted: #666666;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--inafo-green-dark);
}

.section h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--inafo-green-dark);
}

.section p {
  margin-bottom: 0.75rem;
  color: var(--inafo-text-main);
}

.btn-primary {
  display: inline-block;
  background-color: var(--inafo-ocre);
  color: #ffffff;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--inafo-ocre-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* Header y navegación */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background-color: var(--inafo-text-main);
  border-radius: 999px;
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background-color: var(--inafo-text-main);
  border-radius: 999px;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.logo a {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--inafo-green-dark);
  display: flex;
  align-items: center;
}

.logo .custom-logo-link {
  display: flex;
  align-items: center;
}

.logo .custom-logo {
  height: 60px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--inafo-text-main);
  padding: 0.4rem 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--inafo-green);
  transition: width 0.2s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* Dropdown en el menú principal */
.main-nav li {
  position: relative;
}

.has-submenu > a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.has-submenu .fa-caret-down {
  font-size: 0.65rem;
}

.submenu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background-color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 1200;
}

.submenu li a {
  display: block;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

.submenu li a:hover {
  background-color: var(--inafo-green);
  color: #ffffff;
}

.has-submenu:hover > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-social {
  display: flex;
  gap: 0.75rem;
}

.header-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background-color: rgba(13, 57, 28, 0.15);
  color: var(--inafo-green-dark);
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-social a:hover {
  background-color: var(--inafo-green);
  color: #ffffff;
  transform: translateY(-2px);
}

.site-main {
  padding-top: 70px; /* espacio para el header fijo */
}

/* Hero slider */
.hero-slider {
  position: relative;
  width: 100%;
  min-height: 80vh;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  margin-top: 1.5rem;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 4rem;
  color: #ffffff;
  text-align: center;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.06), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-slide.hero-slide--active {
  opacity: 1;
  transform: scale(1.0);
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 900; /* por debajo del header (1000) */
}

.hero-nav span {
  font-size: 1.4rem;
  line-height: 1;
}

.hero-nav--prev {
  left: 1.5rem;
}

.hero-nav--next {
  right: 1.5rem;
}

.hero-nav:hover {
  background-color: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.05);
}

@media (max-width: 768px) {
  .hero-nav {
    width: 34px;
    height: 34px;
  }
}

.hero-slide-1,
.hero-slide-2,
.hero-slide-3 {
  /* Los fondos ahora vienen del personalizador via inline style */
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)), none;
}

.hero-content {
  max-width: 700px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-slide--active .hero-content {
  animation: heroTextLoop 6s ease-in-out infinite;
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(2.1rem, 4vw, 2.7rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.hero-content ul {
  margin: 0 auto 1.5rem;
  max-width: 480px;
  text-align: left;
}

.hero-content li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
}

.hero-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--inafo-ocre);
}

@keyframes heroTextLoop {
  0% {
    opacity: 0;
    transform: translateY(25px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  70% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-15px);
  }
}

/* Sección Quiénes somos */
.section-about {
  background-color: #ffffff;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 0.75rem;
}

.about-media img {
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  object-fit: cover;
  width: 100%;
  max-height: 420px;
}

.section-about ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.section-about li {
  margin-bottom: 0.4rem;
}

/* Sección Servicios */
.section-services {
  background-color: var(--inafo-bg-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.service-item {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  border-top: 4px solid var(--inafo-green);
}

.service-item h3 {
  margin-top: 0;
}

.service-item p {
  font-size: 0.95rem;
  color: var(--inafo-text-muted);
}

.services-gallery {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.services-gallery-item img {
  border-radius: 0.75rem;
  object-fit: cover;
  width: 100%;
  height: 180px;
}

/* Banner ocre */
.section-banner {
  background-color: var(--inafo-ocre);
  color: #ffffff;
  text-align: center;
}

.section-banner p {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}

/* Sección Contacto */
.section-contact {
  background-color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: flex-start;
}

.contact-forms {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-form-block {
  background-color: #ffffff;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.08);
}

.contact-note {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--inafo-green-dark);
}

.contact-map-card {
  background-color: #ffffff;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.08);
}

/* Footer invertido */
.site-footer {
  background-color: #111111;
  color: #f0f0f0;
  padding-top: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 2fr 2fr 2fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-logo span {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
}

.footer-services h4,
.footer-contact h4 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-services li {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: #cccccc;
}

.footer-contact p {
  font-size: 0.9rem;
  color: #cccccc;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social-list {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
  background-color: #ffffff;
  color: var(--inafo-green);
  transform: translateY(-2px);
}

.footer-logo .custom-logo {
  height: 60px;
  width: auto;
}

.footer-bottom {
  border-top: 1px solid #262626;
  padding: 1rem 0 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #bbbbbb;
}

.footer-bottom p:first-child {
  margin-bottom: 0.4rem;
}

/* Utilidades */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

/* Botón back to top */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1200;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background-color: var(--inafo-green);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}

.back-to-top i {
  font-size: 1.1rem;
}

.back-to-top:hover {
  background-color: var(--inafo-green-dark);
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    width: 100%;
    display: none;
  }

  .main-nav.main-nav--open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    background-color: #ffffff;
    border-radius: 0 0 1rem 1rem;
    padding: 0.5rem 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 0.6rem 0.5rem 0.6rem 0;
  }

  .submenu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
  }

  .has-submenu:hover > .submenu {
    transform: none;
  }

  .site-main {
    padding-top: 90px;
  }

  .hero-slide {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-media img {
    max-height: 260px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-inner {
    align-items: flex-start;
  }

  .header-social {
    margin-left: auto;
  }

  .section {
    padding: 3rem 0;
  }

  .services-gallery {
    grid-template-columns: 1fr;
  }

  .services-gallery-item img {
    height: 160px;
  }
}
