/* ==========================================================================
   SISTEMA DE DISEÑO - CMA AGRONEGOCIOS
   ========================================================================== */

:root {
  /* Paleta de Colores Principal */
  --primary-navy: #061C35;
  --primary-navy-light: #0b2e55;
  --primary-navy-hover: #030e1c;
  --secondary-blue: #0F4C81;
  --secondary-blue-hover: #0a355a;
  --accent-green: #25D366;
  --accent-green-hover: #20ba59;
  
  /* Colores Neutros */
  --bg-white: #ffffff;
  --bg-light: #F4F7FA;
  --bg-light-blue: #edf3f8;
  --text-dark: #1F2A37;
  --text-muted: #64748B;
  --border-light: #E2E8F0;
  
  /* Fuentes */
  --font-titles: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Sombras (Box Shadows) */
  --shadow-sm: 0 2px 4px rgba(6, 28, 53, 0.05);
  --shadow-md: 0 10px 20px rgba(6, 28, 53, 0.08);
  --shadow-lg: 0 20px 40px rgba(6, 28, 53, 0.12);
  --shadow-premium: 0 30px 60px rgba(6, 28, 53, 0.18);
  
  /* Transiciones */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease-in-out;
  
  /* Bordes Redondeados */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* ==========================================================================
   RESET & ESTILOS GLOBALES
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset para el header fijo */
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   COMPONENTES BASE / CLASES DE UTILIDAD
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section {
  padding: 80px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 100px 0;
  }
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-titles);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary-blue);
  margin-bottom: 12px;
}

.section-eyebrow.text-left {
  text-align: left;
}

.section-title {
  font-family: var(--font-titles);
  font-size: clamp(28px, 4.5vw, 42px);
  color: var(--primary-navy);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 18px;
}

.section-title.text-left {
  text-align: left;
}

.section-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-titles);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.btn:active {
  transform: translateY(1px);
}

.btn-nav-cta {
  background-color: var(--secondary-blue);
  color: var(--bg-white);
  padding: 8px 18px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 10px rgba(15, 76, 129, 0.2);
}

.btn-nav-cta:hover {
  background-color: var(--secondary-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 76, 129, 0.3);
}

.btn-whatsapp-hero {
  background-color: var(--accent-green);
  color: var(--bg-white);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
  gap: 8px;
}

.btn-whatsapp-hero:hover {
  background-color: var(--accent-green-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.35);
}

.btn-outline-hero {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--bg-white);
}

.btn-outline-hero:hover {
  background-color: var(--bg-white);
  color: var(--primary-navy);
  border-color: var(--bg-white);
  transform: translateY(-3px);
}

.btn-whatsapp-large {
  background-color: var(--accent-green);
  color: var(--bg-white);
  padding: 18px 36px;
  font-size: 17px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.25);
  gap: 10px;
}

.btn-whatsapp-large:hover {
  background-color: var(--accent-green-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   HEADER / NAVEGACIÓN FIXED
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(6, 28, 53, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-smooth);
}

.header.scrolled {
  background-color: rgba(6, 28, 53, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: var(--transition-fast);
}

.header.scrolled .nav-container {
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--bg-white);
}

.logo {
  height: 48px;
  width: auto;
  transition: var(--transition-smooth);
}

.header.scrolled .logo {
  height: 42px;
}

.brand-text {
  font-family: var(--font-titles);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-sub {
  color: #7db3e4;
  font-weight: 400;
}

/* Menú de Navegación */
.menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.menu-link {
  font-family: var(--font-titles);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-blue);
  transition: var(--transition-fast);
}

.menu-link:hover {
  color: var(--bg-white);
}

.menu-link:hover::after {
  width: 100%;
}

/* Hamburguesa móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: var(--bg-white);
  border-radius: 4px;
  transition: var(--transition-smooth);
}

/* Responsividad Header */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }
  
  .menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--primary-navy);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    justify-content: center;
    padding: 80px 40px;
    gap: 32px;
    transition: var(--transition-smooth);
    z-index: 105;
  }
  
  .menu.active {
    right: 0;
  }
  
  .menu-link {
    font-size: 20px;
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }
  
  .btn-nav-cta {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
  }
  
  /* Animación del menú hamburguesa */
  .menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ==========================================================================
   SECCIÓN HERO PRINCIPAL
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 80px; /* Evitar que el header cubra el hero */
  display: flex;
  align-items: center;
  background-image: url('img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--bg-white);
  overflow: hidden;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(6, 28, 53, 0.96) 30%, rgba(6, 28, 53, 0.5) 100%);
  z-index: 1;
}

