/* ============================================
   RESPONSIVE STYLES
   Mobile-First Approach
   ============================================ */

/* ============================================
   TABLET - 768px to 1024px
   ============================================ */
@media screen and (max-width: 1024px) {
  :root {
    --font-size-3xl: 40px;
    --font-size-2xl: 28px;
    --font-size-xl: 20px;
    --spacing-2xl: 60px;
    --spacing-xl: 40px;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  /* Navigation */
  .nav-menu {
    gap: var(--spacing-md);
  }

  .nav-cta {
    display: none;
  }

  /* Hero */
  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

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

  .service-title {
    font-size: 21px;
    line-height: 1.35;
  }

  .service-description {
    font-size: 15px;
  }

  .gallery-caption {
    font-size: 15px;
    line-height: 1.35;
  }

  .footer-links a {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  /* About Section */
  .about-content {
    gap: var(--spacing-lg);
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
  }

  .stat {
    padding: var(--spacing-sm);
  }

  .stat-number {
    font-size: var(--font-size-xl);
  }

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

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  /* Contact */
  .contact-content {
    gap: var(--spacing-lg);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
  }
}

/* ============================================
   MOBILE - Below 768px
   ============================================ */
@media screen and (max-width: 768px) {
  :root {
    --font-size-3xl: 32px;
    --font-size-2xl: 24px;
    --font-size-xl: 18px;
    --font-size-lg: 16px;
    --spacing-2xl: 40px;
    --spacing-xl: 30px;
    --spacing-lg: 24px;
  }

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

  /* Section Headers */
  .section-title {
    font-size: 28px;
  }

  .section-subtitle {
    font-size: 16px;
  }

  /* ============================================
       HEADER & NAVIGATION - MOBILE
       ============================================ */
  .navbar {
    padding: 2px 0;
  }

  .logo-img {
    height: 40px;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-bg-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px var(--spacing-lg) var(--spacing-lg);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-base);
    z-index: 1000;
    gap: 0;
  }

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

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-link {
    display: block;
    padding: var(--spacing-md) 0;
    font-size: var(--font-size-lg);
  }

  .nav-link::after {
    display: none;
  }

  .nav-cta {
    display: flex;
    width: 100%;
    padding: var(--spacing-md) 0;
  }

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

  /* Overlay when menu is open */
  body.menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  /* ============================================
       HERO - MOBILE
       ============================================ */
  .hero {
    min-height: calc(100vh - 70px);
    margin-top: 70px;
    padding: var(--spacing-xl) 0;
  }

  .hero-title {
    font-size: 32px;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 16px;
    margin-bottom: var(--spacing-lg);
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

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

  .btn-lg {
    padding: 14px 28px;
    font-size: var(--font-size-base);
  }

  /* ============================================
       SERVICES - MOBILE
       ============================================ */
  .services {
    padding: var(--spacing-xl) 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .service-card {
    padding: var(--spacing-md);
  }

  .service-icon {
    width: 70px;
    height: 70px;
    font-size: 32px;
  }

  .service-title {
    font-size: var(--font-size-lg);
    line-height: 1.35;
  }

  .service-label-full {
    display: none;
  }

  .service-label-short {
    display: inline;
  }

  .service-description {
    font-size: 15px;
    line-height: 1.5;
  }

  /* ============================================
       ABOUT - MOBILE
       ============================================ */
  .about {
    padding: var(--spacing-xl) 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .about-text {
    order: 2;
  }

  .about-image {
    order: 1;
  }

  .image-placeholder {
    height: 300px;
    font-size: 48px;
  }

  .about-paragraph {
    font-size: var(--font-size-base);
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .stat-number {
    font-size: var(--font-size-xl);
  }

  /* ============================================
       WHY US - MOBILE
       ============================================ */
  .why-us {
    padding: var(--spacing-xl) 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .feature-card {
    padding: var(--spacing-md);
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }

  /* ============================================
       TESTIMONIALS - MOBILE
       ============================================ */
  .testimonials {
    padding: var(--spacing-xl) 0;
  }

  .testimonials-slider {
    min-height: 350px;
  }

  .testimonial-card {
    padding: var(--spacing-lg);
  }

  .testimonial-text {
    font-size: var(--font-size-base);
  }

  .testimonial-author {
    flex-direction: column;
    text-align: center;
  }

  .author-avatar {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  .slider-controls {
    gap: var(--spacing-sm);
  }

  .slider-btn {
    width: 40px;
    height: 40px;
  }

  /* ============================================
       GALLERY - MOBILE
       ============================================ */
  .gallery {
    padding: var(--spacing-xl) 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .gallery-placeholder {
    height: 250px;
  }

  .before-after {
    flex-direction: column;
    gap: var(--spacing-sm);
    font-size: var(--font-size-base);
  }

  .before-after i {
    transform: rotate(90deg);
    font-size: 24px;
  }

  .gallery-caption {
    font-size: 15px;
    line-height: 1.35;
  }

  /* ============================================
       CONTACT - MOBILE
       ============================================ */
  .contact {
    padding: var(--spacing-xl) 0;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .contact-form {
    padding: var(--spacing-lg);
  }

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

  .form-group {
    margin-bottom: var(--spacing-md);
  }

  input,
  select,
  textarea {
    padding: 10px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .contact-info {
    order: -1; /* Show info cards before form on mobile */
  }

  .info-card {
    padding: var(--spacing-md);
  }

  .info-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  /* ============================================
       FOOTER - MOBILE
       ============================================ */
  .footer {
    padding: var(--spacing-lg) 0 var(--spacing-md);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .footer-logo-img {
    height: 50px;
    margin: 0 auto var(--spacing-md);
  }

  .social-links {
    justify-content: center;
  }

  .footer-links,
  .footer-contact {
    text-align: center;
  }

  .footer-links a {
    font-size: 15px;
    line-height: 1.4;
  }

  .footer-contact li {
    justify-content: center;
  }

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

  .footer-legal {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  /* ============================================
       BACK TO TOP - MOBILE
       ============================================ */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  /* ============================================
       FLOATING CTA - MOBILE
       ============================================ */
  .floating-cta {
    bottom: 75px;
    right: 20px;
    padding: 12px 20px;
    font-size: 14px;
  }

  .floating-cta span {
    display: none;
  }

  .floating-cta i {
    font-size: 20px;
  }

  .floating-social {
    right: 20px;
    bottom: 76px;
    gap: 8px;
  }

  .floating-social-btn {
    width: 40px;
    height: 40px;
  }

  .floating-social-btn i {
    font-size: 18px;
  }
}

/* ============================================
   SMALL MOBILE - Below 480px
   ============================================ */
@media screen and (max-width: 480px) {
  :root {
    --font-size-3xl: 28px;
    --font-size-2xl: 22px;
    --spacing-2xl: 30px;
    --spacing-xl: 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .section-title {
    font-size: 24px;
  }

  .service-title {
    font-size: 17px;
  }

  .service-description,
  .gallery-caption,
  .footer-links a {
    font-size: 14px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 15px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 15px;
  }

  .service-icon,
  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }

  .testimonial-card {
    padding: var(--spacing-md);
  }

  .gallery-placeholder {
    height: 200px;
  }

  .contact-form {
    padding: var(--spacing-md);
  }

  .floating-social {
    bottom: 70px;
  }
}

/* ============================================
   LARGE DESKTOP - Above 1400px
   ============================================ */
@media screen and (min-width: 1400px) {
  :root {
    --container-width: 1320px;
    --font-size-3xl: 56px;
    --font-size-2xl: 36px;
  }

  .hero-title {
    font-size: 56px;
  }

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

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header,
  .hero-scroll,
  .hamburger,
  .slider-controls,
  .back-to-top,
  .contact-form {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  section {
    page-break-inside: avoid;
    padding: 20pt 0;
  }

  .service-card,
  .feature-card,
  .testimonial-card,
  .info-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus states for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@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 support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #000000;
    --color-accent: #0066cc;
    --color-text-gray: #333333;
  }

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

  .service-card,
  .feature-card,
  .testimonial-card {
    border: 2px solid var(--color-primary);
  }
}
