/*
 * Mobile App Shell
 * Navbar, menu, footer, sticky CTA — the persistent frame
 */

/* ── Navbar ── */
@media (max-width: 768px) {
  .navbar {
    height: 56px;
    padding-top: var(--safe-area-top);
    transition: background var(--m-duration-base) var(--m-ease-smooth),
                box-shadow var(--m-duration-base) var(--m-ease-smooth);
  }

  .nav-content {
    height: 56px;
  }

  .navbar .logo-text { display: none; }
  .navbar .logo-image { height: 28px; width: auto; }

  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--m-card-radius-xs);
    transition: background var(--m-duration-fast) ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-btn:active {
    background: var(--m-surface-2);
  }

  .mobile-menu-btn span {
    transition: transform var(--m-duration-base) var(--m-ease-smooth),
                opacity var(--m-duration-fast) ease;
  }

  /* Scrolled — glass morphism */
  .navbar.scrolled {
    background: var(--m-surface-glass-heavy);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  }
}

/* ── Full-screen Menu ── */
@media (max-width: 768px) {
  .nav-menu {
    top: 0;
    left: auto;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: calc(72px + var(--safe-area-top)) var(--m-space-xl) var(--m-space-3xl);
    background: var(--m-surface-glass-heavy);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--m-space-2xs);
    transition: right var(--m-duration-enter) var(--m-ease-smooth),
                opacity var(--m-duration-base) ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .nav-menu.active {
    left: auto;
    right: 0;
  }

  /* Menu Links */
  .nav-menu .nav-link {
    min-height: var(--m-tap-comfortable);
    font-size: var(--m-font-body-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: var(--m-space-sm) var(--m-space-md);
    border-radius: var(--m-card-radius-sm);
    color: var(--text-primary);
    transition: background var(--m-duration-fast) ease;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-menu .nav-link:active {
    background: var(--m-surface-2);
  }

  .nav-menu .nav-link.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
  }

  /* Remove desktop hover effects */
  .nav-menu .nav-link:hover {
    background: transparent;
    color: inherit;
    transform: none;
    box-shadow: none;
  }

  .nav-menu .nav-link.active:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
  }

  /* Dropdown Toggle */
  .nav-dropdown-toggle {
    min-height: var(--m-tap-comfortable);
    font-size: var(--m-font-body-lg);
    font-weight: 600;
    justify-content: space-between;
    padding: var(--m-space-sm) var(--m-space-md);
    border-radius: var(--m-card-radius-sm);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
  }

  .nav-dropdown-toggle:hover,
  .nav-dropdown.active .nav-dropdown-toggle {
    background: transparent;
    color: inherit;
    transform: none;
    box-shadow: none;
  }

  .nav-dropdown-toggle:active {
    background: var(--m-surface-2);
  }

  .nav-dropdown.open .nav-dropdown-toggle {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
  }

  .dropdown-arrow {
    transition: transform var(--m-duration-base) var(--m-ease-smooth);
  }

  .nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
  }

  /* Dropdown Items */
  .nav-dropdown-menu {
    transition: max-height var(--m-duration-enter) var(--m-ease-smooth),
                opacity var(--m-duration-base) ease;
  }

  .nav-dropdown-link {
    min-height: var(--m-tap-min);
    display: flex;
    align-items: center;
    padding: var(--m-space-xs) var(--m-space-md) var(--m-space-xs) var(--m-space-2xl);
    font-size: var(--m-font-body);
    border-radius: var(--m-card-radius-xs);
    -webkit-tap-highlight-color: transparent;
  }

  .nav-dropdown-link:active {
    background: var(--m-surface-2);
  }

  /* CTA in menu */
  .nav-cta {
    margin-top: var(--m-space-md);
    padding: 0 var(--m-space-md);
  }

  .nav-link--cta {
    min-height: var(--m-btn-height) !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    border-radius: var(--m-btn-radius) !important;
    justify-content: center !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  }

  .nav-link--cta:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  }

  /* Mobile Video in Menu */
  .mobile-menu-video {
    margin-top: var(--m-space-lg);
    padding: 0 var(--m-space-md);
  }

  .mobile-video-wrapper {
    background: var(--m-surface-1);
    border-radius: var(--m-card-radius);
    padding: var(--m-space-lg);
    border: var(--m-card-border);
  }

  .mobile-video-title {
    font-size: var(--m-font-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--m-space-sm);
  }

  .video-container {
    border-radius: var(--m-card-radius-sm);
    overflow: hidden;
  }
}

