/* =====================================================
   JEGASA – Estilos principales
   ===================================================== */

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

:root {
  --primary:       hsl(207, 72%, 38%);
  --primary-light: hsl(207, 72%, 48%);
  --foreground:    hsl(210, 29%, 20%);
  --background:    hsl(0, 0%, 100%);
  --secondary:     hsl(0, 0%, 95%);
  --muted:         hsl(210, 10%, 50%);
  --accent:        hsl(0, 79%, 50%);
  --accent-fg:     hsl(0, 0%, 100%);
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: 'Montserrat', sans-serif;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 55, 75, 0.35);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 640px;
  width: 90%;
  margin: 0 auto;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-logo img {
  width: 80%;
  max-width: 320px;
  height: auto;
}

.hero-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
}

.hero-logo-sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-family: 'Montserrat', sans-serif;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  padding-left: 0.5rem;
  margin-left: 0.25rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-accent:hover { opacity: 0.9; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  padding: 0.75rem 2.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-primary:hover { opacity: 0.9; }

/* ===== QUOTE ===== */
.quote-section {
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem;
  background: var(--background);
}

.quote-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.quote-inner img {
  width: clamp(120px, 20vw, 250px);
  height: auto;
  object-fit: contain;
}

.quote-text {
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.75rem);
  font-weight: 600;
  font-style: italic;
  text-align: center;
  max-width: 420px;
  line-height: 1.4;
}

/* ===== QUOTE 2 ===== */
.quote-section2 {
  background: var(--background);
  width: 100%;
}

.quote-text2 {
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  line-height: 1.5;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.5rem;
  font-size: clamp(0.8rem, 2.2vw, 1.05rem);
  font-weight: 500;
}

/* ===== CONTACT ===== */
.contact-section {
  background: var(--secondary);
  padding: clamp(2rem, 5vw, 4rem) 1.5rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0;
  border: none;
  border-bottom: 1px solid rgba(120, 120, 120, 0.3);
  background: transparent;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s;
  /* Evitar zoom en iOS al hacer focus */
  font-size: max(1rem, 16px);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group textarea {
  border: 1px solid rgba(120, 120, 120, 0.2);
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
  min-height: 100px;
}

.contact-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.25rem;
}

.contact-info {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.9;
  flex: 1 1 200px;
}

/* ===== FEEDBACK MESSAGES ===== */
.success-msg {
  background: hsl(145, 63%, 42%);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.error-msg {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

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

/* Tablet */
@media (max-width: 900px) {
  .quote-inner {
    gap: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  /* Hero: solo mostrar la primera imagen de fondo */
  .hero-bg {
    grid-template-columns: 1fr;
  }

  .hero-bg img:nth-child(2),
  .hero-bg img:nth-child(3) {
    display: none;
  }

  .hero-logo-sub {
    display: none;
  }

  .hero-logo-text {
    font-size: 1.75rem;
  }

  .hero-logo img {
    width: 75%;
  }

  /* Quote: apilar verticalmente */
  .quote-inner {
    flex-direction: column;
    gap: 1.25rem;
  }

  .quote-inner img {
    width: clamp(100px, 40vw, 180px);
  }

  /* Separar botón e info en columna */
  .contact-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  /* Quote 2: wrapping natural en pantallas pequeñas */
  .quote-text2 {
    padding: 0.75rem 1rem;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 380px) {
  .hero-content {
    padding: 1.5rem 1rem;
  }
}
