#container {
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 10%;
}

section.header1 {
  padding: 30px 0px;
}

/* Estilos para hacer el sidebar fijo y scroll solo en el contenido */

/* Contenedor principal de servicios */
.services-content {
  display: flex;
  gap: 2rem;
  height: calc(100vh - 200px);
  /* Ajusta según la altura de tu header */
  max-height: 800px;
  /* Altura máxima del contenedor */
}

/* Sidebar fijo */
.sidebar {
  width: 300px;
  /* Ancho fijo del sidebar */
  min-width: 300px;
  /* Ancho mínimo */
  height: 100%;
  overflow-y: auto;
  /* Scroll solo si el contenido del sidebar es muy largo */
  position: sticky;
  top: 20px;
  /* Distancia desde arriba cuando se hace sticky */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

/* Área de contenido con scroll independiente */
.content-area {
  flex: 1;
  /* Ocupa el resto del espacio disponible */
  height: 100%;
  overflow-y: auto;
  /* Scroll vertical */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* Estilos para el scroll del content-area */
.content-area::-webkit-scrollbar {
  width: 8px;
}

.content-area::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb {
  background: #a52a2a;
  border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb:hover {
  background: #8b1c1c;
}

/* Opcional: Estilos para el scroll del sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* Asegurar que el contenido del service-details tenga altura suficiente */
.service-details {
  min-height: 100%;
}

/* Para pantallas más pequeñas - responsive */
@media (max-width: 768px) {
  .services-content {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 300px;
  }

  .content-area {
    height: 450px;
    /* Altura fija en móviles */
  }
}

/* Estilos adicionales para mejorar la apariencia */
.menu-section {
  margin-bottom: 1rem;
}

.menu-title {
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.menu-title:hover {
  background: #e9ecef;
  border-left-color: #a52a2a;
}

.menu-title.active {
  background: #a52a2a;
  color: white;
  border-left-color: #721c24;
}

.submenu {
  margin-top: 0.5rem;
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.submenu.active {
  max-height: 500px;
  /* Ajusta según necesites */
}

/* .submenu li {
    margin: 0.25rem 0;
} */

.submenu a {
  display: block;
  padding: 0.5rem;
  color: #6c757d;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.submenu a:hover {
  background: #f8f9fa;
  color: #a52a2a;
}

.submenu a.active {
  background: #e8f0fe;
  color: #a52a2a;
  font-weight: 500;
}

/* Estilos para la caja de búsqueda */
.search-box {
  margin-top: 1rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: #a52a2a;
  box-shadow: 0 0 0 2px rgba(165, 42, 42, 0.1);
}

.tramites {
  font-size: 4rem;
  text-align: center;
}

.texto-tramite {
  text-align: center;
  padding: 15px 0px;
}

.header-buttons {
  display: flex;
  gap: 7%;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 25px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: #a52a2a;
  color: white;
}

.btn-primary:hover {
  background-color: #8b2323;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: #a52a2a;
  border: 2px solid #a52a2a;
}

.btn-outline:hover {
  background-color: #a52a2a;
  color: white;
}

/* Main Services Section */
.main-services {
  padding: 2% 9%;
  background-color: #f5f5f5;
}

.services-header {
  text-align: center;
  margin-bottom: 50px;
}

.services-header h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #000000;
}

.services-header p {
  color: #000000;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.services-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar Styles */
.sidebar {
  background-color: #FFFFFF;
  border-radius: 10px;
  padding: 25px;
  border: 1px #EDEEF3 solid;
}

.menu-section {
  margin-bottom: 8px;
}

.menu-title {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 15px 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: #000000;
  /* background-color: white; */
  margin-bottom: 5px;
}

.menu-title:hover {
  background-color: #f0f0f0;
}


.menu-title.active {
  background-color: #f8d7da;
  color: #a52a2a;
}

.submenu {
  list-style: none;
  margin-left: 20px;
  display: none;
  background-color: white;
  border-radius: 6px;
  padding: 8px 0;
}

.submenu.active {
  display: block;
}

/* 
.submenu li {
  margin-bottom: 2px;
}
 */
.submenu a {
  text-decoration: none;
  color: #000000;
  font-size: 0.9rem;
  padding: 10px 15px;
  display: block;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.submenu a:hover {
  background-color: #f0f0f0;
  color: #000000;
}

.submenu a.active {
  background-color: #a52a2a;
  color: white;
}

.search-box {
  position: relative;
  margin-top: 25px;
}

.search-input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: white;
}



.search-box .search-input {
  width: 100%;
  padding: 10px 10px 5px 37px;
  border: 1px solid #ccc;
  border-radius: 20px;
}

.search-box .search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
}

.search-box .search-icon img {
  width: 100%;
  height: auto;
}

/* Content Area */
.content-area {
  background-color: white;
  border-radius: 10px;
  padding: 35px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.service-details h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #000000;
}

.service-details h4 {
  font-size: 1.2rem;
  margin: 25px 0 15px 0;
  color: #000000;
  font-weight: 600;
}

.service-details p {
  margin-bottom: 18px;
  color: #000000;
  line-height: 1.7;
  text-align: justify;
}

.service-details ul {
  margin-left: 25px;
  margin-bottom: 20px;
}

.service-details li {
  margin-bottom: 10px;
  color: #000000;
  line-height: 1.6;
}

.service-details li strong {
  color: #000000;
}

/* Right Sidebar */
.right-sidebar {
  background-color: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  height: fit-content;
}

.rates-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #000000;
  text-align: center;
}

.rates-link {
  color: #a52a2a;
  text-decoration: underline;
  font-size: 0.95rem;
  display: block;
  text-align: center;
}

.rates-link:hover {
  color: #8b2323;
}

/* Questions Section */
.questions-section {
  background-color: #ffffff;
  padding: 2% 9%;
}

.questions-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 40px;
  border-radius: 10px;
  /*   box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08); */
}

.questions-text h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #000000;
}

#btn-services {
  border-radius: 50px;
}

