/* ═══════════════════════════════════════════════════════════════
   pdfcortex.css  —  Estilos compartidos de PDFCortex
   Usado por: index.html, quitar-fondo.html
   ═══════════════════════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  /* Colores primarios */
  --pc-primary:           #007bff;
  --pc-primary-dark:      #0056b3;
  --pc-primary-darker:    #004494;
  --pc-primary-container: #e3f2fd;
  --pc-on-primary:        #ffffff;
  --pc-on-primary-container: #0056b3;
  --pc-secondary:         #00d4ff;
  --pc-secondary-container: #e0f7fa;

  /* Superficies */
  --pc-background:   #f4f7f6;
  --pc-surface:      #ffffff;
  --pc-surface-1:    #edf3f0;
  --pc-surface-2:    #e2eaea;

  /* Texto */
  --pc-on-surface:     #1a202c;
  --pc-on-surface-var: #44474e;
  --pc-muted:          #64748b;
  --pc-subtle:         #94a3b8;

  /* Bordes */
  --pc-outline:     #74777f;
  --pc-outline-var: #e2e8f0;

  /* Estados */
  --pc-error:           #dc2626;
  --pc-error-container: #fee2e2;
  --pc-success:         #16a34a;
  --pc-success-container: #dcfce7;
  --pc-warning:         #7c5800;
  --pc-warning-container: #ffdf99;

  /* Radios */
  --pc-r-xs:   4px;
  --pc-r-sm:   8px;
  --pc-r-md:   12px;
  --pc-r-lg:   16px;
  --pc-r-xl:   28px;
  --pc-r-full: 50px;

  /* Sombras */
  --pc-shadow-sm: 0 1px 2px rgba(0,0,0,.10), 0 1px 3px 1px rgba(0,0,0,.06);
  --pc-shadow-md: 0 1px 2px rgba(0,0,0,.10), 0 2px 6px 2px rgba(0,0,0,.08);
  --pc-shadow-lg: 0 4px 8px 3px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.10);

  /* Alias de compatibilidad – index.html usa --md-sys-color-* */
  --md-sys-color-primary:           var(--pc-primary);
  --md-sys-color-on-primary:        var(--pc-on-primary);
  --md-sys-color-primary-container: var(--pc-primary-container);
  --md-sys-color-on-primary-container: var(--pc-on-primary-container);
  --md-sys-color-secondary:         var(--pc-secondary);
  --md-sys-color-background:        var(--pc-background);
  --md-sys-color-on-background:     var(--pc-on-surface);
  --md-sys-color-surface:           var(--pc-surface);
  --md-sys-color-on-surface:        var(--pc-on-surface);
  --md-sys-color-outline:           var(--pc-outline-var);
  --md-sys-color-error:             var(--pc-error);
  --md-sys-color-success:           var(--pc-success);

  /* Alias de compatibilidad – quitar-fondo.html usa --md-* */
  --md-primary:           var(--pc-primary);
  --md-on-primary:        var(--pc-on-primary);
  --md-primary-container: var(--pc-primary-container);
  --md-on-primary-container: var(--pc-on-primary-container);
  --md-secondary:         var(--pc-secondary);
  --md-secondary-container: var(--pc-secondary-container);
  --md-surface:           var(--pc-background);
  --md-surface-1:         var(--pc-surface-1);
  --md-surface-2:         var(--pc-surface-2);
  --md-on-surface:        var(--pc-on-surface);
  --md-on-surface-var:    var(--pc-on-surface-var);
  --md-outline:           var(--pc-outline);
  --md-outline-var:       var(--pc-outline-var);
  --md-error:             var(--pc-error);
  --md-error-container:   var(--pc-error-container);
  --md-success:           var(--pc-success);
  --md-success-container: var(--pc-success-container);
  --md-warning:           var(--pc-warning);
  --md-warning-container: var(--pc-warning-container);
  --md-shape-xs:   var(--pc-r-xs);
  --md-shape-sm:   var(--pc-r-sm);
  --md-shape-md:   var(--pc-r-md);
  --md-shape-lg:   var(--pc-r-lg);
  --md-shape-xl:   var(--pc-r-xl);
  --md-shape-full: var(--pc-r-full);
  --md-elev-1:     var(--pc-shadow-sm);
  --md-elev-2:     var(--pc-shadow-md);
  --md-elev-3:     var(--pc-shadow-lg);
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BODY ── */
body {
  font-family: 'Roboto', system-ui, sans-serif;
  background: var(--pc-background);
  color: var(--pc-on-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── MATERIAL ICONS ── */
.material-icons-round {
  font-size: 20px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER  (soporta .header-inner de index y .top-app-bar de QF)
   ═══════════════════════════════════════════════════════════════ */
header,
.top-app-bar {
  width: 100%;
  background: var(--pc-surface);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--pc-outline-var);
}

/* index.html usa .header-inner */
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* quitar-fondo.html usa .top-app-bar-inner */
.top-app-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── LOGO – index.html (.logo-container / .logo-icon) ── */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-wrapper {
  position: relative;
  width: 44px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  width: 44px;
  height: 52px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,123,255,.3);
  transition: all 0.3s ease;
}

.logo-container:hover .logo-icon {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,123,255,.4);
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  background: white;
  border-radius: 6px;
  opacity: 0.95;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 14px; height: 14px;
  background: linear-gradient(135deg, #00d4ff 0%, #007bff 100%);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  border-radius: 0 6px 0 0;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span {
  background: linear-gradient(135deg, #007bff 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LOGO – quitar-fondo.html (.app-bar-logo / .logo-icon-md) ── */
.app-bar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo-icon-md {
  position: relative;
  width: 44px;
  height: 52px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,123,255,.3);
  transition: all 0.3s ease;
}

.app-bar-logo:hover .logo-icon-md {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,123,255,.4);
}

.logo-icon-md::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  background: white;
  border-radius: 6px;
  opacity: 0.95;
}

