/* ==========================================================================
   CABLEADOESTRUCTURADO.AR - SYSTEM DESIGN & STYLESHEET
   Estética Moderna, Tipografía Inter, Glassmorphism, Micro-animaciones & SILO UI
   ========================================================================== */

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

:root {
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Primary Palette */
  --color-bg: #0b0f19;
  --color-bg-alt: #111827;
  --color-card: rgba(17, 24, 39, 0.85);
  --color-card-border: rgba(255, 255, 255, 0.12);

  --color-primary: #2563eb;
  --color-primary-hover: #3b82f6;
  --color-accent: #06b6d4;
  --color-accent-glow: rgba(6, 182, 212, 0.25);
  --color-emerald: #10b981;

  /* Neutral Text Colors */
  --color-text-main: #f3f4f6;
  --color-text-muted: #9ca3af;
  --color-text-dim: #6b7280;

  /* UI Accents */
  --gradient-hero: linear-gradient(135deg, #0b0f19 0%, #1e1b4b 50%, #0f172a 100%);
  --gradient-accent: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 16px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Print & PDF Export Color Fix */
html, body {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow-x: hidden;
}

/* Global SVG Safety Constraint (Prevents Giant Black Rectangles when SVG loads) */
svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--color-primary-hover);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

ul, ol {
  list-style: none;
}

/* Header & Glassmorphic Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-card-border);
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

.brand-logo .logo-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  background: var(--gradient-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.brand-logo .logo-icon svg {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  fill: #fff;
  display: block;
}

.brand-text .domain-tld {
  color: var(--color-accent);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.938rem;
  color: var(--color-text-muted);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.nav-btn {
  background: var(--gradient-accent);
  color: #fff !important;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

/* Mobile Toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text-main);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 4.5rem 1.5rem;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--color-card-border);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 30px;
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  line-height: 1.2;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-title span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-card-border);
}

.stat-item .stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.stat-item .stat-label {
  font-size: 0.813rem;
  color: var(--color-text-muted);
}

/* Glass Card Component */
.glass-card {
  background: var(--color-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Layout Main Container */
.main-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* Breadcrumbs */
.breadcrumbs-nav {
  margin-bottom: 2rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.breadcrumb-item a {
  color: var(--color-text-muted);
}

.breadcrumb-item a:hover {
  color: var(--color-accent);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--color-text-dim);
}

.breadcrumb-item.active {
  color: var(--color-text-main);
  font-weight: 500;
}

/* SILO Section Grids */
.silo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
}

.silo-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.silo-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.silo-icon svg {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
}

.silo-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  font-weight: 600;
}

.silo-card-text {
  font-size: 0.938rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.silo-links-list {
  border-top: 1px solid var(--color-card-border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.silo-links-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-main);
}

.silo-links-list a:hover {
  color: var(--color-accent);
  padding-left: 0.25rem;
}

/* Article & Content Formatting */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

.article-content {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-card-border);
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 700;
  color: #fff;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(37, 99, 235, 0.3);
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 1.5rem 0 0.75rem 0;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: #d1d5db;
  font-size: 1.031rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 0.5rem;
  color: #d1d5db;
}

/* Callout Boxes (Info/Warning/Tip) */
.callout-box {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin: 1.75rem 0;
  display: flex;
  gap: 1rem;
  border-left: 4px solid var(--color-primary);
  background: rgba(37, 99, 235, 0.08);
}

.callout-box.standard-tip {
  border-left-color: var(--color-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.callout-box.standard-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.callout-title {
  font-weight: 700;
  font-size: 0.938rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

/* Technical Tables */
.tech-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-card-border);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.938rem;
}

.tech-table th {
  background: #1f2937;
  color: #fff;
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-card-border);
}

.tech-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-card-border);
  color: #d1d5db;
}

.tech-table tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

/* Sidebar & TOC */
.sidebar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--color-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-card-border);
}

/* Forms (Contact Page) */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.938rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-glow);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.alert-message {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.938rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Footer */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-card-border);
  padding: 4rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.938rem;
  margin-top: 1rem;
  max-width: 360px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--color-card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.813rem;
  color: var(--color-text-dim);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #0b0f19;
    border-bottom: 1px solid var(--color-card-border);
    padding: 1.5rem;
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* Explicit PDF & Print Media Support */
@media print {
  body {
    background-color: #0b0f19 !important;
    color: #f3f4f6 !important;
  }
  .site-header {
    position: static !important;
    background: #0b0f19 !important;
  }
  .glass-card, .article-content, .sidebar-widget {
    background: #111827 !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: #f3f4f6 !important;
  }
  .hero-section {
    background: #0b0f19 !important;
  }
  svg {
    max-width: 24px !important;
    max-height: 24px !important;
  }
}
