/* Estilos Base */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #10b981;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --gray-color: #64748b;
  --gray-light: #e2e8f0;
  --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --header-height: 80px;
  --header-height-scrolled: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--dark-color);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.section-header p {
  color: var(--gray-color);
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

/* Estilos del Encabezado */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  transition: padding 0.3s ease;
}

/* Estilos para el header cuando se hace scroll */
header.scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

header.scrolled .container {
  padding: 10px 20px;
}

header.scrolled .logo h1 {
  font-size: 1.5rem;
}

header.scrolled .nav-links a {
  font-size: 0.9rem;
}

.logo-img {
  display: flex;
  height: 100px;
  width: auto;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  transition: font-size 0.3s ease;
}

.logo span {
  font-weight: 400;
  color: var(--dark-color);
}

.nav-links {
  display: flex;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--dark-color);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu {
  display: none;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  margin: 5px 0;
  transition: var(--transition);
}

/* Ajuste para el espacio del header en el carrusel */
.carousel-container {
  position: relative;
  overflow: hidden;
  margin-top: var(--header-height); /* Espacio para el header fijo */
  height: 600px; /* Altura fija para el carrusel en desktop */
  transition: margin-top 0.3s ease;
}

/* Estilos del Carrusel con animación de deslizamiento */
.carousel-slides {
  display: flex;
  width: 300%; /* 100% por cada slide (3 slides) */
  height: 100%;
  transition: transform 0.8s ease-in-out;
}

.carousel-slide {
  min-width: 33.333%; /* Cada slide ocupa 1/3 del contenedor */
  height: 100%;
  position: relative;
  display: flex;
  align-items: stretch; /* Asegura que el contenido se estire para llenar el slide */
}

.carousel-slide > div {
  width: 100%; /* Asegura que el div interno ocupe todo el ancho */
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-indicator.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  transform: translateY(-50%);
  z-index: 10;
}

.carousel-control {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--dark-color);
}

.carousel-control:hover {
  background-color: white;
  transform: scale(1.1);
}

/* Estilos específicos para cada slide del carrusel */
.hero {
  padding: 100px 0;
  height: 100%;
  width: 100%; /* Asegura que ocupe todo el ancho */
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra el contenido verticalmente */
}

.hero-services {
  background: linear-gradient(135deg, #f0fff4 0%, #d1fae5 100%);
}

.hero-comocomen {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.hero-content {
  flex: 1;
  padding-right: 50px;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--gray-color);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hero-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

/* Sección Servicios */
.services {
  padding: 100px 0;
  background-color: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.service-card {
  background-color: white;
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  text-align: center;
  width: 210px;
  height: 210px;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow);
}

.service-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.service-icon i {
  font-size: 30px;
  color: var(--primary-color);
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.service-card p {
  color: var(--gray-color);
}

/* Sección Nosotros */
.about {
  padding: 100px 0 50px; /* Reducir el padding inferior */
  background-color: #f8fafc;
}

/* Estilos específicos para el título de la sección "Sobre nosotros" */
@media (max-width: 768px) {
  #nosotros .section-header h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .logo-img {
    height: 80px;
  }

  #nosotros .section-header h2 .sobre {
    margin-bottom: 5px;
  }

  #nosotros .section-header h2 .company-name {
    white-space: nowrap; /* Esto evita que "IP Informática Profesional" se rompa */
    font-size: 5rem;
  }
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
}

.about-image img {
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.about-text p {
  margin-bottom: 25px;
  color: var(--gray-color);
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-text {
  color: var(--gray-color);
  font-size: 0.9rem;
}

/* Sección Producto/Soluciones */
.product {
  padding: 100px 0;
  background-color: white;
}

.product-features {
  display: flex;
  gap: 50px;
  align-items: center;
}

.product-showcase {
  flex: 1;
}

.product-image {
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.product-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  transition: opacity 0.3s ease;
}

.product-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.tab-btn {
  padding: 10px 20px;
  background-color: var(--gray-light);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  margin: 0 5px;
}

.tab-btn.active,
.tab-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.feature-list {
  flex: 1;
}

.feature-item {
  display: flex;
  align-items: baseline;
  margin-bottom: 30px;
}

.feature-icon {
  width: 75px;
  height: 75px;
  background-color: rgb(255, 255, 255);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  flex-shrink: 0;
}

.feature-icon i {
  font-size: 30px;
  color: var(--primary-color);
}

.feature-content h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.feature-content p {
  color: var(--gray-color);
}

/* Sección Contacto Reorganizada */
.contact {
  padding: 50px 0 100px; /* Reducir el padding superior */
  background-color: #f8fafc;
}

.contact-content {
  display: flex;
  gap: 40px;
}

.contact-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.map-container {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  height: 350px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-form {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  /* Elimina cualquier align-items: center; */
  display: block; /* Asegura que los hijos no se centren */
}

.form-group {
  margin-bottom: 20px;
  text-align: left; /* Asegura alineación a la izquierda */
}

.contact-form button[type="submit"] {
  min-width: 220px;
  max-width: 320px;
  font-size: 1.25rem;
  padding: 18px 36px;
  margin: 20px auto 0; /* Aumentado el margen superior */
  display: block;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--gray-light);
  border-radius: 5px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  height: 150px;
  resize: none;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-item i {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 20px;
  margin-top: 5px;
}

.contact-item h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.contact-item p {
  color: var(--gray-color);
}

.email-link {
  color: var(--primary-color);
  transition: var(--transition);
}

.email-link:hover {
  text-decoration: underline;
}

.cf-turnstile {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 30px;
  padding-top: 50px;
  padding-bottom: 50px;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 80px 0 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 50px;
}

.footer-logo h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: white;
}

.footer-logo span {
  font-weight: 400;
  opacity: 0.8;
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 50px;
}

.footer-column h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  display: inline-block; /* Añade esto para permitir el transform */
}

.footer-column ul li a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: white;
}

