/* ════════════════════════════════════════════════════════
   BRITOL GROUP — Responsive Design Breakpoints
   ════════════════════════════════════════════════════════ */

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

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .gallery-item:nth-child(1) {
    grid-column: span 2;
    height: 280px;
  }

  .gallery-item:nth-child(4) {
    grid-row: auto;
    height: 200px;
  }

  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(5),
  .gallery-item:nth-child(6) {
    height: 200px;
  }

  .about-grid {
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  .navbar .container {
    height: 70px;
    padding: 0 16px;
  }

  .nav-logo img {
    height: 40px;
  }

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

  .hamburger {
    display: flex;
    position: relative;
    z-index: 1002;
    flex-shrink: 0;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 90px 24px 40px;
    gap: 4px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, .15);
    transition: right var(--transition);
    z-index: 1001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border-radius: 14px;
    text-align: left;
    white-space: nowrap;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item:nth-child(1) {
    grid-column: auto;
    height: 250px;
  }

  .gallery-item:nth-child(4) {
    height: 250px;
  }

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

  .about-image .experience-badge {
    bottom: -10px;
    right: 10px;
    padding: 14px 20px;
  }

  .experience-badge .number {
    font-size: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 28px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .mailing-form {
    flex-direction: column;
  }

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

  .testimonial-card-inner {
    padding: 32px 20px;
  }

  /* Improve form inputs on mobile */
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    font-size: 16px;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    transition: var(--transition);
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(51, 172, 220, 0.1);
    outline: none;
  }

  .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
  }

  .btn {
    width: 100%;
    max-width: none;
    min-height: 48px;
  }
}

@media (max-width: 480px) {
  .navbar .container {
    height: 60px;
    padding: 0 12px;
  }

  .nav-logo img {
    height: 34px;
  }

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

  .nav-logo {
    gap: 8px;
  }

  .hamburger {
    padding: 6px;
  }

  .hamburger span {
    width: 22px;
    height: 2.5px;
  }

  .nav-links {
    width: min(280px, 85vw);
    padding: 80px 20px 30px;
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: .95rem;
  }

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

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    padding: 14px 28px;
    font-size: .92rem;
    width: 100%;
    max-width: 280px;
    min-height: 48px;
  }

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

  .promo-banner {
    font-size: .82rem;
    padding: 10px 16px;
  }

  /* Improve form accessibility on mobile */
  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 48px;
    padding: 12px 16px;
  }

  label {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .contact-detail {
    padding: 12px 0;
  }
}

/* Extra small devices (< 360px) */
@media (max-width: 360px) {
  .navbar .container {
    height: 56px;
  }

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

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

  .hero h1 {
    font-size: 1.75rem;
    margin-bottom: 16px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 16px;
    margin-bottom: 16px;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.85rem;
    max-width: 100%;
  }

  .promo-banner {
    font-size: 0.7rem;
    padding: 8px 12px;
  }

  section {
    padding: 40px 0;
  }

  .container {
    padding: 0 12px;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section-heading p {
    font-size: 0.9rem;
  }
}
