/* ==============================================
   VARIABLES DE COLORES - Cartas de Noe
   Fuentes Carbona y Benton cargadas desde HTML
   ============================================== */

:root {
  /* Colores principales de la marca */
  --color-primary: #566687;        /* Azul grisáceo */
  --color-primary-dark: #3d4a5f;   /* Azul oscuro para hover */
  --color-coral: #e8a481;          /* Coral/naranja de la invitación */
  --color-coral-dark: #d89070;     /* Coral oscuro para hover */
  --color-secondary: #ffed788;     /* Amarillo suave */
  --color-accent: #b6e1f9;         /* Azul claro */
  --color-accent-green: #cae3ca;   /* Verde suave */

  /* Colores de texto */
  --color-text: #566687;           /* Azul grisáceo para texto principal */
  --color-text-light: #7a8ba3;     /* Azul más claro para texto secundario */

  /* Colores de fondo */
  --color-bg: #566687;             /* Fondo principal con el azul grisáceo */
  --color-bg-light: #F8F9FA;
  --color-border: #E0E5EA;

  /* Colores de estado */
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;

  /* Fuentes - Con fallbacks de Google Fonts */
  --font-heading: 'carbona', 'Montserrat', sans-serif;
  --font-body: 'benton-sans', 'Work Sans', sans-serif;
}

/* ==============================================
   RESET Y ESTILOS BASE
   ============================================== */

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==============================================
   LAYOUT PRINCIPAL - PANTALLA COMPLETA AZUL
   ============================================== */

.main-content {
  min-height: 100vh;
  background-color: var(--color-bg);
  background-image: url('assets/fondo.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

/* Animación de estrellas individuales - solo para desktop */
@media (min-width: 769px) {
  /* Estrella 1 - posiciones variadas */
  .main-content::before {
    content: '';
    position: absolute;
    top: 45%;
    left: 0.5%;
    width: 100px;
    height: 100px;
    background-image: url('assets/estrella 1.png');
    background-size: contain;
    background-repeat: no-repeat;
    animation: twinkle1 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
  }

  .main-content::after {
    content: '';
    position: absolute;
    top: -10%;
    left: 7%;
    width: 300px;
    height: 300px;
    background-image: url('assets/estrella 2.png');
    background-size: contain;
    background-repeat: no-repeat;
    animation: twinkle2 4s ease-in-out infinite 1s;
    pointer-events: none;
    z-index: 0;
  }

  .content-card {
    position: relative;
    z-index: 1;
  }

  .footer {
    position: relative;
    z-index: 1;
  }
}

@keyframes twinkle1 {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes twinkle2 {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(5deg);
  }
}

@keyframes twinkle3 {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.08) rotate(-3deg);
  }
}

@keyframes twinkle4 {
  0%, 100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.12);
  }
}

/* ==============================================
   CARD CONTENEDORA PRINCIPAL
   ============================================== */

.content-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  padding: 2.5rem 3rem;
  max-width: 1200px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  position: relative;
}

/* ==============================================
   LADO IZQUIERDO - INFORMACIÓN DEL EVENTO
   ============================================== */

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.hero-content {
  max-width: 100%;
}

.logo-container {
  margin-bottom: 1rem;
}

.event-logo {
  max-width: 150px;
  height: auto;
  filter: brightness(0) saturate(100%) invert(68%) sepia(26%) saturate(721%) hue-rotate(327deg) brightness(96%) contrast(91%);
}

.hero-badge {
  display: block;
  background-color: transparent;
  color: var(--color-text);
  padding: 0;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0;
  border: none;
  letter-spacing: 0.3px;
  text-align: left;
}

.hero-description {
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.title-line {
  display: block;
}

.title-line-top {
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-text);
}

.title-line-bottom {
  font-size: 4rem;
  font-weight: 400;
  margin-top: 0.5rem;
  color: var(--color-coral);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  font-weight: 400;
}

.event-meta {
  display: flex;
  gap: 3rem;
  margin-bottom: 2rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--color-coral);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.meta-value {
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 400;
}

.meta-value-small {
  font-size: 0.7rem;
  margin-top: -10px;
}

/* ==============================================
   LADO DERECHO - FORMULARIO
   ============================================== */

.form-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-card {
  padding: 0;
}

.form-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  text-align: left;
}

.form-description {
  color: var(--color-text-light);
  text-align: left;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 2px solid #e0e5ea;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  background-color: white;
  color: var(--color-text);
}

.form-group input::placeholder,
.form-group select::placeholder {
  color: #b0b8c3;
  opacity: 1;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(86, 102, 135, 0.08);
}

.form-group input.error {
  border-color: var(--color-error);
}

.form-group input.error:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.error-message {
  display: none;
  color: var(--color-error);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* ==============================================
   BOTÓN DE ENVÍO
   ============================================== */

.submit-btn {
  width: 100%;
  background-color: var(--color-coral);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
  background-color: var(--color-coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(232, 164, 129, 0.3);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==============================================
   MENSAJES DE ÉXITO Y ERROR
   ============================================== */

.success-message {
  display: none;
  background-color: #F0FDF4;
  border: 2px solid var(--color-success);
  color: #166534;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 2rem;
  align-items: flex-start;
  gap: 1rem;
}

.success-message svg {
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.success-message strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.success-message p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.error-banner {
  display: none;
  background-color: #FEF2F2;
  border: 2px solid var(--color-error);
  color: #991B1B;
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* ==============================================
   FOOTER
   ============================================== */

.footer {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-primary);
  text-align: center;
  padding: 0.2rem 1rem 0.7rem 1rem;
  font-size: 0.85rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p {
  margin: 0 0 0.5rem 0;
}

.footer-credits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-primary);
  margin-top: 0.5rem;
}

.footer-logo {
  height: 10px;
  width: auto;
  opacity: 0.8;
}

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 1024px) {
  .content-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .title-line-top {
    font-size: 1.75rem;
  }

  .title-line-bottom {
    font-size: 3.25rem;
  }

  .footer {
    position: relative;
    transform: none;
    left: 0;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .title-line-top {
    font-size: 1.8rem;
  }

  .title-line-bottom {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .event-logo {
    max-width: 220px;
  }

  .form-card {
    padding: 2rem 1.5rem;
  }

  .form-title {
    font-size: 1.75rem;
  }

  .event-meta {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-tags {
    gap: 0.75rem;
  }

  .tag {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .title-line-top {
    font-size: 1.5rem;
  }

  .title-line-bottom {
    font-size: 2.5rem;
  }

  .event-logo {
    max-width: 180px;
  }

  .form-card {
    padding: 1.5rem 1.25rem;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .form-section {
    padding: 2rem 1rem;
  }
}