.hero-container-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-content {
  max-width: 820px;
  padding: 60px 0;
}

.hero-badge {
  display: inline-block;
  background-color: rgba(15, 76, 129, 0.3);
  color: #7db3e4;
  border: 1px solid rgba(15, 76, 129, 0.5);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-titles);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-titles);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-text {
  font-size: clamp(16px, 2.5vw, 19px);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  max-width: 700px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 576px) {
  .hero-actions .btn {
    width: 100%;
  }
}

.icon-whatsapp {
  margin-right: 4px;
}

/* ==========================================================================
   SECCIÓN SERVICIOS
   ========================================================================== */

.services-section {
  background-color: var(--bg-light);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

/* Grid responsivo: Mobile first */
@media (min-width: 576px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(15, 76, 129, 0.2);
}

.service-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.service-card:hover .service-image {
  transform: scale(1.06);
}

.service-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card-title {
  font-family: var(--font-titles);
  font-size: 20px;
  color: var(--primary-navy);
  margin-bottom: 12px;
  font-weight: 700;
}

.service-card-description {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card-link {
  font-family: var(--font-titles);
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--transition-fast);
}

.service-card-link:hover {
  color: var(--primary-navy);
  transform: translateX(4px);
}

/* ==========================================================================
   SECCIÓN "POR QUÉ CMA"
   ========================================================================== */

.why-cma-section {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

.why-cma-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
}

@media (min-width: 992px) {
  .why-cma-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
  }
}

.why-cma-lead-text {
  font-size: 17px;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 30px;
}

.why-cma-image-decor {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
}

.why-cma-decor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-cma-benefits {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.benefit-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-md);
  background-color: var(--bg-light);
  border: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.benefit-item:hover {
  background-color: var(--bg-light-blue);
  transform: translateX(6px);
  border-color: rgba(15, 76, 129, 0.15);
}

.benefit-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-navy);
  color: var(--bg-white);
  flex-shrink: 0;
}

.benefit-item:hover .benefit-icon-wrapper {
  background-color: var(--secondary-blue);
}

.benefit-icon {
  width: 24px;
  height: 24px;
}

.benefit-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.benefit-title {
  font-family: var(--font-titles);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-navy);
}

.benefit-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   SECCIÓN PROYECTOS (PORTAFOLIO)
   ========================================================================== */

.projects-section {
  background-color: var(--bg-light);
}

/* Barra de Filtros */
.projects-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  font-family: var(--font-titles);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--secondary-blue);
  color: var(--secondary-blue);
}

.filter-btn.active {
  background-color: var(--secondary-blue);
  color: var(--bg-white);
  border-color: var(--secondary-blue);
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.2);
}

/* Rejilla de la Galería */
.projects-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 576px) {
  .projects-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .projects-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  background-color: var(--primary-navy);
  transition: var(--transition-smooth);
}

.gallery-item:focus {
  outline: 3px solid var(--secondary-blue);
  outline-offset: 3px;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  display: block;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08) rotate(0.5deg);
  opacity: 0.4;
}

.gallery-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  background: linear-gradient(to top, rgba(6, 28, 53, 0.9) 0%, rgba(6, 28, 53, 0.4) 60%, rgba(6, 28, 53, 0) 100%);
  color: var(--bg-white);
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.gallery-item:hover .gallery-info-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item-category {
  font-family: var(--font-titles);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #7db3e4;
  margin-bottom: 6px;
}

.gallery-item-title {
  font-family: var(--font-titles);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

/* Ocultar elementos filtrados */
.gallery-item.hide {
  display: none;
}

/* ==========================================================================
   SECCIÓN NOSOTROS
   ========================================================================== */

.about-section {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
}

@media (min-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
  }
}

.about-images {
  position: relative;
  padding: 20px;
}

.about-img-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  aspect-ratio: 4/3;
  width: 100%;
}

.about-img-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-stats-card {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--primary-navy);
  color: var(--bg-white);
  padding: 24px 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translate(-10px, 10px);
}

