:root {
  --blue-dark: #1E2A38;
  --blue-light: #E5EEF8;
  --orange: #FF6A30;
  --orange-hover: #CC4F1F;
  --white: #ffffff;
  --gray-text: #47505C;
  --radius: 12px;
  --transition: 0.3s ease;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--gray-text);
  background-color: var(--white);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  font-family: 'Lato', sans-serif;
  color: var(--blue-dark);
  font-weight: 700;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles are inherited from ../assets/css/estilos.css */

/* Hero / Form Section */
.hero-section {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(to bottom, var(--blue-light) 0%, #fff 100%);
}

@media (max-width: 768px) {

  .hero-section,
  #hero-diagnostico {
    padding: 1rem 0 2rem 0 !important;
    /* ID para ganar especificidad */
    margin-top: -1rem;
    /* Hack para compensar posibles márgenes del body/main */
  }

  .hero-section h1 {
    font-size: 1.6rem;
    margin-top: 0 !important;
    /* Forzar sin margen arriba */
    margin-bottom: 0.5rem;
  }

  .hero-section p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  main {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.analysis-form {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input {
  flex: 1;
  padding: 15px 20px;
  border-radius: var(--radius);
  border: 2px solid #ddd;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.input-group input:focus {
  outline: none;
  border-color: var(--orange);
}

.btn-main {
  background: var(--orange);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-main:hover {
  background: var(--orange-hover);
}

/* Loader */
.loader-container {
  display: none;
  margin-top: 2rem;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Results Section */
#results-container {
  display: none;
  padding: 3rem 0;
}

.score-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 3rem;
  font-weight: bold;
  color: var(--blue-dark);
  border: 8px solid #ddd;
}

.score-good {
  border-color: #2ecc71;
  color: #2ecc71;
}

.score-avg {
  border-color: #f1c40f;
  color: #f1c40f;
}

.score-bad {
  border-color: #e74c3c;
  color: #e74c3c;
}

.traffic-lights {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.light {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.light-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ddd;
}

.light.success .light-dot {
  background: #2ecc71;
}

.light.warning .light-dot {
  background: #f1c40f;
}

.light.danger .light-dot {
  background: #e74c3c;
}

.estimate-box {
  background: #fff3e0;
  border-left: 5px solid var(--orange);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 42, 56, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-text);
}

.form-group {
  margin-bottom: 1.2rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .input-group {
    flex-direction: column;
  }

  .btn-main {
    width: 100%;
  }
}