/* PROBUILDER.UZ - Professional Construction-Tech Design System */

:root {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-translucent: rgba(255, 255, 255, 0.85);
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #f59e0b;
  
  /* Construction tech accents */
  --accent-primary: #f59e0b;
  --accent-hover: #d97706;
  --accent-light: #fef3c7;
  --accent-dark: #b45309;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);

  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-accent: 0 10px 25px -5px rgba(245, 158, 11, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
}

[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-translucent: rgba(15, 23, 42, 0.85);
  --bg-card: #1e293b;
  --bg-card-hover: #273549;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: #334155;
  --border-focus: #f59e0b;

  --accent-light: rgba(245, 158, 11, 0.15);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 10px 25px -5px rgba(245, 158, 11, 0.25);
}

/* Lucide Vector Icons */
.lucide {
  width: 1.2em;
  height: 1.2em;
  stroke-width: 2;
  vertical-align: -0.2em;
  display: inline-block;
  flex-shrink: 0;
}

.icon-xs { width: 13px; height: 13px; stroke-width: 2.2; vertical-align: -0.1em; }
.icon-sm { width: 16px; height: 16px; stroke-width: 2; vertical-align: -0.15em; }
.icon-md { width: 20px; height: 20px; stroke-width: 2; vertical-align: -0.2em; }
.icon-lg { width: 26px; height: 26px; stroke-width: 2; vertical-align: -0.25em; }
.icon-xl { width: 56px; height: 56px; stroke-width: 1.75; }

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

html {
  scroll-behavior: smooth;
}

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

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-warning {
  background-color: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .badge-warning {
  color: #fbbf24;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #059669;
}

[data-theme="dark"] .badge-success {
  color: #34d399;
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* Advertisements Banners */
.header-ad-section {
  padding: 16px 0 6px 0;
  width: 100%;
}

.footer-ad-section {
  margin: 36px 0 16px 0;
  width: 100%;
}

.ad-banner-link-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  margin-bottom: 12px;
  position: relative;
  background: var(--bg-card);
}

.ad-banner-link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.ad-banner-img-wrapper {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .ad-banner-img-wrapper {
    height: 110px;
  }
}

.ad-banner-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ad-banner-link-card:hover .ad-banner-bg-img {
  transform: scale(1.025);
}

.ad-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.65) 55%, rgba(15, 23, 42, 0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  gap: 16px;
}

@media (max-width: 576px) {
  .ad-banner-overlay {
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.92) 100%);
  }
}

.ad-banner-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 75%;
}

@media (max-width: 576px) {
  .ad-banner-content {
    max-width: 100%;
  }
}

.ad-banner-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.3;
}

@media (max-width: 768px) {
  .ad-banner-title {
    font-size: 1.05rem;
  }
}

.ad-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  padding: 3px 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.ad-banner-action {
  flex-shrink: 0;
}

