/* ============================================
   P2P Industrial Theme - Clean & Professional
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #000055;
  --accent: #ff6600;
  --gray-bg: #f5f5f5;
  --text-main: #1a202c;
  --text-secondary: #4a5568;
  --border: #e2e8f0;
  --white: #ffffff;
  
  --font-base: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'Courier New', monospace;
  
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 42px;
  
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
}

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

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-main);
  background: var(--gray-bg);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
}

h1 { font-size: var(--text-3xl); margin-bottom: 1rem; }
h2 { font-size: var(--text-2xl); margin-bottom: 0.875rem; }
h3 { font-size: var(--text-xl); margin-bottom: 0.75rem; }

p { 
  margin-bottom: 1rem; 
  color: var(--text-secondary);
  text-align: justify;
  hyphens: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover { opacity: 0.8; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo img {
  height: 36px;
}

.navbar-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.navbar-nav a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 15px;
}

.navbar-nav a:hover {
  color: var(--primary);
  opacity: 1;
}

.navbar-cta {
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
}

.navbar-cta:hover {
  background: var(--primary);
  color: var(--white);
  opacity: 1;
}

.hero {
  background: var(--primary);
  color: var(--white);
  padding: 5rem 0 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 4rem;
  align-items: center;
}

.hero-content .overline {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.hero-content h1 {
  color: var(--white);
  font-size: var(--text-3xl);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-content .lead {
  font-size: var(--text-lg);
  line-height: 1.65;
  margin-bottom: 2.5rem;
  color: rgba(255,255,255,0.9);
  text-align: left;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual img {
  max-width: 85%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: #e55a00;
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.section {
  padding: 4.5rem 0;
}

.section-white {
  background: var(--white);
}

.section-gray {
  background: var(--gray-bg);
}

.section-dark {
  background: var(--primary);
  color: var(--white);
}

.section-centered {
  text-align: center;
}

.content-block {
  max-width: 780px;
  margin: 0 auto;
}

.content-block h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.content-block p {
  font-size: var(--text-base);
  line-height: 1.75;
}

.content-block .highlight {
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  margin-top: 1.5rem;
  font-size: 17px;
}

.insight-box {
  background: #fff5f0;
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.75rem;
  margin: 2rem auto;
  max-width: 680px;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--text-main);
  font-size: 17px;
  text-align: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.3s;
  text-align: left;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
}

.card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  text-align: justify;
}

.section-closing {
  text-align: center;
  margin-top: 2.5rem;
  font-weight: 600;
  color: var(--text-main);
  font-size: 17px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.footer {
  background: #0a0a0a;
  color: var(--white);
  padding: 3.5rem 0 1.5rem;
}

.footer-cta {
  text-align: center;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer-cta h2 {
  color: var(--white);
  font-size: var(--text-2xl);
  margin-bottom: 1.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-copy strong {
  color: var(--white);
  font-weight: 700;
}

.footer-social {
  display: flex;
  gap: 1.25rem;
}

.footer-social a {
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--white);
  opacity: 1;
}

/* === SERVICIOS === */
.service-block {
  max-width: 780px;
  margin: 0 auto;
}

.service-number {
  font-size: 110px;
  font-weight: 900;
  color: #ff6600;
  margin-bottom: 0.5rem;
  font-family: var(--font-base);
  line-height: 1;
}

.service-intro {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 2rem;
  color: var(--text-main);
  font-weight: 500;
}

.service-block h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--text-main);
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.service-list li {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  line-height: 1.65;
  color: #1a202c;
  font-weight: 500;
}

.service-list li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: #ff6600;
  font-weight: 700;
}

.service-note {
  background: #fff5f0;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-weight: 600;
  color: var(--text-main);
  font-size: 16px;
  font-style: italic;
}

@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .navbar-nav {
    gap: 1rem;
    font-size: 14px;
  }
  
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .service-number {
    font-size: 80px;
  }
}

/* Fix hover Acceso Clientes */
.navbar-cta:hover {
  background: var(--primary);
  color: var(--white) !important;
  opacity: 1;
}

/* === FIX FORMULARIO CUESTIONARIO === */
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a202c;
  font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-base);
  font-size: 16px;
  color: #1a202c;
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group select option {
  color: #1a202c;
  background: var(--white);
}