/* Estilos Responsive */
@media (max-width: 1024px) {

  .hero-content h1 {
    font-size: 3rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content,
  .product-features {
    flex-direction: column;
  }

  .about-image,
  .about-text,
  .product-showcase,
  .feature-list {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  header .container {
    padding: 15px 20px;
  }

  header.scrolled .container {
    padding: 8px 20px;
  }

  header.scrolled .logo h1 {
    font-size: 1.3rem;
  }

  .logo h1 {
    font-size: 1.6rem;
  }

  /* Ajustar la posición del menú móvil cuando el header está scrolled */
  header.scrolled .nav-links {
    top: 60px;
    height: calc(100vh - 60px);
  }

  /* Ajustar el tamaño del icono del menú móvil */
  header.scrolled .bar {
    width: 22px;
    height: 2px;
    margin: 4px 0;
  }
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .mobile-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 50px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .section-header h2 {
    font-size: 2rem;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  /* Ajustes para la sección de contacto en dispositivos móviles */
  .contact-content {
    flex-direction: column;
  }

  /* NUEVOS AJUSTES RESPONSIVE PARA EL CARRUSEL */
  .carousel-container {
    height: auto;
    min-height: 500px;
  }

  .carousel-slides {
    height: auto;
  }

  .carousel-slide {
    height: auto;
    min-height: 500px; /* Altura mínima consistente para todos los slides */
  }

  .hero {
    padding: 40px 0;
    height: 100%;
    min-height: 500px; /* Altura mínima consistente */
  }

  .hero-content h1 {
    font-size: 2rem;
    text-align: center;
  }

  .hero-content p {
    font-size: 1rem;
    text-align: center;
  }

  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
  }

  .service-card {
    width: 100%;
    height: auto;
    padding: 20px 15px;
  }

  .service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
  }

  .service-card h3 {
    font-size: 0.9rem;
  }

  .feature-item {
    margin-bottom: 15px;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
  }

  .feature-content h3 {
    font-size: 1rem;
  }

  .carousel-controls {
    display: flex;
    padding: 0 10px;
  }

  .carousel-control {
    width: 30px;
    height: 30px;
  }

  .carousel-indicators {
    bottom: 10px;
  }

  .carousel-indicator {
    width: 10px;
    height: 10px;
  }

  .map-container {
    height: 250px;
  }

  .contact-form {
    padding: 20px;
  }
  .contact-form button[type="submit"] {
    margin-top: 30px;
  }

  .about {
    padding: 70px 0 35px; /* Reducir aún más en dispositivos móviles */
  }

  .contact {
    padding: 35px 0 70px; /* Reducir aún más en dispositivos móviles */
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 100%;
  }

  .stats {
    flex-direction: row; /* Mantener horizontal */
    justify-content: space-between;
    gap: 10px; /* Reducir el espacio entre elementos */
  }

  .stat-item {
    padding: 0 5px;
  }

  .stat-number {
    font-size: 1.8rem; /* Reducir tamaño de la cifra */
  }

  .stat-text {
    font-size: 0.7rem; /* Reducir tamaño del texto */
  }

  /* Ajustes adicionales para pantallas muy pequeñas */
  .service-card {
    padding: 15px 10px;
  }

  .service-icon {
    width: 40px;
    height: 40px;
  }

  .service-icon i {
    font-size: 20px;
  }

  .service-card h3 {
    font-size: 0.8rem;
  }

  .carousel-controls {
    display: flex;
  }

  .carousel-control {
    width: 25px;
    height: 25px;
  }

  .carousel-indicator {
    width: 8px;
    height: 8px;
  }

  #nosotros .section-header h2 .company-name {
    white-space: nowrap; /* Esto evita que "IP Informática Profesional" se rompa */
    font-size: 1.8rem;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  .feature-icon i {
    font-size: 20px;
  }

  .feature-content h3 {
    font-size: 0.9rem;
  }

  .contact-form button[type="submit"] {
    min-width: 100%;
    font-size: 1rem;
    padding: 12px 24px;
    margin-top: 40px; /* Margen superior aún mayor en móviles pequeños */
  }

  .cf-turnstile {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

/* Ajustes para dispositivos muy pequeños */
@media (max-width: 360px) {
  #nosotros .section-header h2 .company-name {
    white-space: nowrap; /* Esto evita que "IP Informática Profesional" se rompa */
    font-size: 1.5rem;
  }

  header .container {
    padding: 12px 15px;
  }

  header.scrolled .container {
    padding: 6px 15px;
  }

  .logo h1 {
    font-size: 1.4rem;
  }

  header.scrolled .logo h1 {
    font-size: 1.2rem;
  }
  .stat-number {
    font-size: 1.5rem; /* Aún más pequeño para pantallas muy pequeñas */
  }

  .stat-text {
    font-size: 0.6rem;
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }

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

  .service-card {
    width: 100%;
    max-width: 100%;
  }

  .carousel-controls {
    padding: 0 5px;
  }

  .carousel-control {
    width: 20px;
    height: 20px;
  }

  .carousel-control i {
    font-size: 12px;
  }
}