.ad-banner-text-wrapper {
  background: linear-gradient(90deg, #1e293b, #0f172a);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ad-banner-text-wrapper .ad-banner-title {
  color: #ffffff;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-surface-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.brand-badge {
  background: var(--accent-gradient);
  color: #0f172a;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 900;
}

.brand-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 3px;
  flex-shrink: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="dark"] .brand-logo-badge {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.brand-logo:hover .brand-logo-badge {
  transform: scale(1.06);
}

.brand-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

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

.btn-danger {
  background: var(--color-danger);
  color: #ffffff;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-success {
  background: var(--color-success);
  color: #ffffff;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

/* Flag icon */
.flag-icon {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Language selector dropdown */
.lang-dropdown {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.lang-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 6px;
  min-width: 160px;
  display: none;
  z-index: 1001;
}

.lang-menu.show {
  display: block;
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-menu a:hover,
.lang-menu a.active-lang {
  background: var(--bg-surface);
  color: var(--accent-primary);
  font-weight: 600;
}

/* Mobile hamburger */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 80px 0 100px;
  background: radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  overflow: hidden;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

.hero-content {
  max-width: 650px;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.15;
  font-weight: 800;
  margin: 18px 0 16px;
  letter-spacing: -1px;
}

.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-card-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-xl);
  position: relative;
}

/* Cards & Grids */
.section {
  padding: 70px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 6px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 158, 11, 0.4);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  background: #1e293b;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
  flex: 1;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-meta-label {
  color: var(--text-muted);
}

.card-meta-value {
  font-weight: 600;
  color: var(--text-main);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  margin: 20px 0;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  color: var(--text-dim);
}

.empty-state-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state-desc {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
}

/* Tariff Cards */
.tariff-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.tariff-card.featured {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-accent);
}

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

.tariff-name {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.tariff-price-block {
  margin: 16px 0 24px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
}

.tariff-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.tariff-period {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.tariff-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 24px;
  flex: 1;
}

/* Forms & Auth */
.auth-wrapper {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Alerts and Messages */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger, .alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* AI Calculator UI */
.ai-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  margin: 30px 0 60px;
}

.ai-chat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  height: 650px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.ai-chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.msg-bubble {
  max-width: 85%;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  line-height: 1.6;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent-gradient);
  color: #0f172a;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.msg-ai {
  align-self: flex-start;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.msg-ai h3, .msg-ai h4 {
  margin: 12px 0 6px;
  color: var(--accent-primary);
}

.msg-ai ul {
  padding-left: 20px;
  margin-bottom: 8px;
}

.ai-input-area {
  padding: 18px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  gap: 12px;
}

.ai-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px;
  height: 650px;
  display: flex;
  flex-direction: column;
}

/* Footer */
.footer {
  background: #0b1120;
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-title {
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .ai-container {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-xl);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.2rem;
  }
}

/* Responsive layout refinements for phone, tablet, and compact laptops */
@media (max-width: 1100px) {
  .nav-menu { gap: 14px; }
  .nav-actions { gap: 9px; }
  .brand-logo { font-size: 1.25rem; }
}

@media (max-width: 768px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .nav-container { min-height: 64px; height: auto; gap: 10px; }
  .navbar { min-height: 64px; }
  .nav-menu { top: 64px; max-height: calc(100dvh - 64px); overflow-y: auto; }
  .nav-actions { gap: 8px; }
  .nav-actions > .btn { padding: 8px 10px !important; font-size: .82rem !important; }
  .section { padding: 48px 0; }
  .section-header { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  .section-title { font-size: 1.7rem; }
  .hero-section { padding: 56px 0 64px; }
  .hero-title { font-size: clamp(1.8rem, 7vw, 2.2rem); }
  .hero-desc { font-size: 1rem; }
  .auth-wrapper { padding: 32px 16px; }
  .auth-card { padding: 28px 22px; }
  .ai-chat-box, .ai-sidebar { height: auto; min-height: 420px; }
  .ai-sidebar { min-height: 0; }
  .ai-chat-messages { padding: 16px; }
  .ai-input-area { padding: 12px; }
  .footer-grid { gap: 28px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
  .ad-banner-overlay { padding: 14px 16px; }
}

@media (max-width: 576px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .brand-logo { gap: 7px; font-size: 1.05rem; }
  .brand-logo-badge { width: 36px; height: 36px; }
  .nav-actions { gap: 6px; }
  .nav-actions > .btn { padding: 7px 8px !important; }
  .nav-actions > .btn span { display: none; }
  .nav-actions .lang-btn { padding: 6px 8px; gap: 5px; }
  .hamburger-btn { padding: 6px; }
  .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero-title { letter-spacing: -.5px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .card-body { padding: 16px; }
  .tariff-card { padding: 24px 18px; }
  .auth-card { padding: 24px 18px; }
  .auth-title { font-size: 1.5rem; }
  .msg-bubble { max-width: 94%; padding: 12px 14px; }
  .ad-banner-action { display: none; }
  .footer { padding: 42px 0 24px; }
  input, select, textarea, button { max-width: 100%; }
}

@media (max-width: 360px) {
  .brand-logo { font-size: .94rem; }
  .brand-logo-badge { width: 32px; height: 32px; }
  .nav-actions .lang-btn span { display: none; }
  .nav-actions { gap: 4px; }
}

/* Prevent narrow mobile screens from getting a blank horizontal gutter. */
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  main, .hero-section, .section, .container, .hero-wrapper,
  .hero-content, .hero-card-preview, .card, .tariff-card { min-width: 0; }
  .hero-wrapper > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
  .hero-title, .hero-desc, .card-title, .card-desc,
  .tariff-name, .tariff-desc { overflow-wrap: anywhere; }
}
