/* =====================================================
   Sürdürülebilirlik.com.tr by Türkçev Çevre - Responsive Styles
   Mobile-first Media Queries
   ===================================================== */

/* ===== BASE (Mobile First) ===== */

/* Mobile Navigation */
@media (max-width: 1023px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .nav-actions .btn {
    display: none;
  }
}

/* ===== SM: Small Devices (640px+) ===== */
@media (min-width: 640px) {
  .container {
    padding: 0 var(--spacing-xl);
  }

  /* Counter Grid - 2 columns */
  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero CTA - horizontal */
  .hero-cta {
    flex-direction: row;
  }

  /* Newsletter Form - horizontal */
  .newsletter-form {
    flex-direction: row;
  }

  /* Filter Bar - wrap */
  .filter-bar {
    flex-wrap: wrap;
  }
}

/* ===== MD: Medium Devices (768px+) ===== */
@media (min-width: 768px) {
  /* Section Padding */
  .section {
    padding: var(--spacing-4xl) 0;
  }

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

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

  /* Footer Grid - 2x2 */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Content Grid - 2 columns */
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Values Grid - 2 columns */
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Team Grid - 2 columns */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Split Layout */
  .split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
  }

  /* Contact Grid */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
  }

  /* Modal width */
  .modal {
    max-width: 700px;
  }

  /* Cookie Banner */
  .cookie-content {
    flex-direction: row;
  }
}

/* ===== LG: Large Devices (1024px+) ===== */
@media (min-width: 1024px) {
  /* Navigation - Full */
  .nav-links {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .nav-actions .btn {
    display: inline-flex;
  }

  /* Counter Grid - 4 columns */
  .counter-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Services Grid - 4 columns */
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Projects Grid - 3 columns */
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Content Grid - 3 columns */
  .content-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Values Grid - 3 columns */
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Team Grid - 4 columns */
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Footer Grid - 4 columns */
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }

  /* Impact Grid */
  .impact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }

  /* Dashboard Grid */
  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }

  .dashboard-grid .chart-large {
    grid-column: span 2;
  }

  /* Process Steps - Horizontal */
  .process-steps {
    display: flex;
    justify-content: space-between;
  }

  /* Timeline - Horizontal variant */
  .timeline-horizontal {
    display: flex;
    padding-left: 0;
  }

  .timeline-horizontal::before {
    left: 0;
    right: 0;
    top: 12px;
    width: 100%;
    height: 2px;
  }

  .timeline-horizontal .timeline-item::before {
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
  }

  /* Slider - Show multiple */
  .slider-slide {
    flex: 0 0 33.333%;
  }

  /* SDG Grid */
  .sdg-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===== XL: Extra Large Devices (1280px+) ===== */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--spacing-2xl);
  }

  /* Hero - larger text */
  .hero-title {
    font-size: 4.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  /* Dashboard Grid - 3 columns */
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-grid .chart-large {
    grid-column: span 2;
  }

  /* Calculator Layout */
  .calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
  }

  /* Before/After Layout */
  .before-after-container {
    max-width: 1000px;
  }
}

/* ===== 2XL: Double Extra Large Devices (1536px+) ===== */
@media (min-width: 1536px) {
  .container-lg {
    max-width: 1536px;
  }

  /* Projects Grid - 4 columns */
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Content Grid - 4 columns */
  .content-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* SDG Grid - full */
  .sdg-grid {
    grid-template-columns: repeat(9, 1fr);
  }
}

/* ===== SPECIFIC COMPONENT RESPONSIVE STYLES ===== */

/* Hero Section */
@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .scroll-indicator {
    display: none;
  }
}

/* Header */
@media (max-width: 1023px) {
  .header {
    padding: var(--spacing-md) 0;
  }

  .header.scrolled {
    padding: var(--spacing-sm) 0;
  }
}

/* Counter Section */
@media (max-width: 639px) {
  .counter-grid {
    grid-template-columns: 1fr;
  }

  .counter-item {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
  }

  .counter-item:last-child {
    border-bottom: none;
  }

  .counter-value {
    font-size: 2.5rem;
  }
}

/* Service Cards */
@media (max-width: 1023px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }
}

/* Split Layout */
@media (max-width: 767px) {
  .split-layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
  }

  .split-layout.reverse-mobile {
    flex-direction: column-reverse;
  }
}

/* Contact Form */
@media (max-width: 767px) {
  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
  }
}

/* Process Steps */
@media (max-width: 1023px) {
  .process-steps {
    flex-direction: column;
    align-items: center;
  }

  .process-step {
    min-width: 100%;
    max-width: 400px;
  }

  .process-step::after {
    top: auto;
    bottom: -20px;
    right: 50%;
    transform: translateX(50%) rotate(90deg);
  }
}

/* Timeline */
@media (max-width: 767px) {
  .timeline {
    padding-left: var(--spacing-2xl);
  }

  .timeline-item::before {
    left: calc(-1 * var(--spacing-2xl) + 4px);
    width: 10px;
    height: 10px;
  }
}

/* Tabs */
@media (max-width: 767px) {
  .tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tab-list::-webkit-scrollbar {
    display: none;
  }

  .tab-button {
    flex-shrink: 0;
  }
}

/* Filter Bar */
@media (max-width: 767px) {
  .filter-bar {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group .form-select {
    flex: 1;
  }
}

/* Cards */
@media (max-width: 639px) {
  .card-glass {
    padding: var(--spacing-lg);
  }

  .project-card-image {
    height: 180px;
  }
}

/* Testimonials */
@media (max-width: 639px) {
  .testimonial-card {
    padding: var(--spacing-lg);
  }

  .testimonial-quote {
    font-size: 3rem;
  }

  .testimonial-text {
    font-size: 1rem;
    padding-left: 0;
  }
}

/* Modal */
@media (max-width: 639px) {
  .modal {
    width: 95%;
    max-height: 95vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--spacing-lg);
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* Cookie Banner */
@media (max-width: 767px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-actions .btn {
    width: 100%;
  }
}

/* Back to Top */
@media (max-width: 639px) {
  .back-to-top {
    right: var(--spacing-md);
    bottom: var(--spacing-md);
    width: 40px;
    height: 40px;
  }
}

/* Slider Arrows */
@media (max-width: 767px) {
  .slider-arrow {
    width: 40px;
    height: 40px;
  }

  .slider-prev {
    left: var(--spacing-sm);
  }

  .slider-next {
    right: var(--spacing-sm);
  }
}

/* Logo Strip */
@media (max-width: 639px) {
  .logo-strip {
    gap: var(--spacing-xl);
  }

  .logo-strip img {
    height: 30px;
  }
}

/* Newsletter */
@media (max-width: 639px) {
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
  }
}

/* Calculator */
@media (max-width: 1279px) {
  .calculator-layout {
    flex-direction: column;
  }
}

/* SDG Grid */
@media (max-width: 1023px) {
  .sdg-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 639px) {
  .sdg-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Charts */
@media (max-width: 767px) {
  .chart-container {
    height: 250px;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .back-to-top,
  .cookie-banner,
  .theme-toggle,
  .mobile-menu,
  .menu-toggle,
  #particles-container {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    page-break-inside: avoid;
  }

  .card,
  .card-glass {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.5);
  }

  .btn-primary {
    border: 2px solid var(--primary-900);
  }

  .btn-secondary {
    border: 2px solid var(--text-primary);
  }
}

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

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}
