/* =========================================================
   Asesoría Alfarnate · styles.css
   Custom CSS that complements Tailwind CDN.
   Palette and typography defined here for direct CSS use.
   ========================================================= */

:root {
  --navy: #0F1E3D;
  --navy-dark: #0A1530;
  --blue-mid: #3B5C8C;
  --blue-light: #7BA3D1;
  --gray-bg: #F8FAFC;
  --body-text: #1F2937;
  --muted-text: #6B7280;
  --success: #10B981;
}

/* Base ----------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--body-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { line-height: 1.1; }

/* Header shadow on scroll ---------------------------------- */
#site-header.scrolled {
  box-shadow: 0 2px 16px rgba(15, 30, 61, 0.08);
}

/* Nav underline animation ---------------------------------- */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Hero background ------------------------------------------ */
.hero-bg {
  /* placeholder rural andaluz - replaced when hero-alfarnate-puente.jpg lands in /assets */
  background:
    linear-gradient(135deg, #2a3a5c 0%, #0F1E3D 50%, #0A1530 100%),
    url('assets/hero-alfarnate-puente.jpg');
  background-size: cover;
  background-position: center 40%;
  background-blend-mode: multiply;
}

/* Subtle topographic-style strokes overlay on hero for texture */
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(123, 163, 209, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(59, 92, 140, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

/* CTA section background */
.cta-bg {
  background:
    linear-gradient(135deg, #0F1E3D 0%, #3B5C8C 100%);
  background-size: cover;
  background-position: center;
}

/* Stat cards ----------------------------------------------- */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--gray-bg);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.25s ease;
}
.stat-card:hover {
  border-color: var(--blue-light);
  background: white;
  box-shadow: 0 8px 24px rgba(15, 30, 61, 0.06);
  transform: translateY(-2px);
}
.stat-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Service cards -------------------------------------------- */
.service-card {
  position: relative;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.service-card:hover {
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(15, 30, 61, 0.10);
  transform: translateY(-4px);
}
.service-card:hover::before {
  transform: scaleX(1);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--gray-bg);
  color: var(--navy);
  transition: all 0.3s ease;
}
.service-card:hover .service-icon {
  background: var(--navy);
  color: white;
}
.service-tag {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-mid);
}
.service-title {
  margin-top: 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.service-desc {
  margin-top: 0.75rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--body-text);
  flex: 1;
}
.service-link {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  transition: gap 0.25s ease, color 0.25s ease;
}
.service-link:hover {
  color: var(--blue-mid);
  gap: 12px;
}

/* Values --------------------------------------------------- */
.value-item { }
.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--blue-light);
}
.value-title {
  margin-top: 1.25rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: white;
}
.value-desc {
  margin-top: 0.6rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.65;
}

/* Form ----------------------------------------------------- */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--body-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input::placeholder { color: #9ca3af; }
.form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 30, 61, 0.10);
}
.form-input.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* Info icon (contact box) ---------------------------------- */
.info-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--blue-light);
}

/* Animations ----------------------------------------------- */
@keyframes bounce-slow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
.animate-bounce-slow {
  animation: bounce-slow 2.4s ease-in-out infinite;
}

/* Reveal on scroll ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive small-screen tweaks --------------------------- */
@media (max-width: 640px) {
  #whatsapp-fab {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
}

/* Print ---------------------------------------------------- */
@media print {
  #site-header, #whatsapp-fab, #cookies-banner { display: none !important; }
}
