/* ==========================================================================
   Beşköprü Yıldızlar Yükseköğrenim Erkek Öğrenci Yurdu
   100% Rock-Solid Mobile-First Stylesheet & Reset
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --primary: #0a1e36;
  --primary-light: #153258;
  --primary-dark: #061324;
  --accent: #d97706;
  --accent-light: #f59e0b;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c7e;
  --bg-page: #f8fafc;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --header-height: 72px;
}

/* Global Reset & Overflow Protection */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* Images & Media Safety */
img, svg, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Sticky Header */
.site-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px -2px rgba(10, 30, 54, 0.08);
}

/* Clean UI Cards */
.ui-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .ui-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(10, 30, 54, 0.06);
  }
}

/* Mobile Navigation Overlay */
#mobileMenuOverlay {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobileMenuDrawer {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Room & Tab Filter Buttons */
.tab-btn {
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}

/* Gallery Item Styling */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.875rem;
  cursor: pointer;
  background-color: #e2e8f0;
}

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

.gallery-overlay {
  background: linear-gradient(to top, rgba(10, 30, 54, 0.9) 0%, rgba(10, 30, 54, 0.2) 60%, transparent 100%);
  transition: opacity 0.25s ease;
}

@media (hover: hover) {
  .gallery-overlay {
    opacity: 0;
  }
  .gallery-item:hover img {
    transform: scale(1.05);
  }
  .gallery-item:hover .gallery-overlay {
    opacity: 1;
  }
}

@media (hover: none) {
  .gallery-overlay {
    opacity: 1;
  }
}

/* Lightbox Modal */
#lightboxModal {
  transition: opacity 0.25s ease;
}

/* FAQ Accordion Item */
.faq-header {
  cursor: pointer;
  user-select: none;
}

.faq-header:hover {
  color: var(--accent);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.2s ease;
}

.faq-item.active .faq-content {
  max-height: 400px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--accent);
}

/* Google Reviews Card */
.review-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .review-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(10, 30, 54, 0.04);
  }
}

/* ================= WHATSAPP WIDGET & POPUPS ================= */
.whatsapp-widget-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Tooltip Balloon */
.wa-tooltip-balloon {
  margin-bottom: 10px;
  background: #ffffff;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  width: 270px;
  max-width: calc(100vw - 40px);
  font-size: 0.8rem;
  line-height: 1.35;
  cursor: pointer;
  transform: translateY(12px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.wa-tooltip-balloon.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.wa-tooltip-balloon::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

/* WhatsApp Floating Circle Button */
.wa-circle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  text-decoration: none;
}

.wa-circle-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.5);
}

.wa-online-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background-color: #ef4444;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
}

/* WhatsApp Quick Chat Window */
.wa-popover-box {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
}

.wa-popover-box.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
}

.wa-popover-header {
  background: #075e54;
  color: #ffffff;
  padding: 14px 16px;
}

.wa-quick-btn {
  padding: 9px 12px;
  background: #ffffff;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #1e293b;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border: 1px solid #e2e8f0;
  text-align: left;
  width: 100%;
}

.wa-quick-btn:hover {
  background: #f1f5f9;
}

/* Scroll To Top */
.scroll-top-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 999;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Responsive Mobile Rules */
@media (max-width: 640px) {
  :root {
    --header-height: 64px;
  }
  .whatsapp-widget-container {
    bottom: 14px;
    right: 14px;
  }
  .scroll-top-btn {
    bottom: 14px;
    left: 14px;
    width: 40px;
    height: 40px;
  }
  .wa-circle-btn {
    width: 52px;
    height: 52px;
  }
  .wa-popover-box {
    width: 290px;
    bottom: 64px;
  }
}
