@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

body {
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

.lineainf {
  border-bottom: 1px solid #e2e2e2;
  padding-bottom: 40px;
}

.precios {
  font-size: 50px;
  font-weight: 600;
}

.price-text {
  font-size: 30px;
  font-weight: 500;
}

.total {
  font-size: 30px;
}

.marginleftfoot {
  padding-left: 130px !important;
}

h3 {
  font-size: 20px !important;
}

.izq {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.der {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.bg-cover {
  background-image: url("../images/img_login.jpg") !important;
  background-color: #17417E;
  background-size: cover;
  background-position: center;
}

.login-box {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(8, 50, 154, 0.2);
}

@media (min-width: 768px) {
  .login-box {
    padding: 2rem;
  }
}

.login-box a {
  color: #17417E !important;
  text-decoration: underline !important;
}

.login-title {
  font-weight: bold;
  color: #17417E;
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .login-title {
    font-size: 1.5rem;
  }
}

.login-logo {
  width: 80px;
  height: auto;
}

@media (min-width: 768px) {
  .login-logo {
    width: 110px;
  }
}

.btn-primary {
  background-color: #17417E !important;
  border: 0 !important;
  padding: 10px !important;
}

.btn-primary a {
  color: #fff !important;
}

.btn-secondary,
.btn-success {
  padding: 10px !important;
}

.bg-danger-subtle {
  background-color: rgba(233, 189, 189, 0.5);
  border-radius: 10px;
}

.bg-success-subtle {
  background-color: rgba(60, 153, 110, 0.29);
  border-radius: 10px;
}

.bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.22);
  border-radius: 10px;
}

.bg-primary-subtle {
  background-color: rgba(13, 110, 253, 0.26);
  border-radius: 10px;
}

.botoncerrarsesion {
  color: #fff;
  border: 0;
  margin-left: 0;
  padding: 0;
  background-color: transparent;
  text-decoration: underline;
}

/* ===== LANGUAGE FLAGS ===== */
.lang-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  opacity: 0.5;
  transition: opacity 0.15s, transform 0.15s;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
}

.lang-flag .fi {
  font-size: 1.2em;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(0,0,0,0.3);
}

.lang-flag:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lang-flag-active {
  opacity: 1;
  border-bottom-color: #fff;
}

/* ===== TOPBAR ===== */
.topbar {
  font-size: 0.9rem;
  background-color: #17417E;
  padding: 0.5rem 0;
  color: #fff;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar .login-meta {
  line-height: 1.2;
}

.topbar .login-meta small {
  opacity: 0.9;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.topbar-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1rem;
}

.topbar a {
  color: white;
  text-decoration: none;
}

.topbar a:hover {
  color: white;
  text-decoration: underline;
}

.topbar .social-icons a {
  margin-left: 0.5rem;
}

.topbar-link,
.topbar-contact {
  white-space: nowrap;
}

.language-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ===== MOBILE PAGE HEADER ===== */
.mobile-page-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
}

.mobile-page-logo {
  width: 36px;
  height: auto;
  flex-shrink: 0;
}

.mobile-page-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #17417E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== WEEK NAVIGATION ===== */
.week-navigation {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.week-navigation h5 {
  color: #17417E;
  font-size: 1.1rem;
}

.week-navigation .btn-outline-primary {
  border-color: #17417E;
  color: #17417E;
}

.week-navigation .btn-outline-primary:hover {
  background-color: #17417E;
  border-color: #17417E;
  color: #fff;
}

.week-navigation .btn-outline-primary.disabled {
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .week-navigation {
    padding: 0.75rem;
  }
  
  .week-navigation h5 {
    font-size: 0.95rem;
  }
  
  .week-navigation .btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* ===== HEADER ===== */
.header {
  background-color: #ffffff;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #dee2e6;
}

.header .logo {
  margin: 0;
}

.brand-logo img {
  width: 110px;
  height: auto;
  display: block;
}

.header a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
}

.header a:hover {
  text-decoration: underline;
}

.user-navbar {
  padding: 0;
}

.user-navbar .navbar-toggler {
  border: 1px solid rgba(23, 65, 126, 0.25);
  padding: 0.4rem 0.6rem;
}

.user-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(23, 65, 126, 0.15);
}

.user-navbar .navbar-nav {
  gap: 0.25rem;
}

.user-navbar .nav-link {
  margin-left: 0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: background-color 0.2s ease;
}

