/* 
   TheraSession Styles
   Design: Minimalist, Professional, Calm (Material Design 3 inspired)
*/

:root {
  --color-primary: #3949AB;
  --color-primary-dark: #2F3E7A;
  --color-secondary: #5C6BC0;
  --color-background: #F5F5F5;
  --color-surface: #FFFFFF;
  --color-text-primary: #212121;
  --color-text-secondary: #757575;
  --color-border: #E0E0E0;
  
  --transition: all 0.3s ease;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, p, ul, li {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

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

.section--dark {
  background-color: var(--color-primary);
  color: var(--color-surface);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
  font-weight: 700;
}

/* Header & Nav */
.header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-primary);
}

.nav-list {
  display: flex;
  gap: 10px;
}

.nav-list a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
}

.nav-list a:hover {
  color: var(--color-primary);
  background-color: rgba(57, 73, 171, 0.08);
}

/* Hero Section Modernizado */
.hero {
  background: linear-gradient(135deg, #283593 0%, #3949AB 40%, #5C6BC0 70%, #7E57C2 100%);
  color: var(--color-surface);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 15px;
  opacity: 0.9;
  font-weight: 700;
  color: #c5cae9;
}

.hero-subtitle {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: 35px;
  opacity: 0.85;
  line-height: 1.6;
}

.hero-image {
  width: 100%;
  max-width: 450px;
  position: relative;
}

.hero-image img {
  border-radius: 20px; /* Reducido para adaptarse mejor a mockups externos */
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border: none; /* Eliminamos el borde blanco grueso para que la imagen respire */
  transition: transform 0.5s ease;
  width: 100%;
  display: block;
}

.hero-image:hover img {
  transform: translateY(-10px);
}

/* Responsive Hero */
@media (min-width: 768px) {
  .hero {
    padding: 140px 0;
    text-align: left;
  }

  .hero-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 80px; /* Aumentamos el espacio para mayor claridad */
  }

  .hero-content {
    flex: 1.1; /* Damos un poco más de peso al texto */
    max-width: 600px;
  }

  .hero-image {
    flex: 0.9; /* La imagen acompaña de forma elegante */
    max-width: 420px;
    display: flex;
    justify-content: flex-end; /* Alineamos la imagen a la derecha del contenedor */
  }

  .hero-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }

  .hero-subtitle {
    font-size: 48px; /* Ajustado para mejor balance */
    margin-bottom: 25px;
    line-height: 1.1;
  }

  .hero-description {
    font-size: 1.3rem;
    max-width: 480px; /* Evitamos líneas muy largas */
    margin-bottom: 40px;
  }
}

@media (min-width: 1024px) {
  .hero-subtitle {
    font-size: 64px;
  }
  
  .hero-image {
    max-width: 480px;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-surface);
  color: var(--color-primary);
  animation: pulse-glow 4s infinite ease-in-out;
  border: 2px solid rgba(47, 62, 122, 0.15);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
}

@keyframes pulse-glow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3), 0 4px 15px rgba(0,0,0,0.1);
    border-color: rgba(47, 62, 122, 0.15);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 10px 25px rgba(0,0,0,0.15);
    border-color: rgba(47, 62, 122, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 4px 15px rgba(0,0,0,0.1);
    border-color: rgba(47, 62, 122, 0.15);
  }
}

.btn-primary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  animation-play-state: paused; /* Pausa la animación al interactuar */
}

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

.btn-secondary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* Features */
.features-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.feature-item {
  background: #ffffff;
  padding: 50px 30px 40px;
  border-radius: 32px;
  border: 1px solid rgba(57, 73, 171, 0.08);
  text-align: center;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.02),
    0 30px 60px rgba(57, 73, 171, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Línea de acento superior */
.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0.8;
}

.feature-item:hover {
  transform: translateY(-12px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.04),
    0 40px 80px rgba(57, 73, 171, 0.12);
  border-color: rgba(57, 73, 171, 0.2);
}

.feature-icon {
  width: 100%;
  margin: 0 auto 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Resplandor difuminado detrás del icono */
.feature-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(57, 73, 171, 0.08) 0%, transparent 70%);
  z-index: -1;
  border-radius: 50%;
}

.feature-item:hover .feature-icon::after {
  background: radial-gradient(circle, rgba(57, 73, 171, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(1.2);
  transition: all 0.5s ease;
}

.feature-icon img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.08));
}

.feature-title {
  margin-bottom: 15px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
}

.feature-text {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Screenshots */
.screenshots-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.screenshot-item img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

/* Privacy */
.privacy-content {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.privacy-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* CTA Final Modernizado */
.cta-final {
  background: radial-gradient(circle at center, var(--color-primary-dark) 0%, #1a237e 100%);
  color: var(--color-surface);
  text-align: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta-title {
  margin-bottom: 45px;
  font-size: 38px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #8c9eff, #ffffff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 1.2s linear infinite, soft-pulse 2s infinite ease-in-out;
  display: inline-block;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

@keyframes soft-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.2); }
}

/* Efecto de luz de fondo para el CTA */
.cta-final::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(92, 107, 192, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: rotate-glow 10s linear infinite;
}

@keyframes rotate-glow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Footer */
.footer {
  background-color: var(--color-surface);
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.rotating-logo {
  animation: rotate-slow 15s linear infinite;
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.footer-container p {
  margin-bottom: 10px;
}

.footer a {
  color: var(--color-primary);
  font-weight: 500;
}

/* Responsive */

@media (min-width: 768px) {
  .section-title {
    font-size: 32px;
  }

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

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

  .hero-container {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 40px;
  }

  .hero-content {
    flex: 1;
  }

  .hero-image {
    flex: 1;
    margin-top: 0;
  }

  .hero-description {
    margin-left: 0;
  }
}
@media (min-width: 1024px) {
  .section {
    padding: 80px 0;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .screenshots-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-title {
    font-size: 48px;
  }
  
  .cta-title {
    font-size: 32px;
  }
}