.logo-icon-md::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 14px; height: 14px;
  background: linear-gradient(135deg, #00d4ff 0%, #007bff 100%);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  border-radius: 0 6px 0 0;
}

/* Logo lines (compartido) */
.logo-lines {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.logo-line {
  height: 3px;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 2px;
  opacity: 0.7;
}

/* índices de línea – index.html usa :nth-child */
.logo-line:nth-child(1) { width: 100%;  opacity: 0.9; }
.logo-line:nth-child(2),
.logo-line:nth-child(3) { width: 85%;   opacity: 0.6; }
.logo-line:nth-child(4) { width: 60%;   opacity: 0.4; }

/* Título del logo en quitar-fondo.html */
.app-bar-title {
  font-family: 'Roboto', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--pc-on-surface);
}

.app-bar-title span { color: var(--pc-primary); }

/* ── NAV BOTONES (mdc-button) ── */
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mdc-button {
  display: inline-flex;
  align-items: center;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: 0.25px;
  padding: 8px 16px;
  border-radius: var(--pc-r-xs);
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: var(--pc-on-surface);
  background: transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.mdc-button:hover {
  background: rgba(0,0,0,.06);
}

.mdc-button--raised {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,123,255,.2);
}

.mdc-button--raised:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
  box-shadow: 0 4px 16px rgba(0,123,255,.3);
  transform: translateY(-1px);
}

/* ── BOTÓN DE IDIOMA ── */
.lang-btn {
  font-family: 'Roboto', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--pc-r-sm);
  border: 1px solid var(--pc-outline-var);
  background: transparent;
  cursor: pointer;
  color: var(--pc-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.lang-btn:hover {
  border-color: var(--pc-primary);
  color: var(--pc-primary);
  background: var(--pc-primary-container);
}

.lang-btn .material-icons-round { font-size: 16px; }

/* ── FAVICON SVG base64 (definido en HTML, solo documentado aquí) ── */

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
footer {
  margin-top: auto;
  padding: 48px 20px;
  background: linear-gradient(180deg, #1a202c 0%, #0f1419 100%);
  color: white;
  width: 100%;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #a0aec0;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--pc-secondary); }

.privacy-box {
  max-width: 700px;
  margin: 0 auto 32px;
  border: 1px dashed #4a5568;
  padding: 24px;
  border-radius: var(--pc-r-md);
  background: rgba(255,255,255,.02);
}

.privacy-box h4 {
  color: var(--pc-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.privacy-box p {
  font-size: 0.9rem;
  color: #a0aec0;
  line-height: 1.6;
}

.copyright {
  font-size: 0.85rem;
  color: #4a5568;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .header-inner   { padding: 12px 16px; }
  .footer-nav     { gap: 20px; }
  .mdc-button     { padding: 7px 12px; font-size: 0.8rem; }
  .logo-icon,
  .logo-icon-md   { width: 38px; height: 45px; }
  .logo-wrapper   { width: 38px; height: 45px; }
  .logo-text      { font-size: 1.25rem; }
  .app-bar-title  { font-size: 1.1rem; }
}
