:root {
  --bg: #ffffff;
  --bg-alt: #eef5ff;
  --surface: #ffffff;
  --surface-alt: #e6f0fe;
  --border: #d3e3fb;
  --text: #17253b;
  --text-muted: #5c6f85;
  --accent: #2f7bff;
  --accent-hover: #1f63e0;
  --accent-soft: rgba(47, 123, 255, 0.1);
  --danger: #d8384f;
  --success: #1a9c73;
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

/* ---------- Public navbar ---------- */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-navbar.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 12px rgba(23, 37, 59, 0.06);
}

.site-navbar .navbar-brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-logo {
  height: 70px;
  width: auto;
}

.site-navbar .navbar-nav .nav-link {
  color: var(--accent);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  transition: color 0.2s ease;
}

.site-navbar .navbar-nav .nav-link:hover {
  color: var(--accent-hover);
}

.site-navbar .navbar-toggler {
  border-color: var(--border);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  border-radius: 999px;
  padding: 0.5rem 1.25rem !important;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

/* ---------- WhatsApp float button ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1050;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(23, 37, 59, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(23, 37, 59, 0.3);
  color: #fff;
}

/* ---------- Buttons ---------- */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-outline-accent {
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  background: transparent;
}

.btn-outline-accent:hover {
  background-color: var(--accent-soft);
  color: var(--accent-hover);
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section-title {
  font-weight: 800;
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  max-width: 680px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  text-align: center;
}

/* ---------- Hero ---------- */
.hero-section {
  padding: 8rem 0 6rem;
  background: radial-gradient(circle at 50% -20%, rgba(47, 123, 255, 0.18), transparent 60%), var(--bg);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* ---------- About ---------- */
.about-section {
  background: var(--bg-alt);
}

.about-text {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: center;
}

/* ---------- Services ---------- */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  height: 100%;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.service-icon::before {
  content: "\2699";
}

.icon-web::before { content: "\1F4BB"; }
.icon-mobile::before { content: "\1F4F1"; }
.icon-ecommerce::before { content: "\1F6D2"; }
.icon-erp::before { content: "\1F3E2"; }
.icon-uiux::before { content: "\1F3A8"; }
.icon-cloud::before { content: "\2601"; }
.icon-support::before { content: "\1F6E0"; }
.icon-consulting::before { content: "\1F4CA"; }

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- AI ---------- */
.ai-section {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg) 65%);
}

.ai-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), #7db2ff);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.ai-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(47, 123, 255, 0.15);
}

.ai-card-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.ai-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ai-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- References ---------- */
.references-section {
  background: var(--bg);
}

.reference-logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.reference-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 110px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.reference-logo-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.reference-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

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

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Contact ---------- */
.contact-section {
  background: var(--bg-alt);
}

.contact-form {
  max-width: 720px;
}

.contact-quick-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.contact-quick-item {
  color: var(--text);
  font-weight: 600;
}

.contact-quick-item:hover {
  color: var(--accent);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
}

.btn-whatsapp:hover {
  background: #1eb959;
  color: #fff;
}

.form-control,
.form-select {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem var(--accent-soft);
}

.form-label {
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.site-footer h5 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

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

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

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer hr {
  border-color: var(--border);
  margin: 2rem 0 1rem;
}

/* ---------- Admin layout ---------- */
.admin-body {
  background: var(--bg);
  color: var(--text);
}

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
}

.login-title {
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-align: center;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
}

.admin-brand {
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0 0.5rem 1.5rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-grow: 1;
}

.admin-nav a {
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.admin-nav a:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.admin-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.admin-logout-form {
  margin-top: 1rem;
}

.admin-logout-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 0.5rem;
  padding: 0.6rem;
  font-weight: 600;
}

.admin-logout-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.admin-content {
  flex-grow: 1;
  min-width: 0;
}

.admin-page-title {
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.admin-section-heading {
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.admin-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  color: var(--text-muted);
  font-weight: 600;
}

.admin-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
}

.admin-table thead {
  background: var(--surface-alt);
}

.admin-table th,
.admin-table td {
  border-color: var(--border) !important;
  color: var(--text);
  vertical-align: middle;
}

.unread-row {
  background: var(--accent-soft);
}

.message-cell {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-btn {
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-published {
  background: rgba(56, 199, 147, 0.15);
  color: var(--success);
}

.badge-draft {
  background: rgba(151, 161, 176, 0.15);
  color: var(--text-muted);
}

.admin-thumb {
  height: 90px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  object-fit: cover;
}

.admin-gallery-item {
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}