/* ── Footer ── */
@media (max-width: 768px) {
  .footer {
    padding: var(--m-space-3xl) 0 var(--m-space-xl);
  }

  .footer-content {
    gap: var(--m-space-2xl);
    margin-bottom: var(--m-space-2xl);
  }

  .footer-col h3 {
    font-size: var(--m-font-h3);
    letter-spacing: -0.01em;
  }

  .footer-col h4 {
    font-size: var(--m-font-body);
    font-weight: 700;
    margin-bottom: var(--m-space-sm);
  }

  .footer-col p,
  .footer-col li,
  .footer-col a {
    font-size: var(--m-font-body);
    line-height: var(--m-leading-relaxed);
  }

  .footer-subtitle {
    font-size: var(--m-font-small);
    line-height: var(--m-leading-relaxed);
    color: var(--text-muted);
    margin-top: var(--m-space-sm);
  }

  .footer-links li {
    margin-bottom: var(--m-space-xs);
  }

  .footer-links a {
    min-height: var(--m-tap-min);
    display: inline-flex;
    align-items: center;
  }

  .social-links {
    justify-content: flex-start;
    gap: var(--m-space-sm);
    margin-top: var(--m-space-md);
  }

  .social-link {
    width: 44px;
    height: 44px;
    border-radius: var(--m-card-radius-sm);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--m-space-md);
    padding-top: var(--m-space-xl);
    border-top: 1px solid var(--m-surface-3);
  }

  .footer-bottom p {
    font-size: var(--m-font-small);
  }

  .footer-bottom .social-links {
    justify-content: center;
  }
}

/* ── Sticky CTA Bar ── */

/* GLOBAL: always hidden by default — prevents footer gap on desktop */
.mobile-sticky-cta {
  display: none !important;
}

/* Mobile: reveal as fixed bottom bar */
@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--m-surface-glass-heavy);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    padding: var(--m-space-sm) var(--m-space-md) calc(var(--m-space-sm) + var(--safe-area-bottom));
    gap: var(--m-space-sm);
    transform: translateY(100%);
    transition: transform var(--m-duration-slow) var(--m-ease-smooth);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  .mobile-sticky-cta.is-visible {
    transform: translateY(0);
  }

  .mobile-sticky-btn,
  .mobile-sticky-cta .btn-randevu,
  .mobile-sticky-cta .btn-whatsapp {
    flex: 1;
    min-height: var(--m-tap-comfortable);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--m-space-xs);
    font-size: var(--m-font-body);
    font-weight: 700;
    border-radius: var(--m-card-radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--m-duration-fast) ease,
                opacity var(--m-duration-fast) ease;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.01em;
  }

  .mobile-sticky-btn:active,
  .mobile-sticky-cta .btn-randevu:active,
  .mobile-sticky-cta .btn-whatsapp:active {
    transform: scale(0.97);
  }

  .mobile-sticky-btn--primary,
  .mobile-sticky-cta .btn-randevu {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
  }

  .mobile-sticky-btn--whatsapp,
  .mobile-sticky-cta .btn-whatsapp {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.3);
  }
}

/* ── Breadcrumb ── */
@media (max-width: 768px) {
  .breadcrumb-container {
    min-height: 200px;
  }

  .breadcrumb-container img {
    height: 200px;
    object-fit: cover;
  }

  .breadcrumb-title {
    font-size: var(--m-font-h1);
    letter-spacing: -0.02em;
    line-height: var(--m-leading-tight);
  }

  .breadcrumb-nav {
    font-size: var(--m-font-small);
    gap: var(--m-space-xs);
  }

  .breadcrumb-content {
    text-align: center;
  }

  .breadcrumb-small {
    min-height: 180px;
  }

  .breadcrumb-small img {
    height: 180px;
  }

  .blog-hero-subtitle {
    font-size: var(--m-font-body);
    opacity: 0.9;
    margin-top: var(--m-space-xs);
  }
}

/* ── Extra Small Footer ── */
@media (max-width: 380px) {
  .footer-col p {
    font-size: var(--m-font-small);
  }
}
