/* ==========================================================================
   Responsive Design - Max-Width Media Queries
   ========================================================================== */

/* Screens up to 1024px (≤1024px) */
@media (max-width: 1024px) {
  .container {
    width: 95%;
    padding: 0 var(--space-lg);
  }
  
  .hero {
    height: 68vh;
    min-height: 450px;
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero .slide {
    object-position: 50% 15%;
  }
  
  .hero-content {
    text-align: center;
    padding: clamp(2rem, 6vw, 4rem) var(--space-xl);
  }
  
  .hero h1 {
    font-size: clamp(2rem, 5.5vw, 3.2rem);
    letter-spacing: 0.015em;
    line-height: 1.05;
  }
  
  .hero p {
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.3;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablet - 768px and below */
@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-figure .avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
  
  .kv {
    grid-template-columns: 1fr;
  }
  
  .hero {
    height: 64vh;
    min-height: 400px;
    grid-template-columns: 1fr;
  }
  
  .hero .slide {
    object-position: 50% 5%;
  }
  
  .hero-overlay {
    background: linear-gradient(
      90deg,
      rgba(15, 23, 42, 0.75) 0%,
      rgba(15, 23, 42, 0.5) 40%,
      rgba(15, 23, 42, 0.2) 70%
    );
  }
  
  .hero-content {
    padding: clamp(2rem, 4vw, 3rem) var(--space-lg);
    text-align: center;
  }
  
  .hero .cta {
    flex-direction: column;
    gap: var(--space);
  }
  
  .hero .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .nav-toggle { display: inline-flex; }
  header .inner { gap: var(--space); }
  .brand { margin-right: auto; }

  /* HIZLI AÇILIR MENÜ: transform + opacity */
  .navlinks {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: grid;
    gap: var(--space);
    padding: var(--space-lg);

    /* YALNIZCA GPU ÖZELLİKLERİ */
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;

    /* performans ipucu */
    will-change: transform, opacity;

    /* kısa ve tepkisel */
    transition: transform 140ms ease, opacity 140ms ease;

    z-index: 98;
  }

  .navlinks.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .navlinks a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.95rem;
  }

  .navlinks .btn { width: 100%; }

  /* (isteğe bağlı) mobilde blur’u kapat — hafifler */
  header.navbar { position: sticky; top: 0; z-index: 99; backdrop-filter: none; }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {
  .hero {
    height: 64vh;
    min-height: 350px;
  }
  
  .hero .slide {
    object-position: 50% 5%;
  }
  
  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    margin-bottom: var(--space);
    letter-spacing: 0.01em;
    line-height: 1.1;
  }
  
  .hero p {
    font-size: clamp(1rem, 3.2vw, 1.2rem);
    margin-bottom: var(--space-lg);
    line-height: 1.25;
    font-style: italic;
    font-weight: 500;
  }
  
  .hero .cta {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .hero .btn {
    width: 100%;
    max-width: 260px;
    height: 48px;
    padding: 12px 16px;
    font-size: 0.95rem;
  }
}

/* Reduce motion for users preferring less animation */
@media (prefers-reduced-motion: reduce) {
  .navlinks {
    transition: none;
  }
}
