/* ========================================
   SHARED STYLES - VisaWork Peru Platform
   ======================================== */

/* CSS Variables */
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #f97316;
  --accent-light: #fb923c;
  --accent-dark: #ea580c;
  --green: #10b981;
  --green-light: #d1fae5;
  --yellow: #f59e0b;
  --yellow-light: #fef3c7;
  --red: #ef4444;
  --red-light: #fee2e2;
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --pink: #ec4899;
  --pink-light: #fce7f3;
  --cyan: #06b6d4;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.12);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

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

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

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  margin-right: 24px;
  white-space: nowrap;
  text-decoration: none;
}

.nav-brand span { color: var(--accent); }

.nav-link {
  padding: 18px 12px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.nav-spacer { flex: 1; }

.nav-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--accent);
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.tag-blue { background: var(--blue-light); color: var(--blue); }
.tag-green { background: var(--green-light); color: var(--green); }
.tag-orange { background: #fff7ed; color: var(--accent); }
.tag-purple { background: var(--purple-light); color: var(--purple); }
.tag-red { background: var(--red-light); color: var(--red); }
.tag-pink { background: var(--pink-light); color: var(--pink); }
.tag-cyan { background: #cffafe; color: var(--cyan); }

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 15px rgba(249,115,22,.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249,115,22,.4);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

/* Tables */
.table-wrapper {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  overflow-x: auto;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper thead {
  background: var(--primary);
  color: white;
}

.table-wrapper th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
}

.table-wrapper td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.table-wrapper tr:last-child td { border-bottom: none; }
.table-wrapper tr:hover td { background: var(--bg); }

/* Info Boxes */
.tip-box {
  padding: 24px;
  border-radius: var(--radius);
  margin: 16px 0;
  border-left: 4px solid;
  font-size: 0.92rem;
  line-height: 1.7;
}

.tip-box.green { background: var(--green-light); border-color: var(--green); }
.tip-box.red { background: var(--red-light); border-color: var(--red); }
.tip-box.yellow { background: var(--yellow-light); border-color: var(--yellow); }
.tip-box.blue { background: var(--blue-light); border-color: var(--blue); }

/* Accordion */
.accordion {
  max-width: 900px;
  margin: 0 auto;
}

.acc-item {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.acc-header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
}

.acc-header:hover { background: var(--bg); }

.acc-arrow {
  transition: transform 0.3s;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.acc-item.open .acc-arrow { transform: rotate(180deg); }

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.acc-item.open .acc-body { max-height: 2000px; }

.acc-content {
  padding: 0 24px 24px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
}

.acc-content strong { color: var(--text); }
.acc-content ul { padding-left: 20px; margin-top: 8px; }
.acc-content li { margin-bottom: 6px; }

/* Example Box */
.example-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0;
  border-left: 4px solid var(--blue);
  font-size: 0.9rem;
}

.example-box .label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.example-box.purple { border-color: var(--purple); }
.example-box.purple .label { color: var(--purple); }
.example-box.green { border-color: var(--green); }
.example-box.green .label { color: var(--green); }
.example-box.orange { border-color: var(--accent); }
.example-box.orange .label { color: var(--accent); }
.example-box.pink { border-color: var(--pink); }
.example-box.pink .label { color: var(--pink); }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

/* Footer */
.footer {
  background: var(--primary);
  color: white;
  padding: 64px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-brand h3 span { color: var(--accent); }

.footer-brand p {
  opacity: 0.7;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  opacity: 0.6;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 0;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  opacity: 0.5;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .section-header h2 { font-size: 1.8rem; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .section-header h2 { font-size: 1.5rem; }
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
