/* rsitelite - European/US corporate style */
:root {
  --primary: #1a56db;
  --primary-dark: #1347b8;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
#topnav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 64px;
}
.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
#navMenu {
  display: flex;
  list-style: none;
  margin-left: 40px;
  gap: 4px;
}
#navMenu a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
#navMenu a:hover, #navMenu a.active { background: var(--bg-alt); color: var(--primary); }
.nav-right { margin-left: auto; display: flex; align-items: center; }
.lang-switch {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg);
  cursor: pointer;
}
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* Main content */
main { flex: 1; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
  color: #fff;
  padding: 100px 24px 80px;
  text-align: center;
}
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
.hero p { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto 32px; }
.hero .btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: #fff;
  color: var(--primary);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hero .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* Section */
section { padding: 80px 24px; }
section:nth-child(even) { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.section-title p { color: var(--text-muted); font-size: 16px; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-img { width: 100%; height: 200px; object-fit: cover; background: var(--bg-alt); }
.card-body { padding: 20px; }
.card-body h3 { font-size: 18px; margin-bottom: 8px; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.card-body .category { font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.feature-card { text-align: center; }
.feature-card .icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 14px; }

/* Partner logos */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: center;
}
.partner-grid img { height: 40px; opacity: 0.5; transition: opacity 0.2s; }
.partner-grid img:hover { opacity: 0.8; }

/* Products page layout */
.products-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.sidebar { padding: 20px 0; }
.sidebar h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }
.sidebar ul { list-style: none; }
.sidebar li a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.15s;
}
.sidebar li a:hover, .sidebar li a.active { background: var(--bg-alt); color: var(--primary); }
.sidebar .sub { padding-left: 16px; }
.sidebar .sub a { font-size: 13px; color: var(--text-muted); }

.search-box {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}
.search-box:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }

/* Product/news detail */
.detail-header { margin-bottom: 32px; }
.detail-header h1 { font-size: 32px; font-weight: 700; }
.detail-header .meta { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.detail-content { line-height: 1.8; }
.detail-content img { max-width: 100%; border-radius: var(--radius); margin: 16px 0; }
.detail-content h2 { margin: 24px 0 12px; }
.detail-content p { margin: 12px 0; }
.detail-content ul, .detail-content ol { margin: 12px 0; padding-left: 24px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 24px 0; }
.gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius); cursor: pointer; }
.attachments { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: background 0.15s;
}
.attachment-link:hover { background: var(--border); }

/* Page sections */
.page-content { max-width: 800px; margin: 0 auto; }
.page-content h2 { font-size: 28px; margin: 32px 0 16px; }
.page-content p { margin: 12px 0; color: var(--text-muted); }

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-primary {
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger {
  padding: 8px 16px;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
}

/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: calc(100vh - 64px - 200px);
}
.admin-sidebar {
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 20px;
}
.admin-sidebar a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 4px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--primary); color: #fff; }
.admin-main { padding: 32px; }
.admin-main h2 { margin-bottom: 24px; }

.login-page { max-width: 400px; margin: 80px auto; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); }
.login-page h2 { margin-bottom: 24px; text-align: center; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.pagination button:hover:not(:disabled) { background: var(--bg-alt); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: #1f2937;
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero { padding: 60px 20px 48px; }
  section { padding: 48px 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .products-layout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  #navMenu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
  }
  #navMenu.open { display: flex; }
  #navMenu li a { padding: 12px 16px; display: block; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; }
  .admin-sidebar a { white-space: nowrap; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-links-row { gap: 4px 14px; }
  .footer-links-row a { font-size: 13px; }
}

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }

/* Footer */
footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 24px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col p { font-size: 13px; color: #94a3b8; margin-bottom: 4px; }
.footer-links-row { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links-row a { color: #94a3b8; text-decoration: none; font-size: 14px; white-space: nowrap; }
.footer-links-row a:hover { color: #fff; }
.admin-link { color: #64748b !important; }
.admin-link:hover { color: #94a3b8 !important; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

/* CTA */
.cta {
  text-align: center;
  padding: 80px 24px;
  background: var(--primary);
  color: #fff;
}
.cta h2 { font-size: 32px; margin-bottom: 16px; }
.cta p { font-size: 16px; opacity: 0.9; margin-bottom: 32px; }
.cta .btn-white {
  display: inline-block;
  padding: 14px 36px;
  background: #fff;
  color: var(--primary);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
}

/* Hero outline button */
.btn-outline-light {
  display: inline-block;
  padding: 14px 36px;
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline-light:hover { border-color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.1); }

/* Section backgrounds */
.section-gradient-light {
  background: linear-gradient(180deg, #fff 0%, #f0f4ff 50%, #fff 100%);
}
.section-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
}

/* Homepage feature cards */
.home-feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.home-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.home-feature-card .home-feature-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--bg-alt);
}
.home-feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.home-feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.home-feature-card-dark {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}
.home-feature-card-dark h3 { color: #f1f5f9; }
.home-feature-card-dark p { color: #94a3b8; }
.home-feature-card-dark:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.07);
}

/* Editor */
.editor-textarea {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.editor-textarea:focus { outline: none; border-color: var(--primary); }
