:root {
  --primary-navy: #001f3f;
  --primary-dark: #0d1b2a;
  --primary-light: #0066cc;
  --accent-blue: #0099ff;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --text-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: rgba(0, 31, 63, 0.1);
  --shadow: 0 8px 32px rgba(0, 31, 63, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 31, 63, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ==================== HEADER ==================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 16px rgba(0, 31, 63, 0.08);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-navy);
  text-decoration: none;
}

.logo-placeholder {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-weight: 700;
  font-size: 1.2rem;
}

nav {
  display: none;
}

nav.active {
  display: block;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}

nav ul li {
  border-bottom: 1px solid var(--border-color);
}

nav ul li a {
  display: block;
  padding: 15px 20px;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  background-color: var(--bg-light);
  color: var(--primary-light);
  padding-left: 25px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background-color: var(--primary-navy);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== MAIN CONTENT ==================== */

main {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== HERO SECTION ==================== */

.hero {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-dark) 50%, var(--primary-light) 100%);
  color: var(--text-white);
  padding: 80px 20px;
  text-align: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  color: var(--text-white);
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--primary-light);
  color: var(--text-white);
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.cta-button:hover {
  background-color: var(--accent-blue);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 153, 255, 0.3);
}

/* ==================== SECTIONS ==================== */

section {
  padding: 60px 20px;
}

section h2 {
  text-align: center;
  margin-bottom: 50px;
}

section .subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==================== CARDS ==================== */

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

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

.card-header {
  background: linear-gradient(135deg, rgba(0, 31, 63, 0.05) 0%, rgba(0, 102, 204, 0.05) 100%);
  padding: 30px 20px;
  text-align: center;
  border-bottom: 2px solid var(--border-color);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.3rem;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.card-tagline {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-description {
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.7;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  font-size: 0.85rem;
}

.badge {
  background-color: var(--bg-light);
  color: var(--primary-navy);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.badge.platform {
  background-color: rgba(0, 102, 204, 0.1);
  color: var(--primary-light);
  border-color: var(--primary-light);
}

.badge.category {
  background-color: rgba(0, 31, 63, 0.1);
  color: var(--primary-navy);
  border-color: var(--primary-navy);
}

.badge.price {
  background-color: var(--accent-blue);
  color: var(--text-white);
  border-color: var(--accent-blue);
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.95rem;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-light);
  color: var(--text-white);
  font-weight: 700;
}

.btn-primary:hover {
  background-color: var(--accent-blue);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 153, 255, 0.3);
}

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

.btn-secondary:hover {
  background-color: var(--primary-light);
  color: var(--text-white);
}

.btn-small {
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Service button for price display */
.btn-primary.btn-service {
  padding: 12px 24px;
  font-size: 1rem;
}

/* ==================== SECTIONS STYLING ==================== */

#apps {
  background-color: var(--bg-white);
}

#services {
  background-color: var(--bg-light);
}

#articles {
  background-color: var(--bg-white);
}

/* ==================== FOOTER ==================== */

footer {
  background: var(--primary-navy);
  color: var(--text-white);
  padding: 40px 20px;
  text-align: center;
}

footer p {
  margin-bottom: 10px;
  opacity: 0.9;
}

.footer-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

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

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

/* ==================== ADMIN PANEL ==================== */

body.admin-page {
  background:
    radial-gradient(circle at top left, rgba(0, 102, 204, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(0, 31, 63, 0.14), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
}

.admin-hero {
  padding: 90px 20px 40px;
}

.admin-shell {
  display: grid;
  gap: 24px;
  align-items: end;
}

.admin-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 31, 63, 0.08);
  color: var(--primary-navy);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.admin-subtitle {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 31, 63, 0.08);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.6rem;
  color: var(--primary-navy);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-content {
  padding-top: 0;
}

.admin-grid {
  display: grid;
  gap: 24px;
}

.admin-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 31, 63, 0.08);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 31, 63, 0.08);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.panel-heading {
  margin-bottom: 20px;
}

.panel-heading h2 {
  margin-top: 0;
  margin-bottom: 8px;
  text-align: left;
}

.panel-heading p {
  color: var(--text-light);
}

.panel-heading-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group-full {
  grid-column: 1 / -1;
}

.field-group span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-navy);
}

.field-group input,
.field-group textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0, 31, 63, 0.12);
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  color: var(--text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group textarea {
  resize: vertical;
  min-height: 120px;
}

.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12);
}

.admin-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.btn-danger {
  background: #b42318;
  color: var(--text-white);
}

.btn-danger:hover {
  background: #922018;
  transform: translateY(-2px);
}

.status-message {
  margin-top: 16px;
  min-height: 1.4em;
  color: var(--text-light);
}

.status-message[data-state='success'] {
  color: #0f7a34;
}

.status-message[data-state='error'] {
  color: #b42318;
}

.admin-table-wrapper {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 31, 63, 0.08);
  vertical-align: top;
}

.admin-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
}

.description-cell {
  color: var(--text-light);
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  color: var(--text-light);
  padding: 28px 12px;
}

.admin-panel-wide {
  overflow: hidden;
}

/* ==================== UTILITIES ==================== */

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-light) 0%, var(--accent-blue) 100%);
  margin: 0 auto 30px;
  border-radius: 2px;
}

.hidden {
  display: none !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 40px 20px;
  }

  .hero {
    padding: 60px 20px;
    min-height: 50vh;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  nav ul {
    flex-direction: column;
  }

  .cards-grid {
    gap: 20px;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .panel-heading-inline {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  section {
    padding: 30px 15px;
  }

  section h2 {
    margin-bottom: 30px;
  }

  .card-header {
    padding: 20px 15px;
  }

  .card-content {
    padding: 15px;
  }

  .card-icon {
    font-size: 2.5rem;
  }

  .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 10px;
  }

  .admin-hero {
    padding-top: 80px;
  }

  .admin-panel {
    padding: 18px;
  }

  .admin-table th,
  .admin-table td {
    padding: 12px 10px;
  }
}

/* Desktop / Tablet: show horizontal nav and hide hamburger */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  nav {
    display: block;
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
  }

  nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 18px;
    align-items: center;
  }

  nav ul li {
    border-bottom: none;
  }

  nav ul li a {
    display: inline-block;
    padding: 10px 12px;
    color: var(--primary-navy);
    font-weight: 600;
  }

  nav ul li a:hover {
    background: transparent;
    color: var(--primary-light);
    padding-left: 12px;
  }
}

/* Admin-specific tweaks */
body.admin-page nav ul {
  gap: 12px;
}

body.admin-page .header-container {
  height: 64px;
}

body.admin-page .admin-panel {
  padding: 28px;
}
