/* ============================================
   SANAL YOLCULUK — Responsive Styles
   Breakpoints: 1200, 992, 768, 480
   ============================================ */

/* ---------- Large Desktop ---------- */
@media (max-width: 1200px) {
  :root {
    --container-padding: 0 32px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-brand {
    grid-column: span 2;
    max-width: 100%;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 992px) {
  :root {
    --section-padding: 80px 0;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: var(--z-nav);
    padding: 80px 24px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    font-size: 1.3rem;
    font-weight: 600;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

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

  .about-visual {
    order: -1;
  }

  .about-float-card {
    bottom: -10px;
    right: 10px;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .contact-details-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-cta-card {
    padding: 40px 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .stat-item::after {
    display: none;
  }

  .section-header {
    margin-bottom: 48px;
  }

  /* Project panels — better tablet layout */
  .project-panel {
    padding: 60px 6%;
    height: 100vh;
    margin-bottom: 35vh;
    border-radius: 20px 20px 0 0;
  }

  .project-panel-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }

  /* Project modal responsive */
  .project-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .project-modal-body {
    padding: 24px 28px 28px;
  }

  .project-modal-title {
    font-size: 1.5rem;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
    --container-padding: 0 20px;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  h2 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  /* ---- Hero Mobile ---- */
  .hero {
    min-height: 100svh;
    padding-top: 100px;
    padding-bottom: 80px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 6px 14px;
  }

  .hero-shapes {
    display: none;
  }

  .hero-scroll {
    bottom: 16px;
  }

  /* ---- Project Panels Mobile ---- */
  .project-panel {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: unset;
    padding: 80px 20px 60px;
    margin-bottom: 30vh;
    align-items: flex-end;
    border-radius: 16px 16px 0 0;
  }

  .project-panel:first-child {
    border-radius: 0;
  }

  .project-panel:last-child {
    margin-bottom: 0;
  }

  .project-panel-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 12px;
  }

  .project-panel-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .project-panel-category {
    font-size: 0.7rem;
    padding: 5px 12px;
    margin-bottom: 12px;
  }

  .project-panel-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
    display: inline-flex;
  }

  .project-panel-content {
    max-width: 100%;
  }

  /* ---- Services Mobile ---- */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 28px 24px;
  }

  .service-card:hover {
    transform: translateY(-4px);
  }

  /* ---- Projects Grid Fallback ---- */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-info {
    opacity: 1;
    transform: translateY(0);
  }

  .project-card-icon {
    opacity: 1;
    transform: translateY(0);
  }

  /* ---- Tech Grid Mobile ---- */
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tech-item {
    padding: 24px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    text-align: left;
  }

  .tech-item:hover {
    transform: none;
  }

  .tech-icon {
    font-size: 2rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  /* ---- Stats Mobile ---- */
  .stats {
    padding: 48px 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  /* ---- Contact Mobile ---- */
  .contact-cta-card {
    padding: 32px 20px;
  }

  .contact-cta-title {
    font-size: 1.4rem;
  }

  .contact-cta-text {
    font-size: 1rem;
  }

  .btn-email {
    width: 100%;
    justify-content: center;
  }

  /* ---- About Mobile ---- */
  .about-image-container {
    aspect-ratio: 16/10;
  }

  .about-float-card {
    bottom: -10px;
    right: 5px;
    padding: 14px 18px;
  }

  .about-float-stat {
    font-size: 1.6rem;
  }

  .about-float-label {
    font-size: 0.75rem;
  }

  .about-text {
    font-size: 0.95rem;
  }

  .about-feature {
    padding: 10px 14px;
  }

  .about-feature-text {
    font-size: 0.85rem;
  }

  /* ---- Footer Mobile ---- */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* ---- Misc Mobile ---- */
  .scroll-top {
    width: 42px;
    height: 42px;
    bottom: 20px;
    right: 20px;
  }

  .lang-toggle {
    order: -1;
  }

  .projects-filter {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  /* SEO Section Mobile */
  .seo-content {
    padding: 40px 0;
  }

  .seo-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .seo-content h2 {
    font-size: 1.3rem;
  }

  .seo-content h3 {
    font-size: 1.1rem;
  }

  /* FAQ Section Mobile */
  .faq-grid {
    grid-template-columns: 1fr;
  }

  /* Project modal mobile */
  .project-modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .project-modal-body {
    padding: 20px;
  }

  .project-modal-title {
    font-size: 1.3rem;
  }

  .project-modal-desc {
    font-size: 0.95rem;
  }

  /* Section glows — hide on mobile to prevent horizontal overflow */
  .section-glow,
  .services-bg-glow,
  .projects-bg-glow {
    display: none;
  }

  /* Prevent horizontal overflow on mobile — avoid overflow-x on html to not break sticky */
  body {
    max-width: 100%;
  }

  /* Note: .projects-showcase excluded — overflow breaks position:sticky */
  .services,
  .about,
  .technology,
  .contact,
  .stats,
  .seo-content,
  .footer {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Mobile menu must not cause horizontal scroll */
  .nav-links {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

/* ---------- Small Mobile ---------- */
@media (max-width: 480px) {
  :root {
    --container-padding: 0 16px;
  }

  .hero {
    padding-top: 90px;
    padding-bottom: 60px;
  }

  .hero-title {
    margin-bottom: 16px;
  }

  .hero-title .line {
    line-height: 1.15;
  }

  .section-label {
    font-size: 0.7rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  /* Project Panels Small Mobile */
  .project-panel {
    height: 100svh;
    min-height: unset;
    padding: 70px 16px 40px;
    margin-bottom: 25vh;
  }

  .project-panel-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .project-panel-category {
    font-size: 0.65rem;
  }

  .project-panel-desc {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Stats Small Mobile */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* About Small Mobile */
  .about-features {
    gap: 10px;
  }

  .about-feature {
    padding: 8px 12px;
  }

  /* Navbar Small Mobile */
  .nav-logo span {
    font-size: 1.1rem;
  }

  .nav-logo-icon {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .lang-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  /* Footer Small Mobile */
  .footer {
    padding: 40px 0 20px;
  }

  .footer-content {
    gap: 24px;
  }

  .footer-logo {
    font-size: 1.1rem;
  }

  .footer-description {
    font-size: 0.85rem;
  }

  .footer-link {
    font-size: 0.85rem;
  }

  .footer-heading {
    font-size: 0.9rem;
  }

  /* Contact Small Mobile */
  .contact-cta-card {
    padding: 24px 16px;
  }

  .contact-cta-icon {
    font-size: 2.4rem;
  }

  .contact-cta-title {
    font-size: 1.2rem;
  }

  .contact-detail-card {
    padding: 20px 16px;
  }
}

/* ---------- Very Small Mobile (320px) ---------- */
@media (max-width: 360px) {
  .hero-badge {
    font-size: 0.6rem;
    padding: 5px 10px;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .project-panel {
    height: 100svh;
    min-height: unset;
    padding: 60px 14px 36px;
    margin-bottom: 20vh;
  }

  .project-panel-title {
    font-size: 1.4rem;
  }

  .nav-logo span {
    font-size: 1rem;
  }
}

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

  .hero-shapes {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- High Contrast / Dark Preference ---------- */
@media (prefers-contrast: high) {
  :root {
    --border-subtle: rgba(255, 255, 255, 0.2);
    --border-light: rgba(255, 255, 255, 0.3);
    --text-secondary: #c8c8d8;
    --text-muted: #8888a0;
  }
}

/* ---------- Landscape Mobile Fix ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 80px 20px 40px;
  }

  .hero-scroll {
    display: none;
  }

  .project-panel {
    height: 100svh;
    min-height: unset;
    padding: 60px 20px 40px;
    margin-bottom: 20vh;
  }
}
