/* ============================================================
   MAIN.CSS — Cal-Valley Forklift
   Variables globales, tipografía, reset, utilidades
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ── Variables de Marca ─────────────────────────────────── */
:root {
  --navy:        #0D1B2A;
  --navy-mid:    #1E3A5F;
  --yellow:      #F59E0B;
  --yellow-dark: #D97706;
  --yellow-light:#FEF3C7;
  --white:       #FFFFFF;
  --gray-50:     #F8FAFC;
  --gray-100:    #F1F5F9;
  --gray-200:    #E2E8F0;
  --gray-400:    #94A3B8;
  --gray-600:    #475569;
  --gray-800:    #1E293B;
  --red:         #EF4444;
  --green:       #10B981;

  --font-display: 'Montserrat', sans-serif;
  --font-body:    'Inter', sans-serif;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.12);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.15);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.20);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --transition: 0.25s ease;
}

/* ── Reset / Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* ── Tipografía ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { font-size: 1rem; color: var(--gray-600); }

/* ── Contenedor Central ─────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Sección Base ───────────────────────────────────────── */
.section {
  padding: 5rem 0;
}
.section-sm {
  padding: 3rem 0;
}

/* ── Section Heading ────────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}
.section-heading h2 {
  margin-bottom: 0.75rem;
}
.section-heading p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}
.section-heading .accent-line {
  width: 60px;
  height: 4px;
  background: var(--yellow);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

/* ── Botones ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--yellow);
  color: var(--navy);
  border-color: var(--yellow);
}
.btn-primary:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,158,11,0.35);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-sm {
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
}
.btn-lg {
  padding: 1.1rem 2.5rem;
  font-size: 1.05rem;
}

/* ── Cards Base ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* ── Badge ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-new   { background: #D1FAE5; color: #065F46; }
.badge-reman { background: #DBEAFE; color: #1E40AF; }
.badge-avail    { background: #D1FAE5; color: #065F46; }
.badge-reserved { background: #FEE2E2; color: #991B1B; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}
.form-control.error {
  border-color: var(--red);
}
.form-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 0.3rem;
  display: none;
}
.form-error.visible {
  display: block;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230D1B2A' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Checkbox / Radio Custom ────────────────────────────── */
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  accent-color: var(--yellow);
  width: 16px;
  height: 16px;
}
.radio-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

/* ── Stars ──────────────────────────────────────────────── */
.stars { color: var(--yellow); font-size: 1.1rem; letter-spacing: 2px; }

/* ── Alert Box ──────────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* ── Grid Helpers ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
}

/* ── Utilities ──────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-white   { color: var(--white) !important; }
.text-yellow  { color: var(--yellow); }
.text-navy    { color: var(--navy); }
.text-gray    { color: var(--gray-600); }
.bg-navy      { background: var(--navy); }
.bg-gray      { background: var(--gray-50); }
.bg-yellow    { background: var(--yellow); }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none !important; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ══════════════════════════════════════════════════════════
   PAGE HERO — Subpáginas (servicio.html / partes.html)
   USA LA FOTO DEL TRUCK COMO FONDO
   ══════════════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  padding: 7rem 0 4rem;
  overflow: hidden;
  background-image: url('../img/hero-truck.jpg');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,42,0.88) 0%, rgba(30,58,95,0.75) 100%);
  z-index: 0;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); }
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
}
.page-hero p {
  color: rgba(255,255,255,0.75);
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--yellow); }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ── Scroll reveal animation ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Expert Modal ─────────────────────────────────── */
.expert-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.expert-modal-overlay.open { display: flex; }
.expert-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.expert-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer; color: #666;
}
.expert-modal-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.expert-modal-box h3 {
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: 0.5rem; color: #1e3a5f;
}
.expert-modal-box p { color: #555; font-size: 0.95rem; margin-bottom: 1.25rem; }
.expert-opt-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; padding: 0.9rem 1.1rem;
  border: 2px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc; cursor: pointer; margin-bottom: 0.75rem;
  text-align: left; font-size: 1rem; font-weight: 600; color: #1e3a5f;
  transition: border-color 0.2s, background 0.2s;
}
.expert-opt-btn:hover { border-color: #1e3a5f; background: #f0f4ff; }
.expert-opt-btn span { font-size: 0.8rem; font-weight: 400; color: #777; margin-top: 0.2rem; }

/* ── ProFix Designer Credit ───────────────────────── */
.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.profix-credit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  justify-content: center;
}

.profix-credit-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.profix-credit-link:hover { color: #fff; }

.profix-logo {
  height: 80px;
  width: auto;
  border-radius: 3px;
  object-fit: contain;
}

.profix-sep {
  color: rgba(255,255,255,0.25);
}

.profix-contact {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s;
}

.profix-contact:hover { color: #fff; }

/* ── Brand Disclaimer ─────────────────────────────── */
.brand-disclaimer {
  background: #0a1628;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 0;
}
.brand-disclaimer p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
  line-height: 1.6;
  margin: 0;
  max-width: 900px;
  margin-inline: auto;
}
