/*
* Legal Health Management - Portal de Acceso
* Estilos personalizados
*/

:root {
  --primary-color: #c9a55c;
  --secondary-color: #1a2942;
  --accent-color: #3a5a7c;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Playfair Display', serif;
}

/* Estilos generales */
body {
  font-family: var(--font-primary);
  color: var(--dark-color);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

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

.btn-primary:hover, .btn-primary:focus {
  background-color: #b08d4a;
  border-color: #b08d4a;
}

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

.btn-secondary:hover, .btn-secondary:focus {
  background-color: #131f32;
  border-color: #131f32;
}

/* Navbar */
.navbar {
  transition: all 0.3s ease;
}

.navbar-brand img {
  max-height: 50px;
}

.navbar-scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: #fff !important;
}

.navbar-dark .navbar-nav .nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

.navbar-dark.navbar-scrolled .navbar-nav .nav-link.active,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Estilos específicos para páginas que no son index */
.navbar-light {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-light .navbar-nav .nav-link {
  color: var(--secondary-color);
}

.navbar-light .navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  object-fit: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 41, 66, 0.7);
  /* Fallback para navegadores que no soporten video */
  background-image: linear-gradient(rgba(26, 41, 66, 0.8), rgba(26, 41, 66, 0.8));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Sección de acceso a aplicaciones */
.app-access {
  padding: 5rem 0;
}

.app-card {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
}

.app-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.app-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.app-card .card-body {
  padding: 2rem;
}

/* Línea de tiempo */
.timeline {
  position: relative;
  padding: 5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 150px; /* Ajustado para que empiece después del título y subtítulo */
  left: 50%;
  width: 2px;
  height: calc(100% - 150px); /* Ajustado para mantener la proporción */
  background-color: var(--primary-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-content {
  position: relative;
  width: 45%;
  padding: 2rem;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content::after {
  content: '';
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-item:nth-child(odd) .timeline-content::after {
  left: -30px;
}

.timeline-item:nth-child(even) .timeline-content::after {
  right: -30px;
}

.timeline-date {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Sección de características */
.features {
  padding: 5rem 0;
  background-color: #f8f9fa;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 3rem 0;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer a:hover {
  color: white;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 991.98px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .video-background video {
    height: 100%;
    width: auto;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
  }

  .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-item:nth-child(even) .timeline-content::after {
    left: -30px;
    right: auto;
  }
}

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

  .app-card {
    margin-bottom: 2rem;
  }
}

/* Animaciones */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Estilos para la sección de comparación */
.comparison-table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comparison-table th {
  background-color: var(--secondary-color);
  color: white;
  padding: 1rem;
}

.comparison-table td {
  padding: 1rem;
}

.comparison-table tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.03);
}

.check-icon {
  color: var(--success-color);
}

.times-icon {
  color: var(--danger-color);
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(201, 165, 92, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
