@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Merriweather+Sans:wght@400;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/*
 * -------------------------------------------
 * SECTION 1: CSS Variables
 * -------------------------------------------
 */
:root {
  /* Color Palette */
  --hom-primary-color: #4b3621;
  --hom-secondary-color-1: #2a2c2d;
  --hom-secondary-color-2: #c0b0a0;
  --hom-accent-color: #b30000;
  --hom-white: #f5f5f5;
  --hom-background-color: #f0eae4;

  /* Typography */
  --hom-font-family-title: 'Merriweather', serif;
  --hom-font-family-text: 'Merriweather Sans', sans-serif;
  --hom-font-size-base: 1.25rem;
  --hom-font-size-s: 1rem;
  --hom-font-size-m: 1.5rem;
  --hom-font-size-l: 2.5rem;
  
  /* Spacing */
  --hom-spacing-xs: 0.5rem;
  --hom-spacing-s: 1rem;
  --hom-spacing-m: 1.5rem;
  --hom-spacing-l: 2rem;
  --hom-spacing-xl: 3rem;

  /* Borders & Shadows */
  --hom-border-radius-base: 12px;
  --hom-shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.1);
  --hom-shadow-medium: 0 8px 12px rgba(0, 0, 0, 0.15);
  --hom-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

  /* Transitions */
  --hom-transition-duration: 0.3s;
}

/*
 * -------------------------------------------
 * SECTION 2: Global Styles
 * -------------------------------------------
 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* * -------------------------------------------
 * Body with Flexbox for a sticky footer
 * -------------------------------------------
 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--hom-font-family-text);
  color: var(--hom-secondary-color-1);
  background-color: #0d0b0d;
  
  /* Estilo para la imagen de fondo */
  background-image: url('https://www.celebritycruises.com/blog/content/uploads/2022/11/art-museums-in-italy-doges-palace-venice-hero-cta-1920x890.jpg');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.login-page-content {
  flex-grow: 1; /* Esto hace que el contenido se expanda para llenar el espacio */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--hom-spacing-xl);
  margin: 0;
}

/*
 * -------------------------------------------
 * SECTION 3: Register Form - Glassmorphism Effect
 * -------------------------------------------
 */
.form-container {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  max-width: 700px;
  width: 100%;
  padding: var(--hom-spacing-l);
  animation: fadeIn 1s ease-in-out;
}

h2 {
  text-align: center;
  color: var(--hom-white);
  margin-bottom: var(--hom-spacing-l);
  font-family: var(--hom-font-family-title);
  font-size: var(--hom-font-size-l);
  font-weight: 900;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
}

.form-input {
  width: 100%;
  padding: var(--hom-spacing-m);
  margin-bottom: 2rem;
  border: none;
  border-radius: var(--hom-border-radius-base);
  background: rgba(255, 255, 255, 0.2);
  color: var(--hom-white);
  font-size: var(--hom-font-size-base);
  transition: all var(--hom-transition-duration);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  font-family: var(--hom-font-family-text);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
  outline: none;
}

.bottom-link {
  text-align: center;
  margin-top: var(--hom-spacing-m);
  font-size: var(--hom-font-size-base);
  color: var(--hom-white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 700;
  gap: 10px;
}

.bottom-link a {
  color: var(--hom-accent-color);
  text-decoration: none;
  font-weight: 900;
  transition: color var(--hom-transition-duration) ease-in-out;
  margin-left: 5px;
}

.bottom-link a:hover {
  text-decoration: underline;
  color: var(--hom-white);
}

/*
 * -------------------------------------------
 * SECTION 4: Button
 * -------------------------------------------
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: pointer;
  border: none;
  padding: 1.25rem var(--hom-spacing-l);
  border-radius: 50px;
  font-family: var(--hom-font-family-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.4s ease-in-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  background: linear-gradient(45deg, var(--hom-primary-color), var(--hom-accent-color));
  color: var(--hom-white);
  font-size: var(--hom-font-size-base);
  margin-bottom: 1.5rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, var(--hom-accent-color), var(--hom-primary-color));
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/*
 * -------------------------------------------
 * SECTION 5: Animations
 * -------------------------------------------
 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


.error-message-container {
    color: #a94442;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
}

.hidden {
    display: none;
}

/*
 * -------------------------------------------
 * SECTION 6: Responsive Design (Optimizado)
 * -------------------------------------------
 */
/* Ajustes para notebooks (hasta 1024px) */
@media (max-width: 1024px) {
  .login-page-content {
    padding: var(--hom-spacing-l);
  }
  .form-container {
    max-width: 600px;
    padding: var(--hom-spacing-l);
  }
}

/* Ajustes para tablets (hasta 768px) */
@media (max-width: 768px) {
  .form-container {
    max-width: 90%;
    padding: var(--hom-spacing-m);
    border-radius: 15px;
  }
  h2 {
    font-size: 2rem;
    margin-bottom: var(--hom-spacing-m);
  }
  .form-input {
    font-size: 1rem;
    padding: var(--hom-spacing-s);
    margin-bottom: var(--hom-spacing-l);
  }
  .btn {
    padding: var(--hom-spacing-s) var(--hom-spacing-m);
    font-size: 1rem;
  }
  .bottom-link {
    font-size: var(--hom-font-size-s);
  }
}

/* Ajustes para móviles (hasta 480px) */
@media (max-width: 480px) {
  .login-page-content {
  	padding: 0 var(--hom-spacing-m);
    padding-top: 190px;
  	padding-bottom: 190px;
  }

  .form-container {
    max-width: 100%;
    border-radius: 0;
    border: none;
    padding: var(--hom-spacing-l) var(--hom-spacing-m);
  }
  h2 {
    font-size: 1.8rem;
    margin-bottom: var(--hom-spacing-m);
  }
  .form-input {
    padding: 10px;
    font-size: 0.9rem;
    margin-bottom: var(--hom-spacing-m);
  }
  .btn {
    padding: 1rem;
    font-size: 0.9rem;
  }
  .bottom-link {
    font-size: 0.8rem;
  }
}