/* Responsive Design */

/* Small devices (phones, 640px and up) */
@media (min-width: 640px) {
  /* Hero Section */
  .hero-title {
    font-size: var(--font-size-6xl);
  }

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

  .hero-cta {
    flex-direction: row;
    align-items: center;
  }

  /* Section Headers */
  .section-title {
    font-size: var(--font-size-5xl);
  }

  /* Cards */
  .service-card,
  .guarantee-card {
    padding: var(--space-8);
  }

  /* Forms */
  .contact-form-wrapper {
    padding: var(--space-10);
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  /* Header */
  .nav {
    display: block;
  }

  .mobile-menu-toggle {
    display: none;
  }

  /* Hero Section */
  .hero-content {
    grid-template-columns: 1fr 1fr;
  }

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

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

  /* Guarantees */
  .guarantees-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Timeline */
  .timeline-item {
    margin-bottom: var(--space-10);
  }

  /* Contact */
  .contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

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

  .footer-bottom {
    flex-direction: row;
  }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
  /* Container */
  .container {
    max-width: var(--container-lg);
  }

  /* Hero Section */
  .hero-title {
    font-size: 4rem;
  }

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

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

  /* Offers */
  .offers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contact */
  .contact-content {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form-wrapper {
    grid-column: 1;
  }

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

/* Extra large devices (large desktops, 1280px and up) */
@media (min-width: 1280px) {
  /* Container */
  .container {
    max-width: var(--container-xl);
  }

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

  /* Section Headers */
  .section-title {
    font-size: var(--font-size-6xl);
  }

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

  /* Services */
  .service-card {
    padding: var(--space-10);
  }

  /* Timeline */
  .timeline-item {
    margin-bottom: var(--space-12);
  }

  .timeline-number {
    width: 56px;
    height: 56px;
    font-size: var(--font-size-2xl);
  }

  /* Contact */
  .contact-form-wrapper {
    padding: var(--space-12);
  }
}

/* 2XL devices (very large desktops, 1536px and up) */
@media (min-width: 1536px) {
  /* Container */
  .container {
    max-width: var(--container-2xl);
  }

  /* Hero Section */
  .hero-title {
    font-size: 5rem;
  }

  /* Section Spacing */
  section {
    padding: var(--space-24) 0;
  }
}

/* Print styles */
@media print {
  /* Hide non-essential elements */
  .header,
  .hero-visual,
  .mobile-menu-toggle,
  .language-switcher,
  .whatsapp-link {
    display: none !important;
  }

  /* Adjust text sizes */
  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .hero-title {
    font-size: 24pt;
  }

  .section-title {
    font-size: 18pt;
  }

  /* Ensure colors print well */
  body,
  .service-card,
  .guarantee-card,
  .offer-card {
    background: white !important;
    color: black !important;
  }

  /* Remove shadows and borders */
  * {
    box-shadow: none !important;
    border: 1pt solid #ccc !important;
  }

  /* Ensure links are visible */
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  /* Page breaks */
  section {
    page-break-inside: avoid;
  }

  .service-card,
  .guarantee-card,
  .offer-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-text: #000000;
    --color-background: #FFFFFF;
    --color-primary: #0000FF;
    --color-border: #000000;
  }

  .btn {
    border-width: 2px;
  }

  .service-card,
  .guarantee-card,
  .offer-card {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Mobile-specific optimizations */
@media (max-width: 767px) {
  /* Adjust hero for mobile */
  .hero {
    min-height: 90vh;
    padding-top: 72px;
  }

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

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

  /* Mobile navigation */
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: var(--transition-all);
    z-index: var(--z-dropdown);
  }

  .nav.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    gap: var(--space-4);
  }

  .nav-link {
    display: block;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
  }

  /* Mobile language switcher */
  .language-switcher {
    order: -1;
  }

  /* Adjust section spacing for mobile */
  section {
    padding: var(--space-16) 0;
  }

  /* Cards on mobile */
  .service-card,
  .guarantee-card,
  .offer-card,
  .project-card {
    padding: var(--space-6);
  }

  /* Projects on mobile */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .service-icon,
  .guarantee-icon {
    width: 48px;
    height: 48px;
  }

  .service-icon svg,
  .guarantee-icon svg {
    width: 24px;
    height: 24px;
  }

  /* Timeline on mobile */
  .timeline-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
  }

  .timeline-number {
    margin-right: 0;
    margin-bottom: var(--space-2);
  }

  /* Contact form on mobile */
  .contact-form-wrapper {
    padding: var(--space-6);
  }

  /* Footer on mobile */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }

  .footer-legal {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}