.user-navbar .nav-link:hover,
.user-navbar .nav-link:focus {
  background-color: rgba(23, 65, 126, 0.08);
  text-decoration: none;
}

.user-navbar .nav-link.active {
  background-color: rgba(23, 65, 126, 0.12);
  color: #17417E;
  font-weight: 600;
}

nav a.active {
  text-decoration: underline !important;
  color: #235195 !important;
}

/* ===== FOOTER ===== */
footer {
  background-color: #17417E;
  color: #fff;
}

.site-footer {
  padding-top: 3rem;
  padding-bottom: 1.75rem;
}

.footer-inner {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.footer-block h5,
.footer-heading {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-block ul,
.footer-block p {
  margin-bottom: 0;
}

footer ul li,
footer ul li a,
footer p {
  color: #fff !important;
}

.copy {
  border-top: 1px solid #235195;
}

/* ===== FILTER TOGGLE (mobile) ===== */
.filter-toggle-btn {
  font-weight: 600;
  font-size: 0.95rem;
  color: #17417E;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.filter-toggle-btn:hover,
.filter-toggle-btn:focus {
  color: #17417E;
  background-color: rgba(23, 65, 126, 0.05);
  box-shadow: none;
}

.filter-chevron {
  transition: transform 0.25s ease;
}

.filter-toggle-btn[aria-expanded="true"] .filter-chevron {
  transform: rotate(180deg);
}

/* ===== ACTION ROW ===== */
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-row form {
  margin: 0;
}

.action-row .btn,
.action-row a {
  min-width: 160px;
}

/* ===== MOBILE SALIDA CARDS ===== */
.salida-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.salida-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.salida-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
}

.salida-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.salida-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border-radius: 0.4rem;
  padding: 0.2rem 0.45rem;
  white-space: nowrap;
  line-height: 1.3;
}

.salida-chip i {
  font-size: 0.8rem;
  color: #17417E;
}

.salida-chip-ok {
  background: rgba(60, 153, 110, 0.15);
  color: #166534;
}

.salida-chip-ok i {
  color: #166534;
}

.salida-chip-warn {
  background: rgba(233, 189, 189, 0.45);
  color: #991b1b;
}

.salida-chip-warn i {
  color: #991b1b;
}

.salida-chip-pending {
  background: rgba(255, 193, 7, 0.2);
  color: #92400e;
}

.salida-chip-pending i {
  color: #92400e;
}

.salida-chip-info {
  background: rgba(13, 110, 253, 0.12);
  color: #1e40af;
}

.salida-chip-info i {
  color: #1e40af;
}

.salida-card-action {
  flex-shrink: 0;
  width: 72px;
  min-width: 72px;
}

.salida-card-action .btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  white-space: normal !important;
  text-align: center;
  line-height: 1.3;
  width: 100%;
}

/* ===== RESERVAR PAGE ===== */
.reservar-form-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.reservar-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reservar-radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  border-radius: 0.6rem;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.reservar-radio-option:has(input:checked) {
  border-color: #17417E;
  background: #eef3fb;
}

