/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #b81530;
  --primary-light: #c92940;
  --primary-lighter: #d43c52;
  --accent: #ffffff;
  --accent-dark: #f0f0f0;
  --accent-light: #f5f5f5;
  --dark: #1a1a1a;
  --light: #f5f5f5;
  --light-gray: #efefef;
  --text: #333;
  --text-light: #666;
  --border: #e0e0e0;
  --white: #ffffff;
}

/* Avatar common */
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Placeholder initials inside avatar when no image */
.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}

/* Larger initials for profile-summary card */
.profile-avatar .avatar-placeholder { font-size: 2.25rem; }

/* Smaller initials for navbar contexts when we end up using a div fallback */
#profile-dropdown .avatar-placeholder { width:40px; height:40px; font-size:0.95rem; border-radius:50%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  /*background: linear-gradient(135deg, #b81530 0%, #c92940 100%);*/
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark);
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

h3 {
  font-size: 1.75rem;
}

p {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* Index Main */
.index-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2.5rem 1.25rem;
  gap: 2.5rem;
}

/* Logo Section */
.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInDown 0.8s ease-out;
}

.pictet-logo-index {
  max-width: 12.5rem;
  height: auto;
  filter: drop-shadow(0 0.25rem 0.625rem rgba(0, 0, 0, 0.2));
}

/* Buttons Section */
.buttons-section {
  text-align: center;
  max-width: 37.5rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.buttons-section h1 {
  color: var(--white);
  margin-bottom: 0.9375rem;
  font-size: 2.5rem;
}

.buttons-section p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
}

/* Buttons */
.buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: slideDown 0.8s ease-out 0.4s both;
}

.btn {
  padding: 0.875rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.25rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  transition: all 0.3s ease;
  text-decoration: none;
  letter-spacing: 0.03125rem;
  text-transform: uppercase;
}

.btn i {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-login {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
  background: var(--light-gray);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5625rem rgba(0, 0, 0, 0.3);
}

.btn-register {
  background: var(--white);
  color: var(--primary);
}

.btn-register:hover {
  background: var(--light-gray);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5625rem rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  box-shadow: 0 0.25rem 0.9375rem rgba(184, 21, 48, 0.3);
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5625rem rgba(184, 21, 48, 0.4);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
}

.btn-secondary {
  background: var(--light-gray);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  transform: translateY(-0.125rem);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-1.875rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.875rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.75rem);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  border: none;
  background: transparent;
  color: var(--accent);
  opacity: 0.8;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: bounce 2s infinite;
  transition: opacity 0.3s ease;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.0625rem;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator i {
  width: 1.75rem;
  height: 1.75rem;
}

/* Hero Section (para otras páginas si es necesario) */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../public/fondo_hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184, 21, 48, 0.75) 0%, rgba(184, 21, 48, 0.6) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 50rem;
  padding: 2.5rem;
  animation: fadeInUp 1s ease-out;
}

.icon {
  width: 4.375rem;
  height: 4.375rem;
  margin-bottom: 1.875rem;
  color: var(--accent);
  animation: slideDown 0.8s ease-out;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  animation: slideDown 0.8s ease-out 0.1s both;
}

.hero p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 3.125rem;
  animation: slideDown 0.8s ease-out 0.2s both;
}

/* Auth Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  padding: 1.25rem;
}

.auth-card {
  background: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 0.625rem 2.5rem rgba(184, 21, 48, 0.1);
  width: 100%;
  max-width: 26.25rem;
  padding: 3.125rem 2.5rem;
  animation: fadeInUp 0.6s ease-out;
  border-top: 0.25rem solid var(--primary);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header i {
  width: 3.125rem;
  height: 3.125rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.auth-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.625rem;
  color: var(--primary);
}

.auth-header p {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.0625rem;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.875rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: var(--white);
  color: var(--text);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 0.1875rem rgba(184, 21, 48, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

.auth-footer {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.auth-footer p {
  font-size: 0.95rem;
  color: var(--text-light);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-footer a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 48rem) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .index-main {
    padding: 1.875rem 1.25rem;
    gap: 1.875rem;
  }

  .buttons-section h1 {
    font-size: 1.75rem;
  }

  .buttons-section p {
    font-size: 1rem;
  }

  .pictet-logo-index {
    max-width: 9.375rem;
  }

  .buttons {
    flex-direction: column;
    gap: 0.9375rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .auth-card {
    padding: 2.5rem 1.25rem;
    max-width: 100%;
  }
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.75rem;
  }

  .index-main {
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .buttons-section h1 {
    font-size: 1.5rem;
  }

  .buttons-section p {
    font-size: 0.95rem;
  }

  .pictet-logo-index {
    max-width: 7.5rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .auth-card {
    padding: 1.875rem 1.25rem;
  }
}

/* Utility Classes */
.container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}