/* ===== RESPONSIVE DESIGN ===== */

/* ===== MOBILE NAVIGATION ===== */
@media screen and (max-width: 1024px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    transition: left var(--animation-duration-normal) var(--ease-in-out);
    z-index: var(--z-fixed);
  }

  .nav__menu.show {
    left: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
  }

  .nav__link {
    font-size: var(--font-size-lg);
    padding: var(--spacing-md) var(--spacing-lg);
  }

  .nav__actions {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .nav__toggle {
    display: block;
  }

  .nav__toggle.active i:before {
    content: "\ea76"; /* Close icon */
  }
}

/* ===== LARGE DESKTOP ===== */
@media screen and (min-width: 1440px) {
  .container {
    max-width: 1000px;
  }

  .hero__title {
    font-size: var(--font-size-4xl);
  }

  .section__title {
    font-size: var(--font-size-3xl);
  }
}

/* ===== DESKTOP ===== */
@media screen and (max-width: 1200px) {
  .container {
    max-width: 800px;
  }

  .hero__content {
    gap: var(--spacing-lg);
  }
  
  .hero__slideshow {
    height: 55vh;
  }

  .hero__title {
    font-size: var(--font-size-3xl);
  }

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

  .portfolio__container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  
  .portfolio__slideshow {
    height: 400px;
  }
  
  .portfolio__nav {
    width: 45px;
    height: 45px;
  }
}

/* ===== TABLET ===== */
@media screen and (max-width: 968px) {
  .container {
    max-width: 720px;
  }

  .section {
    padding: var(--spacing-3xl) 0;
  }

  .section__title {
    font-size: var(--font-size-2xl);
  }

  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-2xl);
  }
  
  .hero__slideshow {
    height: 45vh;
    order: -1;
  }

  .hero__title {
    font-size: var(--font-size-3xl);
  }

  .hero__buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero__stats {
    justify-content: center;
  }

  .about__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-3xl);
    text-align: center;
  }

  .about__content .section__header {
    text-align: center;
  }

  .contact__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

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

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

/* ===== MOBILE LARGE ===== */
@media screen and (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 0 var(--spacing-md);
  }

  .header {
    height: var(--header-height-mobile);
  }

  .nav {
    height: var(--header-height-mobile);
  }

  .nav__menu {
    top: var(--header-height-mobile);
    height: calc(100vh - var(--header-height-mobile));
  }

  .section {
    padding: var(--spacing-3xl) 0;
  }

  .section__header {
    margin-bottom: var(--spacing-2xl);
  }

  .section__title {
    font-size: var(--font-size-2xl);
  }

  .hero {
    min-height: calc(100vh - var(--header-height-mobile));
    padding-top: var(--header-height-mobile);
  }

  .hero__title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
  }

  .hero__description {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-xl);
  }

  .hero__buttons {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .services__container {
    grid-template-columns: 1fr;
    gap: var(--grid-gap-mobile);
  }

  .service__card {
    padding: var(--spacing-xl);
  }

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

  .portfolio__filter {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
  }

  .portfolio__container {
    grid-template-columns: 1fr;
    gap: var(--grid-gap-mobile);
  }
  
  .portfolio__slideshow {
    height: 350px;
  }
  
  .portfolio__slide-info {
    padding: var(--spacing-lg);
  }
  
  .portfolio__slide-title {
    font-size: var(--font-size-lg);
  }

  .about__features {
    gap: var(--spacing-md);
  }

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

  .footer__bottom {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .whatsapp-widget {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }

  .whatsapp-widget__popup {
    width: 280px;
    right: -10px;
  }

  .scrollup {
    bottom: 5rem;
    right: var(--spacing-md);
  }
}

/* ===== MOBILE MEDIUM ===== */
@media screen and (max-width: 576px) {
  .hero__title {
    font-size: var(--font-size-2xl);
  }

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

  .btn {
    padding: var(--spacing-md) var(--spacing-lg);
  }

  .service__card-content {
    padding: var(--spacing-lg);
  }

  .service__icon {
    height: 160px;
  }

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

  .form__input,
  .form__textarea,
  .form__select {
    height: 2.75rem;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }

  .form__textarea {
    min-height: 100px;
  }

  .quote__container {
    padding: var(--spacing-xl);
  }

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

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

  .whatsapp-widget__popup {
    width: 260px;
  }
}

/* ===== MOBILE SMALL ===== */
@media screen and (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }

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

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

  .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
  }

  .service__card-content {
    padding: var(--spacing-md);
  }

  .service__icon {
    height: 140px;
  }

  .portfolio__image img {
    height: 200px;
  }

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

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

  .footer {
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
  }
}

/* ===== MOBILE EXTRA SMALL ===== */
@media screen and (max-width: 360px) {
  .hero__title {
    font-size: var(--font-size-lg);
  }

  .section__title {
    font-size: var(--font-size-lg);
  }

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

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

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

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

  .whatsapp-widget__popup {
    width: 240px;
    right: -20px;
  }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding-top: 0;
  }

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

  .hero__title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-sm);
  }

  .hero__description {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
  }

  .hero__buttons {
    flex-direction: row;
    gap: var(--spacing-md);
  }

  .hero__stats {
    flex-direction: row;
    gap: var(--spacing-lg);
  }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
  .hero::before {
    background-image: url('../images/hero/hero-bg@2x.webp');
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .hero__content,
  .service__card,
  .portfolio__item,
  .btn,
  .whatsapp-widget__button {
    transition: none;
  }

  .whatsapp-widget__button {
    animation: none;
  }

  .portfolio__image img {
    transition: none;
  }

  .portfolio__overlay {
    transition: none;
  }
}



/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .nav__link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .portfolio__filter {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .service__link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .whatsapp-widget__button {
    min-height: 56px;
    min-width: 56px;
  }

  .scrollup {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .whatsapp-widget,
  .scrollup,
  .nav__toggle,
  .language-toggle {
    display: none !important;
  }

  .hero {
    min-height: auto;
    page-break-inside: avoid;
  }

  .section {
    padding: var(--spacing-lg) 0;
    page-break-inside: avoid;
  }

  .service__card,
  .portfolio__item {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .btn {
    border: 1px solid #ccc;
    background: white !important;
    color: black !important;
  }
}

/* ===== LARGE SCREENS ===== */
@media screen and (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }

  .hero__title {
    font-size: 5rem;
  }

  .section__title {
    font-size: 4rem;
  }

  .service__card {
    padding: var(--spacing-3xl);
  }

  .contact__form {
    padding: var(--spacing-3xl);
  }
} 