.reservar-radio-option.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.reservar-radio-option label {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

.reservar-precio-box {
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.reservar-precio-contado {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.reservar-precio-bono {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.reservar-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #d1fae5;
  font-weight: 600;
  font-size: 0.95rem;
}

.reservar-total-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #16a34a;
}

/* ===== PROFILE PHOTO ===== */
.profile-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.profile-photo-upload {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.profile-photo-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #17417E;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}

.profile-photo-upload:hover .profile-photo-overlay {
  transform: scale(1.1);
}

.profile-photo-upload:hover .profile-photo {
  opacity: 0.85;
}

/* ===== SAVE BAR ===== */
.w-lg-auto { width: auto !important; }

@media (max-width: 991.99px) {
  .save-bar {
    position: sticky;
    bottom: 4.5rem;
    z-index: 10;
    background: #fff;
    padding: 0.75rem 0;
    border-top: 1px solid #dee2e6;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .w-lg-auto { width: 100% !important; }
}

@media (min-width: 768px) {
  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .profile-photo-overlay {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .w-md-auto {
    width: auto !important;
  }
}

/* ===== MOBILE STACK TABLE ===== */
.mobile-stack-table td::before {
  display: none;
}

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #ffffff;
  border-top: 1px solid #dee2e6;
  justify-content: space-around;
  align-items: stretch;
  padding: 0.35rem 0;
  padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav.d-lg-none {
  display: flex;
}

@media (min-width: 992px) {
  .mobile-bottom-nav.d-lg-none {
    display: none !important;
  }
}

.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  flex: 1;
  padding: 0.3rem 0.25rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  text-align: center;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav-item i {
  font-size: 1.25rem;
  line-height: 1;
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item:focus,
.mobile-bottom-nav-item.active {
  color: #17417E;
  text-decoration: none !important;
}

.mobile-bottom-nav-item.active {
  font-weight: 700;
}

button.mobile-bottom-nav-item {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}

/* ===== MEDIA QUERIES ===== */

/* Small devices (max 768px) */
@media (max-width: 768px) {
  .marginleftfoot {
    padding-left: 0 !important;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .precios {
    font-size: 36px;
  }

  .price-text {
    font-size: 22px;
  }

  .total {
    font-size: 22px;
  }

  .action-row {
    flex-direction: column;
  }

  .action-row form,
  .action-row .btn,
  .action-row a {
    width: 100%;
  }

  .mobile-stack-table thead {
    display: none;
  }

  .mobile-stack-table,
  .mobile-stack-table tbody,
  .mobile-stack-table tr,
  .mobile-stack-table td {
    display: block;
    width: 100%;
  }

  .mobile-stack-table tr {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  }

  .mobile-stack-table td {
    border: 0;
    padding: 0.45rem 0;
    text-align: left !important;
  }

  .mobile-stack-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0.2rem;
  }

  .site-footer {
    padding-top: 0;
    padding-bottom: 4.5rem;
  }

  /* ===== MOBILE FOOTER ===== */
  .footer-mobile {
    text-align: center;
    padding: 1rem 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }

  .footer-mobile-social {
    display: flex;
    gap: 1.25rem;
  }

  .footer-mobile-social a {
    color: rgba(255,255,255,0.7);
    font-size: 1.15rem;
    transition: color 0.15s;
  }

  .footer-mobile-social a:hover {
    color: #fff;
  }

  .footer-mobile-contact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

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

  .footer-mobile-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    display: inline-block;
  }

  .footer-mobile-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }

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

  .footer-mobile-links a:hover {
    color: #fff;
    text-decoration: underline;
  }

  .footer-mobile-copy {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
  }

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

/* Desktop (min 992px) */
@media (min-width: 992px) {
  .user-navbar {
    width: auto;
  }
}

/* Tablet and below (max 991.99px) — mobile navigation */
@media (max-width: 991.99px) {
  body {
    padding-bottom: 4rem;
  }

  .header {
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
  }

  .topbar-inner {
    align-items: center;
    gap: 0.5rem;
  }

  .izq {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .der {
    display: none;
  }

  .topbar {
    padding: 0.4rem 0;
    font-size: 0.82rem;
  }

  .botoncerrarsesion {
    font-size: 0.82rem;
  }

  .brand-logo img {
    width: 80px;
  }

  .user-navbar .navbar-collapse {
    margin-top: 0.5rem;
    background: #fff;
    border-radius: 1rem;
    padding: 0.5rem 0.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    border: 1px solid #e5e7eb;
  }

  .user-navbar .nav-link {
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
  }

  .user-navbar .nav-link:hover {
    background-color: rgba(23, 65, 126, 0.05);
  }

  .user-navbar .nav-link:active {
    background-color: rgba(23, 65, 126, 0.12);
  }

  .user-navbar .nav-item:last-child .nav-link {
    border-bottom: 0;
  }

  .user-navbar .navbar-toggler {
    padding: 0.35rem 0.55rem;
  }

  .site-footer {
    padding-bottom: 4.5rem;
  }
}

/* Extra small devices (max 575px) */
@media (max-width: 575.98px) {
  .topbar {
    font-size: 0.78rem;
  }

  .topbar-inner {
    gap: 0.25rem;
  }

  .izq {
    gap: 0.5rem;
  }

  .login-meta span {
    font-size: 0.78rem;
  }

  .topbar-avatar {
    width: 30px;
    height: 30px;
  }

  .brand-logo img {
    width: 70px;
  }

  .mobile-bottom-nav-item {
    font-size: 0.6rem;
  }

  .mobile-bottom-nav-item i {
    font-size: 1.1rem;
  }

  .language-switcher {
    font-size: 0.78rem;
  }
}
