/*
  KAREL İŞİTME - UI/UX & SEO layer (v6)
  Loaded AFTER style.css and tablet-fix.css
*/

:root {
  --karel-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --karel-primary: #0e204d;
  --karel-secondary: #21cdc0;
  --karel-accent: #16BE45;
}

html, body { font-family: var(--karel-font); }

h1, h2, h3, h4, h5, h6,
.heading__title,
.text-block__title,
.section__title,
.footer-widget__title {
  font-family: var(--karel-font) !important;
  letter-spacing: -0.01em;
}

/* Focus states: accessibility */
:where(a, button, input, select, textarea):focus { outline: none !important; box-shadow: none !important; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid rgba(33,205,192,0.55) !important;
  outline-offset: 2px;
}

/* ===== FIX: Overlay üzerinde yazı görünürlüğü (yeşil + lacivert) ===== */
.bg-overlay-primary .heading__title,
.bg-overlay-primary .heading__subtitle,
.bg-overlay-primary h2,
.bg-overlay-primary h3,
.bg-overlay-primary h4,
.bg-overlay-primary p,
.bg-overlay-primary .color-gray,
.bg-overlay-primary .feature__title,
.bg-overlay-primary .feature__desc,
.bg-overlay-secondary .heading__title,
.bg-overlay-secondary .heading__subtitle,
.bg-overlay-secondary h2,
.bg-overlay-secondary h3,
.bg-overlay-secondary h4,
.bg-overlay-secondary p,
.bg-overlay-secondary .color-gray,
.bg-overlay-secondary .feature__title,
.bg-overlay-secondary .feature__desc,
.features-layout2 .feature__title,
.features-layout2 .color-gray,
.features-layout2 h2,
.features-layout2 h3,
.features-layout2 h4,
.features-layout2 p {
  color: #fff !important;
}
.bg-overlay-primary .feature-item,
.bg-overlay-secondary .feature-item {
  background: rgba(255,255,255,0.10) !important;
  box-shadow: none !important;
}
/* Feature icons on overlays */
.bg-overlay-secondary .feature__icon,
.bg-overlay-primary .feature__icon {
  color: #fff !important;
}

/* ===== FIX: Topbar – centered, proper spacing ===== */
.header-topbar {
  height: auto;
  min-height: 40px;
  padding: 8px 0;
}
.header-topbar > .container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}
.header-topbar .contact__list {
  justify-content: center;
  width: 100%;
}
.header-topbar .contact__list li {
  font-size: 12px;
  margin-right: 18px;
}
@media (max-width: 1499px) {
  .header-topbar .contact__list li { font-size: 11px; margin-right: 12px; }
  .header-topbar > .container-fluid { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 1199.98px) {
  .header-topbar { display: none !important; }
}

/* ===== FIX: Randevu scroll offset (navbar altında kalmasın) ===== */
#randevu {
  scroll-margin-top: 120px;
}
[id="randevu-section"] {
  scroll-margin-top: 100px;
}

/* Hamburger lines */
.navbar-toggler .menu-lines,
.navbar-toggler .menu-lines span { background: transparent !important; }
.navbar-toggler .menu-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}
.navbar-toggler .menu-lines span {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--karel-primary) !important;
}

/* Desktop navbar */
@media (min-width: 992px) {
  .navbar-nav { align-items: center; }
  .navbar .nav__item-link { white-space: nowrap; }
}

/* Multi-level dropdown */
.karel-submenu { position: relative; }
@media (min-width: 992px) {
  .karel-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 6px;
  }
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 1199.98px) {
  .navbar-toggler {
    position: relative;
    z-index: 3005;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
  }

  .navbar .navbar-collapse.collapse { display: block !important; height: auto !important; }
  .navbar .navbar-collapse { pointer-events: none; }
  .navbar .navbar-collapse.menu-opened { pointer-events: auto; }

  #mainNavigation .dropdown-menu { display: none; position: static; box-shadow: none; padding-left: 10px; }
  #mainNavigation .nav__item.open > .dropdown-menu { display: block !important; }
  #mainNavigation .navbar-nav,
  #mainNavigation .dropdown-menu { pointer-events: auto; }
  #mainNavigation .nav__item-link { font-family: var(--karel-font) !important; }

  /* Hide topbar on very small screens */
  .header-topbar { display: none; }

  /* Fix slider content on mobile */
  .slide__title { font-size: 22px !important; line-height: 1.3 !important; }
  .slide__desc { font-size: 14px !important; }

  /* Contact boxes stack properly */
  .contact-box { margin-bottom: 0; }
  .boxes-wrapper .col-md-4 { padding: 0; }
}

/* Very small phones */
@media (max-width: 575.98px) {
  .slide__title { font-size: 18px !important; }
  .heading__title { font-size: 22px !important; }

  /* Contact panel fix */
  .contact-panel { flex-direction: column; }
  .contact-panel__form,
  .contact-panel__info { width: 100% !important; }
}

