/* ══════════════════════════════════════════════════
   MECÁNICA GRANADO — Estilos Web
   Diseño moderno 2026, modo oscuro/claro
   ══════════════════════════════════════════════════ */

:root {
  --primary: #e67e22;
  --primary-dark: #d35400;
  --primary-light: #f39c12;
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --text: #e8e8e8;
  --text-muted: #8888aa;
  --border: #2a2a45;
  --whatsapp: #25D366;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ═══ HEADER ═══ */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(15,15,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s;
}

.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.logo { text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo__icon { font-size: 24px; }
.logo__text { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.2; }
.logo__text strong { color: var(--primary); font-size: 16px; }

.nav { display: flex; gap: 24px; }
.nav__link {
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color 0.3s; position: relative;
}
.nav__link:hover, .nav__link.active { color: var(--primary); }

.hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer;
}
.hamburger span {
  width: 24px; height: 2px; background: var(--text); border-radius: 2px;
  transition: 0.3s;
}

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; padding-top: 64px;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
}
.hero__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(230,126,34,0.08) 0%, transparent 60%);
}
.hero__inner { position: relative; text-align: center; padding: 60px 0; }
.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 20px;
}
.hero__title span { color: var(--primary); }
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-muted);
  max-width: 600px; margin: 0 auto 36px;
}
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; border: none; transition: all 0.3s;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn--whatsapp { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn--whatsapp:hover { border-color: var(--whatsapp); color: var(--whatsapp); }
.btn--outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--full { width: 100%; justify-content: center; }

/* ═══ SECTION ═══ */
.section { padding: 100px 0; }
.section--dark { background: var(--bg-card); }
.section__title {
  text-align: center; font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; margin-bottom: 12px;
}
.section__title span { color: var(--primary); }
.section__subtitle {
  text-align: center; color: var(--text-muted);
  max-width: 600px; margin: 0 auto 48px; font-size: 15px;
}

/* ═══ SERVICIOS ═══ */
.servicios__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.servicio {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all 0.3s; cursor: default;
}
.servicio:hover { background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.servicio__icon { font-size: 32px; margin-bottom: 12px; }
.servicio__name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.servicio__desc { font-size: 13px; color: var(--text-muted); }

/* ═══ FEATURES ═══ */
.features__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.feature { text-align: center; padding: 24px; }
.feature__icon { font-size: 40px; margin-bottom: 12px; }
.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 13px; color: var(--text-muted); }

/* ═══ FORMULARIO ═══ */
.form { max-width: 700px; margin: 0 auto; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__group { margin-bottom: 16px; }
.form__group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.form__group input, .form__group select, .form__group textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px;
  font-family: inherit; transition: border 0.3s;
}
.form__group input:focus, .form__group select:focus, .form__group textarea:focus {
  outline: none; border-color: var(--primary);
}
.form__group--checkbox { display: flex; align-items: center; gap: 8px; }
.form__group--checkbox input { width: auto; }
.form__group--checkbox label { margin-bottom: 0; }
.form__group--checkbox a { color: var(--primary); }

.form__success {
  text-align: center; padding: 40px;
  background: var(--bg-card); border-radius: var(--radius);
  max-width: 500px; margin: 0 auto;
}
.form__success-icon { font-size: 48px; margin-bottom: 12px; }
.form__success h3 { margin-bottom: 8px; }

/* ═══ OPINIONES ═══ */
.opiniones__badge {
  text-align: center; margin-bottom: 40px;
}
.opiniones__badge a {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg); padding: 12px 24px;
  border-radius: 8px; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); transition: 0.3s;
}
.opiniones__badge a:hover { border-color: var(--primary); }
.opiniones__badge img { height: 24px; }
.opiniones__grid { display: grid; gap: 16px; max-width: 700px; margin: 0 auto; }
.opinion {
  background: var(--bg); padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.opinion__header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.opinion__stars { color: var(--primary-light); font-size: 14px; letter-spacing: 2px; }
.opinion__name { font-size: 13px; color: var(--text-muted); }
.opinion__text { font-size: 14px; line-height: 1.5; }

/* ═══ BLOG ═══ */
.blog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.blog__card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 0 24px 0;
  transition: all 0.3s; cursor: default;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.blog__card:hover { background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.blog__card--importante {
  border-color: var(--primary); position: relative;
  background: linear-gradient(135deg, var(--bg) 0%, rgba(230,126,34,0.05) 100%);
}
.blog__card--importante::before {
  content: "📢 IMPORTANTE"; position: absolute; top: 12px; right: 12px;
  background: var(--primary); color: #fff; font-size: 10px;
  font-weight: 700; padding: 3px 10px; border-radius: 4px;
  letter-spacing: 1px; z-index: 1;
}
.blog__img {
  width: 100%; height: 140px; object-fit: cover;
  display: block; border-radius: 0;
}
.blog__cat, .blog__fecha, .blog__titulo, .blog__resumen, .blog__btn { margin-left: 20px; margin-right: 20px; }
.blog__cat {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--primary); font-weight: 600; margin-top: 16px; margin-bottom: 6px;
}
.blog__fecha { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.blog__titulo { font-size: 16px; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.blog__resumen { font-size: 13px; color: var(--text-muted); line-height: 1.6; flex: 1; }
.blog__btn {
  align-self: flex-start; margin-top: 16px;
  background: none; border: 1px solid var(--primary); color: var(--primary);
  padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: 0.3s;
}
.blog__btn:hover { background: var(--primary); color: #fff; }

/* ═══ MODAL POST ═══ */
.modal__post-body { font-size: 14px; line-height: 1.8; color: var(--text-muted); text-align: justify; }
.modal__post-body p { margin-bottom: 14px; }
.modal__post-body p { text-indent: 1.5em; }
.modal__post-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; font-size: 13px; color: var(--text-muted); }
.modal__post-meta .blog__cat { margin: 0; }
.modal__post-img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 16px; }

/* ═══ NEWSLETTER ═══ */
.newsletter { max-width: 500px; margin: 0 auto; text-align: center; }
.newsletter__inner { display: flex; gap: 8px; margin-bottom: 12px; }
.newsletter__input {
  flex: 1; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px;
}
.newsletter__input:focus { outline: none; border-color: var(--primary); }
.newsletter__check { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.newsletter__check input { width: auto; }
.newsletter__success { text-align: center; font-size: 18px; padding: 16px; color: #27ae60; }
.newsletter__unsub { text-align: center; margin-top: 16px; }
.newsletter__unsub a { color: var(--text-muted); font-size: 13px; }

/* ═══ FOOTER ═══ */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 60px 0 20px; }
.footer__inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px; }
.footer__col h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--primary); }
.footer__col p { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.footer__col a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.footer__col a:hover { color: var(--primary); }
.footer__social { display: flex; gap: 12px; }
.footer__social a { font-size: 20px; }
.footer__bottom { text-align: center; padding-top: 32px; margin-top: 32px; border-top: 1px solid var(--border); }
.footer__bottom p { font-size: 12px; color: var(--text-muted); }
.footer__bottom a { color: var(--text-muted); text-decoration: none; }
.footer__bottom a:hover { color: var(--primary); }

/* ═══ MODAL ═══ */
.modal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7); align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal__content {
  background: var(--bg-card); padding: 32px; border-radius: var(--radius);
  max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto;
  position: relative;
}
.modal__close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--text); font-size: 20px;
  cursor: pointer;
}
.modal__content h2 { margin-bottom: 16px; color: var(--primary); }
.modal__content h3 { font-size: 14px; color: var(--primary); margin: 16px 0 6px; }
.modal__content h4 { font-size: 13px; color: var(--text); font-weight: 600; margin: 12px 0 4px; }
.modal__content p { font-size: 14px; line-height: 1.7; color: var(--text-muted); text-align: justify; }
.modal__content ul { margin: 8px 0 8px 20px; }
.modal__content li { font-size: 14px; line-height: 1.7; color: var(--text-muted); }
.modal__content a { color: var(--primary); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .servicios__grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav {
    display: none; flex-direction: column; position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(15,15,26,0.98); backdrop-filter: blur(12px);
    padding: 16px 24px; z-index: 999; overflow-y: auto;
    gap: 0;
  }
  body.nav-open { overflow: hidden; }
  .nav.open { display: flex; }
  .nav__link {
    font-size: 17px; padding: 14px 8px; border-bottom: 1px solid rgba(42,42,69,0.5);
    word-break: break-word; hyphens: auto; width: 100%;
  }
  .hamburger { display: flex; }
  .hero { min-height: auto; padding: 100px 0 60px; }
  .hero__title { font-size: 1.8rem; }
  .hero__subtitle { font-size: 1rem; margin-bottom: 28px; }
  .section { padding: 60px 0; }
  .form__row { grid-template-columns: 1fr; }
  .newsletter__inner { flex-direction: column; }
  .newsletter__input { width: 100%; }
  .opiniones__badge a { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 600px) {
  .servicios__grid { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__social { justify-content: center; }
  .hero__cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .hero__title { font-size: 1.5rem; }
  .section__title { font-size: 1.3rem; }
  .modal__content { padding: 24px; width: 95%; }
}

@media (max-width: 400px) {
  .hero { padding: 80px 0 40px; }
  .hero__title { font-size: 1.3rem; }
  .section { padding: 40px 0; }
}
