/* ============================================
   ANAHTAR TESLİM CAFE - MOBILE FIRST RESPONSIVE
   Google Mobile-Friendly & Core Web Vitals Optimized
   ============================================ */

/* --- BASE MOBILE STYLES (320px+) --- */
/* Tüm sitenin temel mobil stilleri - Mobile First yaklaşımı */

:root {
  --touch-min: 48px;
  --font-min: 16px;
  --container-padding: 16px;
}

/* Viewport Fix - Yatay kaydırmayı engelle */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Container - Mobil öncelikli */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  box-sizing: border-box;
}

/* Typography - Minimum 16px font */
body {
  font-size: var(--font-min);
  line-height: 1.6;
}

h1 {
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1.2;
  word-wrap: break-word;
}

h2 {
  font-size: clamp(24px, 6vw, 40px);
  line-height: 1.3;
  word-wrap: break-word;
}

h3 {
  font-size: clamp(20px, 5vw, 32px);
  line-height: 1.4;
}

h4 {
  font-size: clamp(18px, 4.5vw, 24px);
}

p {
  font-size: clamp(14px, 4vw, 16px);
  line-height: 1.7;
}

/* Touch Friendly Elements - Minimum 48px */
button, 
.btn,
a.btn,
.nav-link,
.filter-btn,
.filter-pill,
.action-btn,
.mobile-nav a,
.social-links a,
.footer-social {
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

/* Form Elements Touch Optimization */
input,
select,
textarea {
  font-size: var(--font-min); /* Prevents zoom on iOS */
  min-height: var(--touch-min);
  padding: 12px 16px;
  border-radius: 8px;
}

/* Navbar Mobile — override luxury.css for small screens */
.nav-logo-icon {
  width: 38px;
  height: 38px;
}

/* Hamburger Menu - Touch optimized */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  gap: 6px;
  cursor: pointer;
  padding: 12px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 24px;
  background: var(--black);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height */
  background: var(--white);
  z-index: 2000;
  transition: right 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -5px 0 20px rgba(0,0,0,0.2);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: var(--touch-min);
  height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  font-size: 16px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text);
}

.mobile-nav a i {
  width: 24px;
  margin-right: 12px;
  color: var(--gold);
}

/* Overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hero Section Mobile */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 80px var(--container-padding) 40px;
  display: flex;
  align-items: center;
}

.hero-title {
  font-size: clamp(32px, 8vw, 56px);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(16px, 4vw, 20px);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.hero-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 18px 32px;
  font-size: 14px;
}

/* Hero Stats Mobile */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero-stat {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 16px;
}

.hero-stat-number {
  font-size: 32px;
}

.hero-stat-label {
  font-size: 11px;
}

/* Section Spacing Mobile */
.section {
  padding: 60px 0;
}

.section-sm {
  padding: 40px 0;
}

/* Grids Mobile - Single Column */
.grid-1,
.grid-2,
.grid-3,
.grid-4,
.grid-auto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Service Cards Mobile */
.service-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-card {
  padding: 32px 24px;
  border-radius: 16px;
}

.service-card-icon {
  width: 56px;
  height: 56px;
  font-size: 24px;
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  margin-bottom: 20px;
}

/* Project Cards Mobile */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
}

/* Feature Boxes Mobile */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-box {
  padding: 32px 24px;
  text-align: center;
  border-radius: 16px;
}

.feature-box-icon {
  width: 56px;
  height: 56px;
  font-size: 24px;
  margin: 0 auto 20px;
}

/* Testimonials Mobile */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.testimonial-card {
  padding: 32px 24px;
  border-radius: 16px;
}

.testimonial-text {
  font-size: 15px;
  line-height: 1.8;
}

.testimonial-author {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* Footer Mobile */
.footer {
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.footer-heading {
  font-size: 16px;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social {
  width: var(--touch-min);
  height: var(--touch-min);
}

.footer-bottom {
  flex-direction: column;
  gap: 16px;
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
}

/* Page Hero Mobile */
.page-hero {
  min-height: 30vh;
  padding: 88px var(--container-padding) 36px;
}

.page-hero-title {
  font-size: clamp(28px, 7vw, 48px);
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scroll Snap for Carousels */
.scroll-snap {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-snap > * {
  scroll-snap-align: start;
}

/* Prevent text zoom on orientation change */
@media screen and (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: auto;
    padding: 80px var(--container-padding);
  }
}

/* ============================================
   TABLET STYLES (640px+)
   ============================================ */
@media (min-width: 640px) {
  :root {
    --container-padding: 24px;
  }
  
  .container {
    max-width: 640px;
  }
  
  /* Two column grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .service-cards,
  .features-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Hero buttons side by side */
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .hero-actions .btn {
    width: auto;
    flex: 1;
    min-width: 200px;
  }
}

/* ============================================
   LAPTOP STYLES (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  :root {
    --container-padding: 32px;
  }
  
  .container {
    max-width: 1024px;
  }
  
  /* Show desktop nav, hide hamburger */
  .hamburger {
    display: none;
  }
  
  .nav-menu {
    display: flex;
  }
  
  /* Three column grids */
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .service-cards,
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Footer 4 columns */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
  
  /* Section padding */
  .section {
    padding: 100px 0;
  }
  
  .section-sm {
    padding: 60px 0;
  }
  
  /* Hero */
  .hero {
    padding: 120px var(--container-padding) 80px;
  }
  
  .hero-stats {
    position: absolute;
    right: var(--container-padding);
    bottom: 80px;
    flex-direction: column;
  }
}

/* ============================================
   DESKTOP STYLES (1280px+)
   ============================================ */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
  
  /* Four column grids */
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   LARGE SCREENS (1536px+)
   ============================================ */
@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .btn,
  .filter-btn,
  .filter-pill {
    border-width: 2px;
  }
}

/* Print styles */
@media print {
  .navbar,
  .hamburger,
  .mobile-menu,
  .hero-stats,
  .footer {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}
