/* ===================
   RESPONSIVE STYLES
=================== */

/* Base Configuration */
:root {
  --title-font-size: 2.25rem;
  --subtitle-font-size: 1.125rem;
}

.back-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  animation: float 3s ease-in-out infinite;
}

.foot-icon {
  width: auto;
  height: auto;
  filter: invert(23%) sepia(29%) saturate(1338%) hue-rotate(127deg) brightness(96%) contrast(88%);
}



/* ===================
   LARGE SCREENS (1200px+)
=================== */
@media (min-width: 1200px) {
  .container {
    max-width: 1120px;
    margin: 0 auto;
  }

  .section { padding: 10rem 0; }

  /* Grid Layouts */
  #about .container.grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .contact-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
  }

  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
  }
}

/* ===================
   DESKTOP AND LAPTOPS (992px - 1199px)
=================== */
@media (max-width: 1199px) {
  .container {
    width: 90%;
    max-width: 960px;
  }

  .section { padding: 8rem 0; }

  /* Content Adjustments */
  .hero-content { padding-left: 3%; }

  .content-wrapper {
    max-width: 380px;
    animation: floating 3s ease-in-out infinite;
  }

  .content-wrapper:hover {
    transform: translateY(-12px);
    box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.12),
      0 8px 24px rgba(58, 167, 155, 0.15);
  }

  /* Grid Layouts */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  #about .container.grid { gap: 3rem; }

  .contact-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

/* ===================
   TABLETS (768px - 991px)
=================== */
@media (max-width: 991px) {
  :root {
    --title-font-size: 2rem;
    --subtitle-font-size: 1rem;
  }

  .section { padding: 6rem 0; }

  /* Header */
  .logo-container h1 { font-size: 1.3rem; }

  /* Hero Adjustments */
  .hero-background {
    left: 20%;
    width: 80%;
    opacity: 0.8;
  }

  .content-wrapper {
    max-width: 320px;
    padding: 1.5rem;
  }

  /* Sections Layout */
  #about .container.grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #about .image {
    max-width: 400px;
    margin: 0 auto;
  }

  #about .text { padding-right: 0; }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Layout Adjustments */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* ===================
   MOBILE LANDSCAPE (700px - 767px)
=================== */
@media (max-width: 767px) {
  /* Mobile Menu */
  .menu-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    z-index: 100;
  }

  .menu-button span {
    width: 100%;
    height: 2px;
    margin: 2px;
    background: #FFFFFF;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .menu-button:hover span:nth-child(1) { width: 70%; }
  .menu-button:hover span:nth-child(2) { width: 90%; }
  .menu-button:hover span:nth-child(3) { width: 60%; }

  .menu-button.active span:nth-child(1) {
    width: 100%;
    transform: rotate(45deg) translateY(6px);
  }

  .menu-button.active span:nth-child(2) {
    width: 0;
    opacity: 0;
  }

  .menu-button.active span:nth-child(3) {
    width: 100%;
    transform: rotate(-45deg) translateY(-6px);
  }

  /* Mobile Navigation */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(58, 167, 155, 0.97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: 0.3s ease;
    z-index: 99;
  }

  .nav-links.active {
    right: 0;
  }

  /* Navigation Animation */
  .nav-links li {
    opacity: 0;
    transform: translateX(50px);
    transition: 0.3s ease;
  }

  .nav-links.active li { 
    opacity: 1;
    transform: translateX(0);
  }
  

  /* Hero Section */
  .hero {
    min-height: calc(100vh - var(--header-height));
    height: auto;
    padding: 4rem 0;
  }

  .hero-background {
    left: 0;
    width: 100%;
    opacity: 0.5;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .hero-content {
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
  }

  .content-wrapper {
    width: 60%;
    margin: 0 30% 0 0;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.97);
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ===================
   MOBILE PORTRAIT (480px - 767px)
=================== */
@media (max-width: 480px) {
  :root {
    --title-font-size: 1.75rem;
    --subtitle-font-size: 0.9rem;
  }

  .section { padding: 4rem 0; }

  /* Container */
  .container {
    width: 100%;
    padding: 0 1.5rem;
  }

  /* Header */
  .logo-container h1 { font-size: 1.2rem; }
  
  .img-logo {
    width: 2.5rem;
    height: 2.5rem;
  }

  /* Hero Adjustments */
  .content-wrapper {
    width: 90%;
    margin: 0;
  }

  /* Typography */
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.9rem; }
  #about .title { font-size: 2rem; }
  #services .title { 
    font-size: 2rem;
    line-height: 1.2;
    padding: 0 1rem;
  }

  /* Layout Adjustments */
  .testimonial-header,
  .testimonial-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* ===================
   SMALL MOBILE (360px - 479px)
=================== */
@media (max-width: 360px) {
  :root {
    --header-height: 3.5rem;
    --title-font-size: 1.5rem;
    --subtitle-font-size: 0.85rem;
  }

  /* Header */
  .logo-container h1 { font-size: 1rem; }
  
  .img-logo {
    width: 2rem;
    height: 2rem;
  }

  /* Navigation */
  .nav-links { width: 85%; }

  /* Content Sizing */
  .hero h1 { font-size: 1.4rem; }
  #about .title { font-size: 1.6rem; }
  #services .title { font-size: 1.8rem; }
  
  /* Footer */
  .footer-brand .logo-text { font-size: 1.2rem; }
  .footer-description { font-size: 0.85rem; }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    right: 1rem;
    bottom: 1rem;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===================
   PRINT STYLES
=================== */
@media print {
  .menu-button,
  .nav-links,
  .back-to-top,
  .swiper-pagination,
  iframe {
    display: none;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}