/* ============================================
   PERGE KUYUMCULUK — V2 (Premium Clean Aesthetic)
   ============================================ */

:root {
  --bg-main: #16191d;
  --bg-surface: #1c1f24;
  --gold: #d4af37;
  --text-primary: #f8f9fa;
  --text-muted: #9ca3af;
  --divider: rgba(255, 255, 255, 0.08);

  /* Button Colors - Premium Translucent */
  --green-bg: rgba(37, 211, 102, 0.12);
  --green-text: #4ade80;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --blue-text: #60a5fa;
  
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

/* ============================================
   PREMIUM HEADER
   ============================================ */

.header {
  background: var(--bg-main);
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px 32px;
  gap: 40px;
}

.header-toggle {
  display: none;
}

/* BRAND */
.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo {
  height: 48px;
  width: auto;
  display: block;
}

/* BRANCHES CONTAINER */
.branches {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
  justify-content: center;
}

.divider {
  width: 1px;
  height: 40px;
  background: var(--divider);
  flex-shrink: 0;
}

/* BRANCH CARD (Typography Driven) */
.branch-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.branch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.branch-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.branch-address {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* BUTTONS (Pill style, Apple-like) */
.branch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px; /* Pill */
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition);
}

.mobile-text {
  display: none;
}

.btn-call {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid rgba(37, 211, 102, 0.05); /* Subtle invisible boundary */
}

.btn-call:hover {
  background: rgba(37, 211, 102, 0.2);
  color: #fff;
}

.btn-map {
  background: var(--blue-bg);
  color: var(--blue-text);
  border: 1px solid rgba(59, 130, 246, 0.05);
}

.btn-map:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
}

/* SOCIALS */
.socials {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition);
}

.whatsapp {
  background: rgba(37, 211, 102, 0.15);
  color: #4ade80;
}

.whatsapp:hover {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.social-circle-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--divider);
  transition: var(--transition);
}

.social-circle:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-1px);
}

/* ============================================
   EMBED & SPLIT VIEW CONTAINER
   ============================================ */

.embed-container {
  flex: 1;
  position: relative;
  display: flex;
  background: var(--bg-main);
  overflow: hidden;
}

.embed-main {
  flex: 1; /* Default takes 100% */
  position: relative;
  transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: #000;
}

.embed-sidebar {
  flex: 0 0 0%;
  width: 0;
  position: relative;
  background: var(--bg-main);
  border-left: 1px solid transparent;
  transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s ease;
  z-index: 5;
  overflow: hidden;
}

.sidebar-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.embed-side-frame {
  transform: scale(var(--kur-scale, 1));
  transform-origin: top left;
  width: calc(100% / var(--kur-scale, 1));
  height: calc(100% / var(--kur-scale, 1));
  border: none;
  display: block;
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease;
}

/* Sidebar Zoom Controls */
.kur-zoom-kontroller {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 50;
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--divider);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.kur-zoom-kontroller button {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--divider);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.kur-zoom-kontroller button:hover {
  background: var(--gold);
  color: var(--bg-main);
  border-color: var(--gold);
}

/* Sidebar Open State */
.embed-container.sidebar-open .embed-main {
  flex: 0 0 70%;
}

.embed-container.sidebar-open .embed-sidebar {
  flex: 0 0 30%;
  border-color: var(--divider);
}

/* Floating Toggle Button */
.kur-toggle-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold);
  color: var(--bg-main);
  padding: 16px 10px;
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  z-index: 50;
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  font-weight: 600;
  box-shadow: -4px 0 16px rgba(0,0,0,0.3);
}

.kur-yazi {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.kur-ikon-ok {
  transition: transform 0.4s ease;
}

.embed-container.sidebar-open .kur-toggle-btn {
  right: 30%;
}

.embed-container.sidebar-open .kur-ikon-ok {
  transform: rotate(180deg);
}

.embed-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.embed-frame.yuklendi {
  opacity: 1;
}

/* Loader */
.loader-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  z-index: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader-wrap.gizli {
  opacity: 0;
  visibility: hidden;
}

.loader-bar {
  width: 100px;
  height: 2px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.loader-progress {
  width: 30%;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  animation: loading-slide 1.2s ease-in-out infinite;
}

@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(250%); }
  100% { transform: translateX(250%); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

.header {
  animation: fade-in-down 0.5s ease-out;
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MOBILE RESPONSIVENESS (Elegant Stack)
   ============================================ */

@media (max-width: 1024px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .header {
    border-bottom: none; /* Let the toggle be the boundary indicator */
  }

  .header-inner {
    flex-direction: column;
    padding: 24px 20px 32px 20px;
    gap: 28px;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease, margin 0.4s ease;
    max-height: 800px;
    opacity: 1;
    overflow: hidden;
  }

  .header.collapsed .header-inner {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
  }

  .header-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 0 16px;
    height: 32px;
    background: var(--bg-surface);
    color: var(--gold);
    border: 1px solid var(--divider);
    border-top: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 20;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    gap: 8px;
    transition: all 0.3s ease;
  }

  .toggle-text {
    display: none;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
  }

  .header.collapsed .toggle-text {
    display: block;
  }

  .ikon-ac {
    display: none;
  }

  .header.collapsed .ikon-kapat {
    display: none;
  }

  .header.collapsed .ikon-ac {
    display: block;
  }

  .brand {
    justify-content: center;
  }

  .logo {
    height: 56px; /* Elegant larger logo */
  }

  /* Social row floats neatly below logo in a tight group */
  .socials {
    justify-content: center;
    width: 100%;
  }

  .whatsapp span {
    display: none; /* Icon only */
  }

  .whatsapp {
    padding: 8px; /* Make it a circle-like pill */
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }

  .social-circle-group {
    gap: 12px;
  }

  /* Branches Stack */
  .branches {
    flex-direction: column;
    width: 100%;
    gap: 24px;
  }

  .divider {
    width: 100%;
    height: 1px;
  }

  .branch-card {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .branch-info {
    gap: 4px;
    margin-bottom: 6px;
  }
  
  .branch-name {
    font-size: 0.85rem;
  }

  .branch-address {
    font-size: 0.75rem;
  }

  .branch-actions {
    width: 100%;
    max-width: 300px;
    display: flex;
    justify-content: center;
    gap: 12px;
  }

  .btn {
    flex: 1;
    justify-content: center;
    padding: 10px;
    font-size: 0.8rem;
  }

  .desktop-text {
    display: none;
  }

  .mobile-text {
    display: inline;
  }

  /* Mobil Görünümde Kur Sekmesini Tamamen Gizle */
  .embed-sidebar,
  .kur-toggle-btn {
    display: none !important;
  }

  .embed-container {
    min-height: 70vh;
  }
}