.questions-text p {
  color: #000000;
  font-size: 1.1rem;
}

.contact-btn {
  font-size: 1rem;
  padding: 15px 30px;
}

/* Online Services Section */
.online-services {
  padding: 2% 9%;
  background-color: #f5f5f566;
}

.online-header {
  text-align: center;
  margin-bottom: 50px;
}

.online-header h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #000000;
}

.online-header p {
  color: #000000;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.online-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: #ffffff;
  padding: 35px 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  height: 400px;
}

.service-card:hover {
  transform: translateY(-5px);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #000000;
}

.service-card p {
  color: #000000;
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Appointment Section */
.appointment-section {
  padding: 2% 9%;
  background-color: #f5f5f566;
}

.appointment-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 50px;
  align-items: start;
}

.appointment-info h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #000000;
}

.appointment-info>p {
  color: #000000;
  margin-bottom: 30px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.appointment-details h4 {
  font-size: 1.2rem;
  margin: 25px 0 15px 0;
}

.appointment-details ul {
  margin-left: 25px;
  margin-bottom: 20px;
}

.appointment-details li {
  margin-bottom: 8px;
  color: #000000;
  line-height: 1.6;
  list-style: none;
}

/* Calendar Widget */
.calendar-widget {
  background-color: #F5F5F5;
  border-radius: 10px;
  padding: 25px;
  /* width: 70vh;
  position: relative;
  right: 260px; */
}

.calendar-dates div {
  border: 1px solid #D5D4DF;
  border-radius: 4px;
}


.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header h3 {
  font-size: 1.3rem;
  color: #000000;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background-color: #f0f0f0;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.nav-btn:hover {
  background-color: #e0e0e0;
}

.calendar {
  width: 100%;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.day-header {
  text-align: center;
  font-weight: 600;
  color: #000000;
  padding: 10px 5px;
  font-size: 0.9rem;
}

.calendar-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-date {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.calendar-date:hover {
  background-color: #f0f0f0;
}

.calendar-date.available {
  color: #000000;
}

.calendar-date.selected {
  background-color: #a52a2a;
  color: white;
}

.calendar-date.other-month {
  color: #ccc;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .services-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .appointment-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .questions-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .header-buttons {
    gap: 1%;
  }
}

@media (min-width: 1526px) {
  .header-buttons {
    gap: 4%;
  }
}

@media (min-width: 1366px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2%;
  }

  .calendar-widget {
    width: auto;
    position: inherit;
    right: auto;
  }
}

@media (min-width: 768px) and (max-width: 799px){
  .tramites {
    font-size: 2.2rem;
  }

  .header-buttons {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
  }

  .btn {
    width: 100%;
    max-width: 350px;
  }

  .services-header h2,
  .online-header h2,
  .appointment-info h2 {
    font-size: 1.8rem;
  }

  .container {
    padding: 0 2%;
  }

  .content-area,
  .sidebar,
  .right-sidebar {
    padding: 25px 20px;
  }

  .online-cards {
    grid-template-columns: 1fr;
  }

  .calendar-widget {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .tramites {
    font-size: 1.9rem;
  }

  .header1 p {
    font-size: 1rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    margin: 1%;
  }

  .services-header h2,
  .online-header h2,
  .appointment-info h2 {
    font-size: 1.6rem;
  }

  .service-details h3 {
    font-size: 1.4rem;
  }

  .questions-content {
    padding: 30px 20px;
  }
}