/* === ARTÍCULOS === */
.article-header {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.article-category {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.article-meta {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin-top: 0.75rem;
}

.article-content {
  max-width: 780px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.article-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.article-download {
  text-align: center;
  margin: 3rem 0;
  padding: 2rem;
  background: var(--gray-bg);
  border-radius: var(--radius);
}

.article-navigation {
  text-align: center;
}

/* === GRID DE ARTÍCULOS === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s;
  border: 1px solid var(--border);
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

.article-card-content {
  padding: 1.75rem;
}

.article-card-category {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.article-card h2 {
  font-size: 20px;
  margin-bottom: 0.75rem;
}

.article-card h2 a {
  color: var(--text-main);
  transition: color 0.2s;
}

.article-card h2 a:hover {
  color: var(--primary);
  opacity: 1;
}

.article-card p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-align: left;
}

.article-card-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.downloadable-badge {
  color: var(--accent);
  font-weight: 600;
}

.article-card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.article-card-link:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* === FIX WORD BREAK === */
.content-block p {
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

/* === FIX ARTÍCULOS === */

/* Header del artículo: fondo blanco, texto oscuro */
.section.section-dark.article-section-header {
  background: var(--white) !important;
}

.section.section-dark.article-section-header h1 {
  color: var(--text-main) !important;
}

.section.section-dark.article-section-header .article-meta {
  color: var(--text-secondary) !important;
}

/* Imagen del artículo: contenida, sin overflow */
.article-image {
  max-width: 400px !important;
  margin: 0 auto 2rem !important;
  display: block;
}

/* Card de artículo: imagen contenida */
.article-card-image {
  height: 180px !important;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.article-card-image img {
  max-width: 60% !important;
  max-height: 60% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Botón de descarga PDF: texto corto */
.article-download .btn {
  font-size: 14px;
}

/* === FIX CONTENIDO ARTÍCULO - TODO CLARO === */
.article-content,
.article-content p,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content ul,
.article-content ol,
.article-content li,
.article-content strong,
.article-content em {
  color: var(--text-main) !important;
  background: transparent !important;
}

.article-content h2,
.article-content h3 {
  color: #0a0e27 !important;
  font-weight: 700;
}

.article-content hr {
  border-color: var(--border);
  opacity: 0.3;
}

/* Asegurar fondo blanco en toda la sección */
.section.section-white {
  background: var(--white) !important;
}

/* === FIX BADGE CATEGORÍA === */
.article-category {
  background: var(--accent) !important;
  color: var(--white) !important;
}

.article-card-category {
  background: var(--accent) !important;
  color: var(--white) !important;
}

/* === FOOTER CONTACT === */
.footer-contact {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.footer-contact-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

.footer-contact-item a {
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-contact-item a:hover {
  color: var(--accent);
  opacity: 1;
}

.footer-contact-item span:not(.footer-contact-label) {
  color: rgba(255,255,255,0.8);
  font-size: 15px;
}

@media (max-width: 768px) {
  .footer-contact {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* === FOOTER REDISEÑADO === */
.footer {
  background: #0a0a0a;
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-cta {
  text-align: center;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 3rem;
}

.footer-cta h2 {
  color: var(--white);
  font-size: var(--text-2xl);
  margin-bottom: 1.5rem;
}

/* Grid de 4 columnas */
.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer-column h3 {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-column p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin: 0;
  text-align: left;
}

/* Links de navegación */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
  opacity: 1;
}

/* Lista de contacto */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  margin-bottom: 1.25rem;
}

.footer-contact-list strong {
  color: var(--white);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.375rem;
}

.footer-contact-list a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-contact-list a:hover {
  color: var(--accent);
  opacity: 1;
}

/* Redes sociales */
.footer-social-links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.footer-social-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-social-links a:hover {
  color: var(--white);
  opacity: 1;
}

.footer-social-links svg {
  flex-shrink: 0;
}

/* Copyright */
.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

.footer-bottom strong {
  color: var(--white);
  font-weight: 700;
}

.footer-bottom a {
  color: var(--accent);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 968px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}
