/* === VARIABLES Y ESTILOS GLOBALES === */
:root {
  --primary: #002B5B;
  --accent: #F57C00;
  --light: #ffffff;
  --dark: #333333;
  --gray-bg: #f5f7fa;
  --primary-color: #F57C00;
  --secondary-color: #002B5B;
}

html {
  scroll-behavior: smooth; /* Enable smooth scrolling */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

/* === NAVEGACIÓN === */
nav.nav {
  background: var(--light);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav.nav a {
  margin: 0 1rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

nav.nav a:hover {
  color: var(--accent);
}

/* === HERO SECTION === */
.hero-section {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: auto;
  background-color: var(--primary);
  background-image: radial-gradient(circle at center, rgba(0, 50, 100, 0.3) 0%, var(--primary) 60%);
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1 rem;
  max-width: 1200px;
  margin: auto;
  padding: 1.5rem 1rem;
  flex-wrap: wrap;
}

.hero-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-header .logo-container {
  margin-bottom: 0.8rem;
}

.hero-header h1 {
  color: #fff;
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.hero-main-content {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.hero-content {
  flex: 1 1 350px;
  color: #fff;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
}

.hero-content h1 {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.btn {
  background: #ff9800;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: background 0.2s;
}
.btn:hover {
  background: #e67c00;
}

.hero-image {
  flex: 1 1 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image img {
  width: 100%;
  height: 100%;
  max-width: 470px;
  border-radius: 18px;
  object-fit: contain;
  border: none;
  position: relative;
  z-index: 1;
}

/* Floating elements */
.floating-element {
  position: absolute;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 174, 255, 0.3);
  border-radius: 50%;
  backdrop-filter: blur(5px);
  z-index: 2;
  box-shadow: 0 0 15px rgba(0, 174, 255, 0.6);
  animation: float 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-element i {
  color: #fff;
  font-size: 1.2rem;
}

/* Keyframes for floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px); /* Move up by 10px */
  }
}

/* Positioning for different elements */
.floating-element.element-1 { top: 10%; left: 18%; animation-delay: 0.2s; }
.floating-element.element-2 { top: 10%; right: 20%; animation-delay: 0.5s; }
.floating-element.element-3 { bottom: 65%; left: 10%; animation-delay: 0.8s; }
.floating-element.element-4 { bottom: 65%; right: 10%; animation-delay: 1.1s; }
.floating-element.element-5 { top: 0%; left: 45%; transform: translateX(-50%); width: 35px; height: 35px; animation-delay: 1.4s; }

@media (max-width: 900px) {
  .hero-container {
    gap: 0.3rem;
    padding: 0.8rem 0.5rem;
  }

  .hero-main-content {
    flex-direction: column;
    padding: 0.8rem 0.5rem;
    gap: 0.8rem;
    align-items: center;
  }

  .hero-content, .hero-image {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .hero-image img {
    max-width: 90vw;
  }

  .hero-image::before {
    display: none;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .floating-element {
    display: none;
  }
}

@media (min-width: 901px) {
  /*
  .hero-content p {
    text-align: center;
  }
  .hero-content .logo-container,
  .hero-content .hero-icon,
  .hero-content .btn {
  }
  */
}

.hero-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.hero-icon .foto-perfil {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 1rem;
}

.hero-icon .icono-automatizacion {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* === WHATSAPP FLOTANTE === */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.whatsapp-float i {
  margin-top: 15px;
}

/* === SECCIONES GENERALES === */
section:not(.hero-section) {
  padding: 2rem 1rem;
  max-width: 960px;
  margin: auto;
}

h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

ul {
  list-style: disc inside;
  margin-left: 1rem;
  margin-bottom: 1.5rem;
}

ul li {
  margin-bottom: 0.5rem;
}

footer {
  background: var(--primary);
  color: var(--light);
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

/* === SECCIÓN DESCARGA === */
.descarga-guia {
  background-color: var(--gray-bg);
  padding: 3rem 1.5rem;
  text-align: center;
}

.descarga-guia h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.descarga-guia p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === BLOG === */
#blog {
  background-color: var(--gray-bg);
  padding: 3rem 1.5rem;
  text-align: center;
}

.post-preview {
  background-color: white;
  max-width: 700px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.post-preview h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.post-preview p {
  color: #444;
  margin-bottom: 1rem;
}

/* === FOOTER === */
footer .social-icons {
  margin-bottom: 1rem;
}

footer .social-icons a {
  margin: 0 0.5rem;
  color: white;
  font-size: 1.6rem;
  transition: transform 0.2s ease;
}

footer .social-icons a:hover {
  transform: scale(1.2);
  color: var(--accent);
}

/* Testimonios */
.testimonio {
  margin-bottom: 1.5rem;
}

.testimonio blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

.testimonio figcaption {
  font-weight: bold;
  padding-left: 1rem;
}

/* === POLÍTICA DE COOKIES === */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.policy-section {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.policy-section h1 {
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
}

.policy-section article {
  margin-bottom: 2rem;
}

.policy-section h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.policy-section h3 {
  color: var(--primary);
  margin: 1rem 0;
  font-size: 1.2rem;
}

.policy-section p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.policy-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-section ul li {
  margin-bottom: 0.5rem;
}

.policy-section a {
  color: var(--accent);
  text-decoration: none;
}

.policy-section a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .policy-section {
    padding: 1rem;
  }
  
  .policy-section h1 {
    font-size: 1.8rem;
  }
  
  .policy-section h2 {
    font-size: 1.3rem;
  }
  
  .policy-section h3 {
    font-size: 1.1rem;
  }
}

section#servicios .btn {
  margin-top: 1.5rem;
  max-width: 300px;
  margin-left: 0;
  margin-right: auto;
  display: inline-block;
}

/* Ritmo de lectura del artículo. */
.blog-post > p + p {
  margin-top: .9rem;
}

.blog-post > h2 {
  margin-top: 1.65rem;
  margin-bottom: .45rem;
}

.blog-post > ul {
  padding-inline-start: 1.25rem;
}

.blog-post > ul > li + li {
  margin-top: .3rem;
}

.blog-post-cta {
  margin-top: 1.8rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d9e2ed;
}

.blog-post-cta h2 {
  margin-bottom: .45rem;
  color: var(--primary);
}

.blog-post .blog-post-contact {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: .85rem;
  padding: .5rem 1rem;
  border-radius: .4rem;
  color: var(--light);
  background: var(--primary);
  font-weight: 650;
  text-decoration: none;
}

.blog-post .blog-post-contact:hover {
  background: #164873;
}

.blog-post .blog-post-contact:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
