/* Responsive Media Queries */

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


  .why-contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Bottom Navigation Bar Styles (Default Desktop: Hidden) */
.bottom-navbar {
  display: none;
}

@media (max-width: 768px) {
  /* Hide Hamburger Menu in Mobile Header */
  .mobile-menu-toggle {
    display: none !important;
  }

  /* Body Padding for Fixed Bottom Navigation */
  body {
    padding-bottom: calc(65px + env(safe-area-inset-bottom));
  }

  /* Fixed Bottom Navigation Bar */
  .bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(65px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
  }

  [data-theme="dark"] .bottom-navbar {
    background-color: #1A1A1A;
    border-top-color: #2D2D2D;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
  }

  .bottom-nav-item {
    flex: 1;
    height: 65px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #8E8E93;
    font-size: 11px;
    font-weight: 500;
    transition: color var(--transition-fast), transform var(--transition-fast);
    position: relative;
  }

  [data-theme="dark"] .bottom-nav-item {
    color: #A0A0A0;
  }

  .bottom-nav-item .bottom-nav-icon {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-fast), stroke var(--transition-fast);
  }

  .bottom-nav-item .bottom-nav-label {
    font-size: 11px;
    line-height: 1.2;
  }

  /* Active State Styling */
  .bottom-nav-item.active {
    color: #2563eb;
    font-weight: 600;
  }

  [data-theme="dark"] .bottom-nav-item.active {
    color: #38bdf8;
  }

  .bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.15);
    stroke: #2563eb;
  }

  [data-theme="dark"] .bottom-nav-item.active .bottom-nav-icon {
    stroke: #38bdf8;
  }

  /* Active Indicator Dot */
  .bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #2563eb;
  }

  [data-theme="dark"] .bottom-nav-item.active::after {
    background-color: #38bdf8;
  }

  .navbar {
    height: 3.75rem;
  }

  .brand-logo img {
    height: 2.1rem;
  }

  .three-dot-btn {
    width: 2rem;
    height: 2rem;
  }

  .three-dot-dropdown {
    width: 210px;
  }

  .top-profile-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }

  .grid-3, .grid-2, .contact-grid, .why-contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-hero-section {
    padding: 3.5rem 1rem 2.5rem 1rem;
  }

  .contact-hero-title {
    font-size: 2.25rem;
  }

  .contact-hero-subtext {
    font-size: 1.05rem;
  }

  .contact-main-section,
  .why-contact-section,
  .follow-us-section,
  .faq-section,
  .maps-section {
    padding: 3.5rem 0;
  }

  .contact-info-card,
  .contact-form-card {
    padding: 1.75rem 1.25rem;
  }

  .social-buttons-grid {
    gap: 0.85rem;
  }

  .social-btn {
    width: 100%;
    justify-content: center;
  }

  .faq-question-btn {
    padding: 1.1rem 1.25rem;
    font-size: 0.975rem;
  }

  .faq-answer-content {
    padding: 0 1.25rem 1.1rem 1.25rem;
  }

  .contact-cta-box {
    padding: 3rem 1.25rem;
  }

  .contact-cta-box .cta-title {
    font-size: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-header {
    margin-bottom: 2.25rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .hero-section {
    padding: 4rem 1rem 4.5rem 1rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtext {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .final-cta-box {
    padding: 2.5rem 1.25rem;
  }

  .final-cta-box .hero-cta {
    flex-direction: column;
  }

  /* AI Page Mobile & Tablet Responsive Layout Override */
  body.ai-page {
    padding-bottom: calc(65px + env(safe-area-inset-bottom)) !important;
  }

  .ai-layout-wrapper {
    flex-direction: row;
    height: calc(100vh - 65px - env(safe-area-inset-bottom));
    height: calc(100dvh - 65px - env(safe-area-inset-bottom));
  }

  .ai-chat-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 280px;
    z-index: 990;
    border-radius: 0;
    transform: translateX(-100%);
  }

  .ai-chat-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
  }

  .ai-chat-card {
    min-height: calc(100vh - 65px - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 65px - env(safe-area-inset-bottom));
    height: calc(100vh - 65px - env(safe-area-inset-bottom));
    height: calc(100dvh - 65px - env(safe-area-inset-bottom));
    max-height: calc(100vh - 65px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 65px - env(safe-area-inset-bottom));
    border-radius: 0;
  }

  .message {
    max-width: 90%;
  }

  .ai-page-section {
    padding: 0 !important;
    height: calc(100vh - 65px - env(safe-area-inset-bottom)) !important;
    height: calc(100dvh - 65px - env(safe-area-inset-bottom)) !important;
  }

  .ai-messages-log {
    padding: 1rem 0.85rem;
  }

  .ai-chat-footer {
    padding: 0.5rem 0.75rem 0.85rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .ai-top-bar {
    padding: 0 0.75rem;
  }

  .top-bar-left, .top-bar-right {
    gap: 0.35rem;
  }

  .top-bar-right .btn span {
    display: none;
  }

  .top-bar-right .btn {
    padding: 0.375rem 0.5rem;
  }

  .ai-header-status-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .ai-chat-header-actions .btn span {
    display: none;
  }

  .ai-empty-state {
    padding: 1rem;
  }

  .greeting-time-title {
    font-size: 1.65rem;
  }

  .greeting-subtitle {
    font-size: 1rem;
  }

  .quick-action-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.825rem;
  }

  .ai-empty-state h2 {
    font-size: 1.25rem;
  }

  .prompt-chip {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
  }
}
