@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #1a2432; /* LEXTRIB Navy */
  --secondary-color: #2c3e50;
  --bg-color: #f4f7f6; /* Soft Lex-Grey */
  --text-color: #1e293b;
  --card-bg: #ffffff;
  --accent-color: #fab91b;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: #ffffff;
  /* Patrón Cuadrícula LEXTRIB sutil */
  background-image: 
    linear-gradient(rgba(250, 185, 27, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 185, 27, 0.25) 1px, transparent 1px);
  background-size: 60px 60px;
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOP HEADER */
.header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo img {
  height: 50px;
  object-fit: contain;
}

.header-nav {
  display: flex;
  gap: 20px;
}

.header-nav button {
  background: none;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.header-nav button:hover {
  color: var(--primary-color);
}

.btn-login {
  background-color: var(--accent-color) !important;
  color: var(--primary-color) !important;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(250, 185, 27, 0.3);
  transition: all 0.3s ease !important;
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(250, 185, 27, 0.4);
}

/* HERO SECTION */
.hero {
  position: relative;
  background: transparent;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 20px;
}

.hero-slider {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
  overflow: hidden;
  background-color: var(--primary-color);
}

.hero-slider .slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fadeSlider 16s infinite;
}

@keyframes fadeSlider {
  0%   { opacity: 0; transform: scale(1.05); }
  10%  { opacity: 0.08; transform: scale(1); }
  25%  { opacity: 0.08; transform: scale(1); }
  35%  { opacity: 0; transform: scale(1.05); }
  100% { opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: 800px;
  padding: 20px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero-title span, .hero-title strong {
  color: var(--accent-color);
}

.hero-content p {
  color: white !important;
  font-size: 1.15rem;
  margin-bottom: 30px !important;
  font-weight: 500;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8) !important;
}

.search-bar {
  display: flex;
  background: white;
  border-radius: 30px;
  padding: 5px 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}

.search-bar i {
  color: var(--primary-color);
  padding: 15px;
  font-size: 1.2rem;
}

.search-bar input {
  border: none;
  flex: 1;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  outline: none;
  background: transparent;
}

.search-bar button {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 30px;
  padding: 10px 30px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(250, 185, 27, 0.2);
}

.search-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(250, 185, 27, 0.4);
}

/* MAIN CONTENT GRID */
.container {
  max-width: 95%;
  margin: -60px auto 40px auto;
  position: relative;
  z-index: 2;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

/* SIDEBAR MENU */
.sidebar-menu {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  overflow: hidden;
  height: fit-content;
}

.sidebar-menu-header {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 15px 20px;
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav a {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.sidebar-nav a i {
  width: 20px;
  text-align: center;
}

.sidebar-nav a:hover {
  background-color: #f9f9f9;
  color: var(--accent-color);
  padding-left: 25px;
  border-left: 4px solid var(--accent-color);
}

/* BANNERS SECTION */
.banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.banner-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.banner-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.banner-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

/* MOST VISITED (GRID) */
.most-visited {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 35px;
}

.section-title span {
  color: var(--secondary-color);
  font-weight: 400;
}

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

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  border-radius: 24px;
  background-color: white;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  text-decoration: none;
  color: var(--primary-color);
  border: 1px solid rgba(250, 185, 27, 0.1);
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(0,0,0,0.1); 
  border-color: rgba(250, 185, 27, 0.4);
}

.service-icon {
  width: 65px;
  height: 65px;
  background-color: white;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 2rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.service-item:hover .service-icon {
  color: var(--accent-color);
  transform: scale(1.1);
}

.service-name {
  font-size: 0.95rem;
  font-weight: 600;
}

/* CHATBOT FLOATING BUTTON */
.chatbot-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-btn:hover {
  transform: scale(1.1);
}

.chatbot-tooltip {
  position: absolute;
  right: 80px;
  background: white;
  color: var(--text-color);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chatbot-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}

.chatbot-btn:hover .chatbot-tooltip {
  opacity: 1;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: white;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-title {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: 700;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.btn-primary-block {
  width: 100%;
  padding: 15px;
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(250, 185, 27, 0.3);
}

.btn-primary-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(250, 185, 27, 0.4);
}

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    padding: 15px 10px;
    gap: 15px;
  }
  .header-logo {
    flex-direction: column !important;
    text-align: center;
  }
  .header-logo h2 {
    font-size: 1.1rem !important;
  }
  .header-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .search-bar {
    flex-direction: column;
    border-radius: 15px;
    padding: 10px;
  }
  .search-bar i {
    display: none; /* Ocultar icono lupa para dar más espacio en móvil */
  }
  .search-bar input {
    padding: 12px;
    text-align: center;
    width: 100%;
  }
  .search-bar button {
    width: 100%;
    margin-top: 5px;
  }
  .container {
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
  }
  .most-visited {
    padding: 25px 15px;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .chatbot-btn {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
}
