/* Responsive Styles - Mobile First Approach */

/* Tablet and Up */
@media (min-width: 768px) {
  :root {
    --font-size-3xl: 3.5rem;
    --container-padding: var(--space-lg);
  }

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

/* Desktop and Up */
@media (min-width: 1024px) {
  :root {
    --font-size-4xl: 5rem;
    --container-padding: var(--space-xl);
  }

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

  .service-card:hover {
    transform: translateY(-8px);
  }
}

/* Large Desktop */
@media (min-width: 1280px) {
  :root {
    --container-max-width: 1280px;
  }
}

/* Mobile Landscape and smaller */
@media (max-width: 768px) {
  /* Navigation adjustments */
  .nav .container {
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
  }

  .logo {
    font-size: 1.75rem;
  }

  .logo-number,
  .logo-text {
    font-size: 1em;
  }

  .logo-text {
    letter-spacing: 3px;
    margin-left: 2px;
  }

  /* Hero section */
  .hero {
    min-height: 80vh;
    height: auto;
    padding: var(--space-2xl) var(--space-md);
  }

  .hero::after {
    height: 80px;
  }

  .hero-title {
    font-size: clamp(3rem, 12vw, 4.5rem);
    letter-spacing: 0px;
  }

  .hero-title .logo-number,
  .hero-title .logo-text {
    font-size: 1em;
  }

  .hero-title .logo-text {
    letter-spacing: 8px;
    margin-left: 6px;
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xl);
  }

  /* Sections spacing */
  section {
    padding: var(--space-2xl) 0;
  }

  .about,
  .pricelist,
  .contact {
    padding-top: calc(var(--space-2xl) + 40px);
  }

  .about::before,
  .pricelist::before,
  .contact::before {
    height: 60px;
    transform: translateY(-59px);
    z-index: 2;
  }

  /* Section titles */
  .section-title {
    font-size: clamp(var(--font-size-xl), 6vw, var(--font-size-2xl));
    margin-bottom: var(--space-md);
  }

  .section-title::after {
    width: 40px;
    height: 2px;
    bottom: -8px;
  }

  /* Service cards - two columns on mobile */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

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

  .service-icon {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-xs);
  }

  .service-title {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
  }

  .service-description {
    font-size: var(--font-size-sm);
    line-height: 1.4;
  }

  .service-price {
    font-size: var(--font-size-lg);
    margin: var(--space-xs) 0;
  }

  .service-card::after {
    display: none;
  }

  /* Form adjustments */
  .contact-form {
    margin-bottom: var(--space-xl);
  }

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

  .form-group label {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xs);
  }

  .form-group input,
  .form-group textarea {
    padding: var(--space-md);
    font-size: var(--font-size-base);
    min-height: 44px; /* Better touch target */
    -webkit-appearance: none;
    appearance: none;
  }

  .form-group textarea {
    min-height: 120px;
    resize: vertical;
  }

  .btn {
    padding: var(--space-sm) var(--space-lg);
    min-height: 44px; /* Better touch target */
    font-size: var(--font-size-sm);
  }

  /* Form buttons still full width */
  .contact-form .btn {
    width: 100%;
  }

  /* Contact info */
  .contact-info {
    padding: var(--space-lg);
  }

  .contact-info h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
  }

  .contact-item a {
    display: inline-block;
    padding: var(--space-xs) 0;
    min-height: 44px; /* Better touch target */
    word-break: break-word;
  }

  /* About section with integrated background */
  .about {
    position: relative;
    overflow: hidden;
  }

  /* Background image layer - positioned behind wave divider */
  .about-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/about-img.jpg') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    filter: blur(1.5px);
  }

  /* Gradient overlay for smooth fade at edges */
  .about-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
      linear-gradient(to bottom,
        rgba(15, 15, 30, 0.95) 0%,
        rgba(15, 15, 30, 0.6) 5%,
        transparent 15%,
        transparent 85%,
        rgba(26, 26, 46, 0.6) 95%,
        rgba(26, 26, 46, 0.95) 100%
      );
    z-index: 0;
    pointer-events: none;
  }

  .about-grid {
    position: relative;
  }

  .about-content {
    position: relative;
    z-index: 1;
  }

  .about .container {
    position: relative;
    z-index: 1;
  }

  .about-text {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  }

  .about-content h2 {
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
  }

  .about-image {
    display: none;
  }

  /* Footer */
  .footer {
    padding: var(--space-md) 0;
    font-size: var(--font-size-sm);
  }

  .footer-logo .logo-number,
  .footer-logo .logo-text {
    font-size: 1em;
  }

  .footer-logo .logo-text {
    letter-spacing: 2px;
    margin-left: 1px;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  :root {
    --space-3xl: 2.5rem;
    --space-2xl: 2rem;
    --space-xl: 1.5rem;
    --space-lg: 1.25rem;
    --space-md: 1rem;
    --container-padding: var(--space-sm);
  }

  /* Extra small screens */
  .hero {
    min-height: 70vh;
    padding: var(--space-xl) var(--space-sm);
  }

  .hero-title {
    font-size: clamp(2rem, 12vw, 3rem);
    letter-spacing: 0px;
    margin-bottom: var(--space-sm);
  }

  .hero-title .logo-number,
  .hero-title .logo-text {
    font-size: 1em;
  }

  .hero-title .logo-text {
    letter-spacing: 6px;
    margin-left: 4px;
  }

  .hero-subtitle {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
  }

  /* Button adjustments - larger touch targets */
  .btn {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    min-height: 44px;
  }

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

  /* Service cards more compact */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }

  .service-card {
    padding: var(--space-sm) var(--space-xs);
  }

  .service-icon {
    font-size: var(--font-size-lg);
    margin-bottom: 4px;
  }

  .service-title {
    font-size: var(--font-size-sm);
    margin-bottom: 4px;
    line-height: 1.2;
  }

  .service-description {
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .service-price {
    font-size: var(--font-size-base);
    margin: 4px 0;
  }

  /* Form improvements */
  .form-group {
    margin-bottom: var(--space-md);
  }

  .form-group input,
  .form-group textarea {
    padding: var(--space-md);
    font-size: var(--font-size-base);
    min-height: 44px;
  }

  .form-group textarea {
    min-height: 120px;
  }

  /* Contact info */
  .contact-info {
    padding: var(--space-md);
  }

  .contact-info h3 {
    font-size: var(--font-size-base);
  }

  .contact-item {
    font-size: var(--font-size-sm);
  }

  .contact-item a {
    font-size: var(--font-size-base);
    display: inline-block;
    padding: var(--space-xs) 0;
    min-height: 44px;
  }

  /* Navigation logo smaller */
  .logo {
    font-size: 1.5rem;
  }

  .logo-number,
  .logo-text {
    font-size: 1em;
  }

  .logo-text {
    letter-spacing: 2px;
    margin-left: 1px;
  }

  /* Section spacing tighter */
  section {
    padding: var(--space-xl) 0;
  }

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

/* Very small screens */
@media (max-width: 360px) {
  :root {
    --container-padding: var(--space-xs);
    --space-lg: 1rem;
    --space-md: 0.875rem;
  }

  .hero {
    min-height: 60vh;
    padding: var(--space-lg) var(--space-xs);
  }

  .hero-title {
    font-size: 1.75rem;
    letter-spacing: 0px;
  }

  .hero-title .logo-number,
  .hero-title .logo-text {
    font-size: 1em;
  }

  .hero-title .logo-text {
    letter-spacing: 4px;
    margin-left: 3px;
  }

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

  .section-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .service-card {
    padding: var(--space-xs);
  }

  .service-icon {
    font-size: var(--font-size-base);
    margin-bottom: 2px;
  }

  .service-title {
    font-size: 0.75rem;
    margin-bottom: 2px;
    line-height: 1.2;
  }

  .service-description {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .service-price {
    font-size: var(--font-size-sm);
    margin: 2px 0;
  }

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

  .form-group input,
  .form-group textarea {
    font-size: var(--font-size-sm);
    padding: var(--space-sm);
  }

  .contact-info {
    padding: var(--space-sm);
  }

  .about-text {
    font-size: var(--font-size-sm);
  }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  /* Better touch targets */
  .nav-menu a {
    padding: var(--space-md);
    min-height: 48px;
  }

  .service-card {
    /* Remove hover effects on touch devices */
    transform: none !important;
  }

  .service-card:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  .btn:active {
    transform: scale(0.95);
  }

  .contact-btn:active {
    transform: scale(0.9);
  }

  /* Ensure floating contacts are easily tappable */
  .floating-contacts {
    padding: var(--space-sm);
  }

  .contact-btn {
    min-width: 52px;
    min-height: 52px;
  }

  /* Better tap targets for links */
  a {
    -webkit-tap-highlight-color: rgba(0, 173, 181, 0.3);
    tap-highlight-color: rgba(0, 173, 181, 0.3);
  }

  /* Prevent text selection on tap */
  .btn,
  .service-card,
  .contact-btn {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: var(--space-xl) var(--space-md);
  }

  .hero-title {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
  }

  .hero-subtitle {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
  }

  section {
    padding: var(--space-xl) 0;
  }

  /* Adjust floating contacts for landscape */
  .floating-contacts {
    bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
  }

  .contact-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}

/* Safe area for iPhone X and newer */
@supports (padding: max(0px)) {
  .floating-contacts {
    bottom: max(var(--space-md), env(safe-area-inset-bottom));
  }

  .nav {
    padding-top: max(var(--space-sm), env(safe-area-inset-top));
  }
}

/* Print Styles */
@media print {
  .nav,
  .floating-contacts,
  .footer {
    display: none;
  }

  .hero {
    page-break-after: always;
  }

  body {
    font-size: 12pt;
    color: black;
    background: white;
  }

  a {
    text-decoration: underline;
  }
}
