/* assets/css/layout.css */
/* Basic Styles for the General Structure */

/* ===================================================
   HEADER BLOCK (NAME + LOGO + USER MENU)
   =================================================== */
/* Quitar negrita de logo name y poner en inciar sesión? */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--primary-color);
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  width: 40px;
  height: auto;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

.sub-header .navbar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-header .navbar .logo img {
  width: 40px;
  height: auto;
}

.sub-header .navbar .logo .brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.sub-header .navbar .logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* ======================================
   BLOQUE USER MENU
   ====================================== */

/* General */
.user-auth a {
  color: white;
  font-weight: 600;
  font-size: 1.05rem;
}

.user-auth a:hover {
  text-decoration: underline;
}

/* Logged-in user */
#user-name {
  cursor: pointer;
}

#user-menu {
  position: relative;
  color: #ffffff;
  font-weight: 600;
}

#user-menu:hover {
  text-decoration: underline;
}

#user-name-btn {
  background: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

#user-name-btn:hover {
  background: var(--primary-color);
}

#user-dropdown {
  position: absolute;
  right: 0;
  margin-top: 8px;
  background: #ffffff;
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  min-width: 150px;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#user-dropdown button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0.8rem 1rem;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  color: var(--primary-color);
  font-weight: 400;
}

#user-dropdown button:hover {
  background: #e0f2f1;
}

/* ===================================================
   NAVBAR BLOCK (SUBPAGES LINKS)
   =================================================== */

.navbar {
  background-color: var(--secondary-color);
  padding: 0.8rem 2rem;
  z-index: 1000;
  /* Asegurar que la navbar esté por encima de otros elementos */
}

@media (min-width: 768px) {

  /* Navbar sticky en pantallas grandes */
  .navbar {
    position: sticky;
    top: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    scroll-margin-top: 80px;
  }
}

[id] {
  scroll-margin-top: 80px;
}

@media (max-width: 767px) {
  [id] {
    scroll-margin-top: 0;
  }
}

.navbar ul {
  display: flex;
  flex-wrap: wrap;
  /* Permitir que los links salten a otra línea */
  justify-content: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0 1rem;
  /* Padding lateral */
}

@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    /* Columna en móvil */
    gap: 15px;
    align-items: center;
  }
}

.navbar ul li a {
  color: #ffffff;
  font-weight: 600;
  transition: color 0.3s ease;
}

.navbar ul li a:hover {
  color: #b2dfdb;
  text-decoration: underline;
}

/* ===================================================
   FOOTER BLOCK (LINKS + CONTACT + SUGGESTIONS)
   =================================================== */

.footer {
  background: var(--primary-color);
  color: #000000;
  padding: 60px 20px 20px;
  text-align: left;
  font-family: Arial, sans-serif;
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links,
.footer-contact,
.sugerencias {
  flex: 1 1 250px;
}

.footer-links h3,
.footer-contact h3,
.sugerencias h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--secondary-color);
  display: inline-block;
  padding-bottom: 5px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-email a {
    color: #0645AD;
    text-decoration: underline;
}

.footer-email a:hover {
    color: var(--secondary-color);
}

/* Underlines page's links */
.footer-links a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.footer-contact p,
.footer-donations p {
  margin-bottom: 10px;
  line-height: 1.5;
}

.footer-donations {
  margin-top: 30px;
}

/* Haznos una donación */
.footer-donations a {
  color: #0645AD; /* #80cbc4 */
  text-decoration: underline;
  transition: all 0.2s ease;
}

.footer-donations a:hover,
.footer-donations a:focus {
  color: var(--secondary-color);
  text-decoration-color: var(--secondary-color);
}

.footer-form {
  margin-top: 15px;
  max-width: 300px;
}

.footer-form input,
.footer-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: none;
  border-color: #00695c;
  border-radius: 6px;
  font-family: inherit;
  background: #cccccc;
  color: #000000;
  box-sizing: border-box;
}

.footer-form input::placeholder,
.footer-form textarea::placeholder {
  color: #979797;
}

.footer-form button {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.footer-form button:hover {
  background: var(--primary-color);
}

/* Footer legal y separadores */
.footer-legal {
  text-align: center;
  margin-top: 40px; /* before 30px */
  border-top: 1px solid #ffffff33;
  padding-top: 15px;
  font-size: 0.9rem;
  color: #eeeeee;
}

.footer-separator {
  border: none;
  border-top: 2px solid var(--secondary-color);
  margin: 1rem 0;
  width: 100%;
}

.footer-legal-links {
  margin-top: 10px;
  font-size: 0.85rem;
}

.footer-legal-links a {
  color: #eeeeee;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-legal-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-legal-links .separator {
  margin: 0 10px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 20px;
  }

  .footer-links,
  .footer-contact,
  .sugerencias {
    flex: 1 1 100%;
  }
}