/* =========================================
   TOUP.ES — OVERRIDE & FIX
   Cargado DESPUÉS de style.css en todas las páginas
   ========================================= */

/* ── NAV ── */
nav {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  height: 68px !important;
  background: #FFFFFF !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E4E4E0 !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 40px !important;
  box-shadow: none;
}

nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.07) !important; }

.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.nav-logo-mark {
  width: 34px !important; height: 34px !important; min-width: 34px;
  background: #0C0C0C !important; color: white !important;
  border-radius: 9px !important;
  font-family: 'Fraunces', serif; font-size: 17px; font-weight: 300; font-style: italic;
  display: flex !important; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.nav-logo-text { color: #0C0C0C !important; font-size: 15px !important; font-weight: 700 !important; letter-spacing: -0.2px; }

.nav-links a { color: #3A3A3A !important; font-size: 14px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: #0C0C0C !important; background: rgba(12,12,12,0.06) !important; }

.nav-phone {
  color: #0C0C0C !important;
  border: 1px solid #0C0C0C !important;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.nav-phone:hover { background: #0C0C0C !important; color: white !important; }

.nav-cta {
  background: #0C0C0C !important;
  color: white !important;
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
}
.nav-cta:hover { background: #333 !important; transform: translateY(-1px); }

nav img { max-height: 40px !important; width: auto !important; max-width: 160px !important; }

/* ── PAGE CONTACTO: nav oscuro ── */
.page-contacto nav { background: rgba(10,10,10,0.9) !important; border-bottom-color: rgba(255,255,255,0.07) !important; }
.page-contacto .nav-logo-mark { background: white !important; color: #0C0C0C !important; }
.page-contacto .nav-logo-text { color: white !important; }
.page-contacto .nav-links a { color: rgba(255,255,255,0.65) !important; }
.page-contacto .nav-links a:hover, .page-contacto .nav-links a.active { color: white !important; background: rgba(255,255,255,0.09) !important; }
.page-contacto .nav-phone { border-color: rgba(255,255,255,0.35) !important; color: white !important; }
.page-contacto .nav-phone:hover { background: white !important; color: #0C0C0C !important; }
.page-contacto .nav-cta { background: white !important; color: #0C0C0C !important; }
.page-contacto .nav-cta:hover { background: rgba(255,255,255,0.9) !important; }

/* ── FOOTER ── */
footer {
  background: #0C0C0C !important;
  padding: 56px 40px 40px;
  text-align: center;
}

.footer-inner {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.footer-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-logo-mark {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 17px; font-weight: 300; font-style: italic;
  border-radius: 6px; color: white; flex-shrink: 0;
}
.footer-logo-text { font-size: 15px; font-weight: 700; color: white; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.25s; }
.footer-links a:hover { color: white; }

.footer-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.footer-btn-primary {
  background: #1A6BFF; color: white;
  padding: 11px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; transition: background 0.25s;
}
.footer-btn-primary:hover { background: #1558d6; }

.footer-btn-outline {
  color: white; border: 1.5px solid rgba(255,255,255,0.35);
  padding: 10px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  text-decoration: none; transition: border-color 0.25s, background 0.25s;
}
.footer-btn-outline:hover { border-color: white; background: rgba(255,255,255,0.06); }

.footer-divider { width: 100%; border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 8px 0; }

.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; border-top: none; margin-top: 0; padding-top: 0; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.25s; }
.footer-legal a:hover { color: rgba(255,255,255,0.65); }

.footer-seo { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer-seo a { font-size: 11px; color: rgba(255,255,255,0.18); text-decoration: none; transition: color 0.25s; }
.footer-seo a:hover { color: rgba(255,255,255,0.45); }

.footer-copy { font-size: 12px; color: rgba(255,255,255,0.2); margin: 0; }

/* ── MOBILE ── */
@media (max-width: 767px) {
  nav { padding: 0 20px !important; }
  nav img { max-height: 36px !important; }
  .cases-grid { grid-template-columns: 1fr !important; }
  .blog-grid { grid-template-columns: 1fr !important; }
  .diferencias-grid { grid-template-columns: 1fr !important; }
  .metrics-grid { grid-template-columns: 1fr !important; }
  .case-tags { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .case-tag { white-space: nowrap; flex-shrink: 0; }
  footer { padding: 40px 20px 32px; }
  .footer-inner { gap: 20px; }
}

/* ── TABLET: 2 columnas ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .cases-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .blog-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── DESKTOP: 3 columnas ── */
@media (min-width: 1024px) {
  .cases-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ── CARD IMAGE HOVER ZOOM ── */
.case-card { overflow: hidden; }
.case-img {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: block; width: 100%; height: 200px; object-fit: cover;
}
.case-card:hover .case-img { transform: scale(1.05) !important; }
.case-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,0.13); }

/* ── PROGRESS BARS ── */
.progress-bar-wrap { background: rgba(255,255,255,0.1); border-radius: 100px; height: 3px; overflow: hidden; margin-top: 18px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #1a56ff, #60a5fa); border-radius: 100px; width: 0; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── METRIC CARD TOP BAR ── */
.metric-card { position: relative; overflow: hidden; }
.metric-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: #1a56ff; transform: scaleX(0); transform-origin: left; transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1); }
.metric-card.bar-done::after { transform: scaleX(1); }

/* ── STAGGER PROBLEMA ── */
.problema-item { opacity: 1; transform: none; transition: opacity 0.5s, transform 0.5s; }
.problema-item.stagger-hidden { opacity: 0; transform: translateX(-20px); }
.problema-item.stagger-visible { opacity: 1; transform: translateX(0); }

/* ── SMOOTH SCROLL ── */
html { scroll-behavior: smooth; }

/* ── BLOG CARD IMG ── */
.blog-card-img { height: 180px; overflow: hidden; display: block; flex-shrink: 0; }

/* ── SEO PAGE CONTENT ── */
.seo-content { max-width: 1160px; margin: 0 auto; padding: 80px 40px; }
.seo-content h2 { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 300; letter-spacing: -1px; margin-bottom: 16px; margin-top: 48px; color: #0C0C0C; }
.seo-content h2:first-child { margin-top: 0; }
.seo-content p { font-size: 16px; color: rgba(10,10,10,0.55); line-height: 1.85; margin-bottom: 16px; }
.seo-content ul { margin: 16px 0 24px 0; display: flex; flex-direction: column; gap: 10px; }
.seo-content li { font-size: 15px; color: rgba(10,10,10,0.6); padding-left: 20px; position: relative; line-height: 1.6; }
.seo-content li::before { content: '→'; position: absolute; left: 0; color: #1a56ff; font-weight: 700; }

/* ── BLOG POST ── */
.post-layout { max-width: 760px; margin: 0 auto; padding: 72px 40px; }
.post-layout h2 { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 300; letter-spacing: -0.5px; margin-top: 48px; margin-bottom: 14px; color: #0C0C0C; }
.post-layout h2:first-child { margin-top: 0; }
.post-layout p { font-size: 17px; color: rgba(10,10,10,0.58); line-height: 1.85; margin-bottom: 20px; }
.post-layout ul, .post-layout ol { margin: 0 0 24px 0; display: flex; flex-direction: column; gap: 10px; }
.post-layout li { font-size: 16px; color: rgba(10,10,10,0.6); padding-left: 22px; position: relative; line-height: 1.65; }
.post-layout li::before { content: '→'; position: absolute; left: 0; color: #1a56ff; font-weight: 700; }
.post-layout blockquote { border-left: 3px solid #1a56ff; padding: 16px 20px; background: #f7f6f3; border-radius: 0 8px 8px 0; margin: 32px 0; }
.post-layout blockquote p { color: rgba(10,10,10,0.7); font-style: italic; margin-bottom: 0; }

/* ── LEGAL CONTENT ── */
.legal-content { max-width: 760px; margin: 0 auto; padding: 72px 40px; }
.legal-content h2 { font-size: 22px; font-weight: 700; margin-top: 40px; margin-bottom: 12px; color: #0C0C0C; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { font-size: 15px; color: rgba(10,10,10,0.6); line-height: 1.8; margin-bottom: 12px; }
.legal-content ul { margin: 12px 0 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-content li { font-size: 15px; color: rgba(10,10,10,0.6); line-height: 1.7; list-style: disc; }
.legal-content a { color: #1a56ff; }

/* ── RESPONSIVE GENERAL ── */
@media (max-width: 768px) {
  .seo-content { padding: 56px 20px; }
  .post-layout { padding: 48px 20px; }
  .legal-content { padding: 48px 20px; }
}
