/* ==========================================================================
   FARMACIAS UNIDAS - LÓPEZ & MODERNAS (MedicConnect)
   Exact original design matching landing/src/styles/globals.css
   ========================================================================== */

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

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

.app-bar {
  height: 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1;
}

.app-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
    #112f8fff 30%,
    rgb(255, 255, 255) 50%,
    #ffffff 50%,
    #ffffff 100%);
  z-index: -1;
}

.app-bar .logo-left {
  max-height: 70px;
  margin-right: auto;
  z-index: 2;
}

.app-bar .logo-right {
  max-height: 70px;
  margin-left: auto;
  z-index: 2;
}

.app-bar .nav-legal-link {
  z-index: 3;
  margin-right: 20px;
  color: #112f8f;
  font-weight: bold;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95em;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #112f8f;
  transition: all 0.2s ease;
}

.app-bar .nav-legal-link:hover {
  background: #112f8f;
  color: #ffffff;
}

main {
  background-image: url('fondo.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-bottom: 0;
  min-height: calc(100vh - 160px);
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e0e0e0;
  max-width: 1200px;
  margin: 0 auto;
}

.title2 {
  width: 100%;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5em;
  color: #333;
  margin-top: 20px;
  margin-bottom: 10px;
}

.hero-text {
  text-align: center;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  width: 50%;
}

.hero-text h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.2em;
  color: #007bff;
  margin-bottom: 20px;
  margin-top: 0;
}

.hero-text p {
  font-size: 1.25em;
  color: #555;
  max-width: 800px;
  margin: 0 auto 20px;
  text-align: left;
  line-height: 1.6;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: space-between;
  width: 90%;
}

.app-buttons {
  display: flex;
  gap: 15px;
  width: 100%;
}

.button {
  justify-content: center;
  display: inline-flex;
  gap: 8px;
  width: 50%;
  align-items: center;
  color: #ffffff;
  padding: 0.8em 1em;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 12px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.button:hover {
  transform: translateY(-5px);
}

.entrar-button {
  background-color: #007bff;
}
.entrar-button:hover {
  background-color: #4499f5;
}

.clientes-button {
  background-color: #ff5e00;
}
.clientes-button:hover {
  background-color: #ff8c49;
}

.hero-image {
  flex: 1;
  text-align: center;
  padding: 10px;
}

.hero-image img {
  max-width: 250px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  filter: saturate(1.1);
}

/* Floating Turnos Button & Modal */
.btn-turnos-floating {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-turnos-floating:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
  color: #112f8f;
  font-family: 'Montserrat', sans-serif;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #888;
}

.modal-close:hover {
  color: #000;
}

.turno-card-item {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 12px;
}

.turno-card-item h4 {
  margin: 0 0 5px 0;
  color: #007bff;
  font-size: 1.1em;
}

.turno-card-item p {
  margin: 3px 0;
  font-size: 0.95em;
  color: #444;
}

footer {
  background-color: #2c3e50;
  color: #ffffff;
  padding: 30px 20px;
  text-align: center;
  font-size: 0.95em;
  border-top: 5px solid #007bff;
}

.footer-privacy-link {
  color: #64b5f6;
  text-decoration: underline;
  font-weight: bold;
  margin-left: 10px;
}

.footer-privacy-link:hover {
  color: #ffffff;
}

.copyright {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

/* Legal Document Page Styling */
.legal-container {
  max-width: 900px;
  margin: 40px auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.legal-container h1 {
  font-family: 'Montserrat', sans-serif;
  color: #112f8f;
  font-size: 2.2em;
  margin-bottom: 10px;
}

.legal-container h2 {
  font-family: 'Montserrat', sans-serif;
  color: #007bff;
  font-size: 1.4em;
  margin-top: 25px;
  margin-bottom: 10px;
}

.legal-container p, .legal-container ul {
  font-size: 1.05em;
  color: #444;
  line-height: 1.7;
}

.legal-container ul {
  padding-left: 20px;
}

.legal-container li {
  margin-bottom: 8px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #007bff;
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  margin-bottom: 25px;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: #0056b3;
}

/* Responsive Styles matching globals.css */
@media (max-width: 960px) {
  .app-bar {
    flex-direction: column;
    height: auto;
    padding: 0;
    background: none;
  }

  .app-bar::before {
    display: none;
  }

  .logo-left,
  .logo-right {
    display: block;
    width: 100%;
    height: 80px;
    object-fit: contain;
  }

  .logo-left {
    background-color: #112f8fff;
    padding: 10px 0;
  }

  .logo-right {
    background-color: #ffffff;
    padding: 10px 0;
  }

  .app-bar .nav-legal-link {
    margin: 10px 0;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
  }

  .hero-image {
    order: 2;
    max-width: 100%;
    margin-top: 20px;
  }

  .hero-text {
    order: 1;
    width: 100%;
  }

  .hero-text h1 {
    font-size: 2.2em;
  }

  .hero-text p {
    font-size: 1.05em;
    text-align: center;
  }

  .buttons {
    width: 100%;
  }

  .app-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .button {
    width: 100%;
  }

  .hero-image img {
    max-width: 220px;
  }

  .legal-container {
    padding: 20px;
    margin: 20px 10px;
  }
}
