:root {
  --primary-color: #004b70; /* Azul oscuro corporativo */
  --secondary-color: #1e88e5; /* Azul más brillante */
  --accent-color: #ffc107; /* Amarillo/Dorado para acentos */
  --text-color: #2c3e50; /* Gris oscuro para texto */
  --background-color: #f5f7fa; /* Fondo claro */
  --card-background: #ffffff; /* Fondo de tarjetas/secciones */
  --spacing-unit: 1rem;
}

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

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; /* Usar Inter si está disponible */
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--background-color);
  padding-top: 2rem; /* Espacio arriba */
}

/* Contenedor principal */
main,
header,
footer {
  max-width: 960px;
  margin: 0 auto calc(var(--spacing-unit) * 2) auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

/* --- Header --- */
header {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

header .logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

header .logo {
  max-height: 60px; /* Ajustar altura máxima */
  width: auto;
  transition: transform 0.3s ease;
}

header .logo:hover {
  transform: scale(1.05);
}

header h1 {
  color: var(--primary-color);
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}

/* --- Main Content --- */
main {
  background-color: var(--card-background);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 75, 112, 0.08);
}

.intro p {
  font-size: 1.1rem;
  color: var(--text-color);
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.technology-details {
  display: grid;
  gap: calc(var(--spacing-unit) * 2.5);
}

.tech-item {
  display: flex;
  align-items: flex-start; /* Alinear items al inicio */
  gap: calc(var(--spacing-unit) * 1.5);
  padding: calc(var(--spacing-unit) * 1.5);
  background-color: #fdfdfd; /* Fondo ligeramente diferente */
  border-radius: 8px;
  border: 1px solid #eee;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 75, 112, 0.06);
}

.tech-icon {
  width: 50px; /* Tamaño del icono */
  height: 50px;
  object-fit: contain; /* Asegurar que el icono se vea bien */
  margin-top: 5px; /* Ajuste vertical */
  flex-shrink: 0; /* Evitar que el icono se encoja */
}

.tech-item h2 {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.tech-item p {
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Footer --- */
footer {
  text-align: center;
  margin-top: calc(var(--spacing-unit) * 4);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-top: 1px solid #e0e0e0;
  padding-top: calc(var(--spacing-unit) * 2);
}

.footer-links {
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.footer-links a {
  color: var(--secondary-color);
  text-decoration: none;
  margin: 0 calc(var(--spacing-unit) * 0.75);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

footer p {
  font-size: 0.9rem;
  color: #6c757d; /* Gris más claro */
}

/* --- Animations --- */
.section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Specific animation types (can be adjusted) */
.fade-in {
  transition-delay: 0.1s; /* Pequeño retraso base */
}

.slide-in {
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: 0.1s;
}

.slide-in.visible {
  transform: translateX(0);
}

/* Add delays for staggered effect if needed */
.technology-details .tech-item:nth-child(1) {
  transition-delay: 0.1s;
}
.technology-details .tech-item:nth-child(2) {
  transition-delay: 0.2s;
}
.technology-details .tech-item:nth-child(3) {
  transition-delay: 0.3s;
}
.technology-details .tech-item:nth-child(4) {
  transition-delay: 0.4s;
}

/* --- Sección Aplicación Práctica T3 AI SAT --- */
.app-example {
  margin-top: calc(var(--spacing-unit) * 3);
  padding-top: calc(var(--spacing-unit) * 2);
}

.app-example h2 {
  text-align: center;
  color: var(--primary-color);
  font-size: 1.6rem; /* Tamaño similar a otros títulos de sección */
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.app-content {
  display: flex;
  align-items: center; /* Centrar verticalmente logo y descripción */
  gap: calc(var(--spacing-unit) * 2.5);
}

.app-logo-container {
  flex: 0 0 120px; /* Ancho fijo para el contenedor del logo */
  text-align: center;
}

.app-logo {
  max-width: 100px; /* Tamaño máximo del logo */
  height: auto;
  border-radius: 15px; /* Bordes redondeados si aplica al logo */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.app-logo:hover {
  transform: scale(1.05);
}

.app-description {
  flex: 1; /* Ocupa el espacio restante */
}

.app-description p {
  font-size: 1rem;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.store-links {
  display: flex;
  gap: calc(var(--spacing-unit) * 1);
  align-items: center;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  flex-wrap: wrap; /* Para que los badges se ajusten en pantallas pequeñas */
}

.store-badge img {
  height: 40px; /* Altura estándar para badges */
  width: auto;
  transition: opacity 0.3s ease;
}

.store-badge img:hover {
  opacity: 0.85;
}

.more-info-link {
  margin-top: var(--spacing-unit);
}

.cta-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #ffffff;
  padding: calc(var(--spacing-unit) * 0.8) calc(var(--spacing-unit) * 1.5);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
}

.cta-button:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }

  main {
    padding: calc(var(--spacing-unit) * 2);
  }

  .tech-item {
    flex-direction: column; /* Apilar icono y texto */
    align-items: center; /* Centrar en modo columna */
    text-align: center;
  }

  .tech-icon {
    margin-bottom: calc(var(--spacing-unit) * 1);
    margin-top: 0;
  }

  .app-content {
    flex-direction: column; /* Apilar logo y descripción */
    text-align: center;
  }

  .app-logo-container {
    flex: 0 0 auto; /* Resetear flex basis */
    margin-bottom: calc(var(--spacing-unit) * 1.5);
  }

  .store-links {
    justify-content: center; /* Centrar badges */
  }

  .cta-button {
    width: auto; /* Ajustar ancho */
    padding: calc(var(--spacing-unit) * 0.9) calc(var(--spacing-unit) * 1.8);
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 1rem;
  }

  header .logo-container {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
  }

  header .logo {
    max-height: 50px;
  }

  header h1 {
    font-size: 1.6rem;
  }

  main {
    padding: calc(var(--spacing-unit) * 1.5);
  }

  .footer-links a {
    display: block;
    margin: calc(var(--spacing-unit) * 0.5) 0;
  }

  .app-example h2 {
    font-size: 1.4rem;
  }

  .store-badge img {
    height: 35px; /* Reducir tamaño de badges */
  }

  .cta-button {
    font-size: 0.95rem;
    padding: calc(var(--spacing-unit) * 0.8) calc(var(--spacing-unit) * 1.5);
  }
}