.stats-number {
  font-family: var(--font-titles);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: #7db3e4;
}

.stats-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.about-content {
  display: flex;
  flex-direction: column;
}

.about-paragraph {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.about-features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.about-feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.feature-bullet {
  color: var(--accent-green);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
}

.about-feature-item div {
  font-size: 14.5px;
  color: var(--text-dark);
}

.about-feature-item strong {
  color: var(--primary-navy);
}

/* ==========================================================================
   SECCIÓN CONTACTO (CTA BANNER)
   ========================================================================== */

.contact-section {
  background-color: var(--primary-navy);
  color: var(--bg-white);
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-light) 100%);
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(15, 76, 129, 0.3) 0%, rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}

.contact-container-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.contact-eyebrow {
  display: block;
  font-family: var(--font-titles);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #7db3e4;
  margin-bottom: 16px;
}

.contact-title {
  font-family: var(--font-titles);
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
}

.contact-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  line-height: 1.7;
}

.contact-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.icon-whatsapp-large {
  flex-shrink: 0;
}

.contact-phone-hint {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.contact-phone-hint strong {
  color: var(--bg-white);
}

/* ==========================================================================
   FOOTER (PIE DE PÁGINA)
   ========================================================================== */

.footer {
  background-color: #030e1c;
  color: var(--bg-white);
  padding: 70px 0 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

@media (min-width: 768px) {
  .footer-grid-inner {
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 60px;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  max-width: 320px;
}

.footer-title {
  font-family: var(--font-titles);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  color: #7db3e4;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
  align-self: flex-start;
}

.footer-nav a:hover {
  color: var(--bg-white);
  transform: translateX(4px);
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-detail-item {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.contact-detail-item strong {
  color: var(--bg-white);
}

.footer-link-plain {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link-plain:hover {
  color: #7db3e4;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 0;
  background-color: #020a14;
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.copyright {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.developer-tag {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP (CON TOOLTIP)
   ========================================================================== */

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background-color: var(--accent-green);
  color: var(--bg-white);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 99;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background-color: var(--accent-green);
  opacity: 0.4;
  z-index: -1;
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.whatsapp-float:hover {
  transform: translateY(-5px) scale(1.05);
  background-color: var(--accent-green-hover);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

.icon-whatsapp-float {
  display: block;
}

/* Tooltip flotante */
.whatsapp-tooltip {
  position: absolute;
  right: 74px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background-color: var(--primary-navy);
  color: var(--bg-white);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-smooth);
  pointer-events: none;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background-color: var(--primary-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Ocultar tooltip en móviles muy pequeños */
@media (max-width: 576px) {
  .whatsapp-tooltip {
    display: none;
  }
  
  .whatsapp-float {
    width: 54px;
    height: 54px;
    right: 16px;
    bottom: 16px;
  }
}

/* ==========================================================================
   LIGHTBOX DE LA GALERÍA DE PROYECTOS
   ========================================================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(6, 28, 53, 0.98);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightbox-scale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightbox-scale {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-caption {
  color: var(--bg-white);
  margin-top: 15px;
  font-family: var(--font-titles);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

/* Botones de Control */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: transparent;
  border: none;
  color: var(--bg-white);
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 30px;
  right: 30px;
  font-size: 40px;
  line-height: 1;
  width: 44px;
  height: 44px;
}

.lightbox-close:hover {
  transform: rotate(90deg);
  color: #7db3e4;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  width: 60px;
  height: 60px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #7db3e4;
}

.lightbox-prev:hover {
  transform: translateY(-50%) translateX(-4px);
}

.lightbox-next:hover {
  transform: translateY(-50%) translateX(4px);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 36px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 32px;
  }
}

/* ==========================================================================
   ANIMACIONES DE DESPLAZAMIENTO (SCROLL REVEAL)
   ========================================================================== */

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Retardos para animaciones en rejilla */
.services-grid.scroll-reveal.active .service-card:nth-child(1) { transition-delay: 0.1s; }
.services-grid.scroll-reveal.active .service-card:nth-child(2) { transition-delay: 0.2s; }
.services-grid.scroll-reveal.active .service-card:nth-child(3) { transition-delay: 0.3s; }
.services-grid.scroll-reveal.active .service-card:nth-child(4) { transition-delay: 0.4s; }