/* ===== MOBILE FOOTER BAR ===== */
.mobile-footer-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999998;
  background: var(--karel-primary);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
  justify-content: space-around;
  align-items: stretch;
  padding: 0;
}

.mobile-footer-bar .footer-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 2px;
  transition: background 0.2s;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.mobile-footer-bar .footer-button:last-child { border-right: none; }
.mobile-footer-bar .footer-button:active { background: rgba(255,255,255,0.1); }

@media (max-width: 991.98px) {
  .mobile-footer-bar { display: flex; }
  body { padding-bottom: 44px; }
  /* Move WhatsApp widget above footer bar */
  #wa-widget, .wa-chat-box-content-send-btn-container, [class*="delightchat"] {
    bottom: 64px !important;
  }
}

/* ===== HELP POPUP ===== */
.karel-help-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 10000000;
  padding: 16px;
}
.karel-help-modal.is-open { display: flex; }

.karel-help-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
  animation: karelSlideUp 0.3s ease;
}

@keyframes karelSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.karel-help-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  padding: 20px 20px 10px;
  background: linear-gradient(135deg, var(--karel-primary) 0%, #1a3a7a 100%);
}
.karel-help-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  color: #fff;
}
.karel-help-close {
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}
.karel-help-body { padding: 16px 20px 20px; }
.karel-help-body .form-control { height: 50px; border-radius: 8px; }
.karel-help-body .btn { height: 50px; border-radius: 8px; }
.karel-help-note { font-size: 11px; color: #999; margin-top: 10px; text-align: center; }

/* ===== COUNTER ITEMS ===== */
.counter-item {
  text-align: center;
  padding: 20px 10px;
  margin-bottom: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}
.counter-item__number {
  font-size: 36px;
  font-weight: 700;
  color: var(--karel-primary);
  margin-bottom: 5px;
}
.counter-item__title {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* ===== FOOTER IMPROVEMENTS ===== */
/* Footer widget titles in dark area = white */
.footer-primary .footer-widget .footer-widget__title {
  color: #fff !important;
}
/* Footer contact card has white bg - title stays dark */
.footer-widget-contact .footer-widget__title {
  color: #0e204d !important;
}
.footer-widget ul li {
  margin-bottom: 8px;
}
.footer-widget ul li a {
  color: #9ca3af !important;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-widget ul li a:hover { color: var(--karel-secondary) !important; }

.footer-brands {
  background: rgba(0,0,0,0.03);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.footer-brands a { text-decoration: underline; }
.footer-brands a:hover { color: var(--karel-secondary) !important; }

/* ===== GOOGLE REVIEWS STYLING ===== */
#google-yorumlar .testimonial__title {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
}

/* ===== TRUST FEATURES SECTION ===== */
.features-layout2 .feature-item {
  margin-bottom: 30px;
}
.features-layout2 .feature__title {
  color: #fff;
}
.features-layout2 .color-gray {
  font-size: 13px;
}

/* ===== SEO CONTENT BLOCK ===== */
section article p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 16px;
}

/* ===== CANONICAL LINK CLEANUP ===== */
/* Remove .php extension appearance for cleaner URLs */

/* ===== PRINT STYLES ===== */
@media print {
  .mobile-footer-bar,
  .karel-help-modal,
  .header-topbar,
  #scrollTopBtn,
  .karel-hearing-fab,
  [class*="delightchat"],
  .preloader { display: none !important; }
}

/* ===== FLOATING İŞİTME TESTİ BUTTON ===== */
.karel-hearing-fab {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0e204d 0%, #1a3a7a 100%);
  color: #fff;
  padding: 12px 18px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(14,32,77,0.4);
  transition: all 0.3s ease;
  animation: karelFabPulse 3s ease-in-out infinite;
}
.karel-hearing-fab:hover {
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(14,32,77,0.5);
}
.karel-hearing-fab .fab-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #21cdc0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

@keyframes karelFabPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(14,32,77,0.4); }
  50% { box-shadow: 0 4px 20px rgba(14,32,77,0.4), 0 0 0 8px rgba(33,205,192,0.15); }
}

/* Mobile: fab text hidden, just icon */
@media (max-width: 767px) {
  .karel-hearing-fab {
    bottom: 56px;
    right: 12px;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    justify-content: center;
  }
  .karel-hearing-fab .fab-text { display: none; }
  .karel-hearing-fab .fab-icon {
    width: 100%;
    height: 100%;
    background: transparent;
    font-size: 20px;
  }
}

/* ===== FOOTER CONTACT CARD TEXT FIX ===== */
.footer-widget-contact {
  color: #333 !important;
}
.footer-widget-contact .contact-list li {
  color: #555 !important;
}
.footer-widget-contact .phone__number {
  color: #3851a2 !important;
}
