body {
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    color: #1c1c1c;
    background: #f8f9fb;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

html {
    scroll-behavior: smooth;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;        
  background-color: #0c3b5d;
  position: sticky;
  z-index: 1000;
  padding: 14px 32px;
  top: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Hamburger menu button (hidden by default) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px 10px;
  z-index: 1001;
}

.menu-toggle:focus {
  outline: none;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-left: 30%;
}

.brand {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.tagline {
  color: #d6e8f5;
  font-size: 0.9rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
  margin-right: 30%;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links li a:hover {
  background-color: rgba(255,255,255,0.12);
  color: #fff;
}

.hero {
      min-height: 70vh;
      background-image: url('welder.png'); 
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      max-width: 1200px; 
      margin: 10px auto;
      border-radius: 16px;
      overflow: hidden;
    }

.overlay {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: rgba(0, 38, 76, 0.55); 
      z-index: 0;
    }

.hero-text {
      position: relative;
      z-index: 1;
      color: white;
      text-align: left;
      margin-left: 5%;
      max-width: 600px;
    }

.hero-text h1 {
      font-size: 3rem;
      text-transform: uppercase;
      letter-spacing: 2px;
    }

.hero-text p {
      font-size: 1.2rem;
      margin-top: 10px;
    }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 12px 20px;
  }

  .menu-toggle {
    display: block;
    order: 3;
    margin-left: auto;
  }

  .logo-container {
    order: 1;
    flex: 1;
  }

  .nav-links {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: block;
    width: 100%;
    padding: 12px 15px;
    text-align: left;
    border-radius: 6px;
    margin-bottom: 5px;
  }


  .brand {
    font-size: 1rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  .nav-links {
    margin-right: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .nav-links li a {
    font-size: 0.9rem;
    padding: 6px 8px;
  }

  .hero {
    min-height: 50vh;
    margin: 5px;
    border-radius: 12px;
  }

  .hero-text {
    margin-left: 3%;
    margin-right: 3%;
    max-width: 100%;
  }

  .hero-text h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
    margin-top: 10px;
  }

  #wyroznia {
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0 20px;
  }

  #main {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 30px auto 50px;
    padding: 0 15px;
  }

  .feature {
    padding: 15px;
  }

  .services-section {
    padding: 40px 15px;
  }

  .services-container {
    flex-direction: column;
    gap: 30px;
  }

  .services-image {
    max-width: 100%;
    right: 0;
    margin: 0 auto;
  }

  .services-image .main-image {
    width: 100%;
    max-width: 100%;
  }

  .services-image .overlay-image {
    display: none; /* Hide overlay on mobile for cleaner look */
  }

  .footer-map iframe {
    height: 200px;
  }

  .services-content {
    max-width: 100%;
  }

  .services-content h2 {
    font-size: 1.5rem;
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-item {
    padding: 10px;
  }

  .service-item:hover {
    transform: scale(1.02); /* Smaller scale on mobile */
  }

  .footer {
    padding: 30px 15px;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
  }

  .footer-left,
  .footer-right {
    min-width: 100%;
    text-align: center;
  }

  .footer-map {
    min-width: 100%;
    max-width: 100%;
  }

  .popup-content {
    max-width: 95%;
    width: 95%;
    padding: 20px 15px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .popup-content h1,
  .popup-content h2 {
    font-size: 1.3rem;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .navbar {
    padding: 10px 15px;
  }

  .brand {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .tagline {
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links li a {
    font-size: 0.85rem;
    padding: 5px 6px;
  }

  #send-query {
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  .hero {
    min-height: 40vh;
    margin: 5px;
  }

  .hero-text h1 {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    line-height: 1.3;
  }

  .hero-text p {
    font-size: 0.9rem;
    margin-top: 8px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  #wyroznia {
    font-size: 1.3rem;
    padding: 0 15px;
  }

  .feature {
    padding: 12px;
    gap: 10px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .feature p {
    font-size: 0.9rem;
  }

  .services-content h2 {
    font-size: 1.3rem;
  }

  .service-item .icon {
    font-size: 24px;
  }

  .service-item h3 {
    font-size: 1rem;
  }

  .service-item p {
    font-size: 0.9rem;
  }

  .footer-left h3 {
    font-size: 1.1rem;
  }

  .popup-content {
    padding: 15px 12px;
  }

  #query-form input,
  #query-form textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 10px 12px;
  }

  .footer-map iframe {
    height: 180px;
  }

  .hero-actions .btn {
    font-size: 0.85rem;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .nav-links li a,
  #send-query {
    min-height: 44px; /* Better touch target */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .service-item:hover {
    transform: none; /* Disable hover effects on touch */
  }
}

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
  .hero {
    max-width: 1400px;
  }

  #main {
    max-width: 1300px;
  }

  .services-container {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 60vh;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background-color: #f8d34b;
  color: #0c3b5d;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn:hover {
  background-color: #ffeb9a;
  color: #0c3b5d;
  transform: translateY(-1px);
}

.btn.ghost {
  background-color: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
}

.btn.ghost:hover {
  background-color: rgba(255,255,255,0.2);
}

#wyroznia {
  text-align: center;
  font-size: 2rem;
  margin-top: 30px;
  margin-bottom: 25px;
}

#main {
  justify-content: center;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 40px auto 70px;
  max-width: 1100px;
  padding: 0 20px;
}

.feature {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: #0c3b5d;
  color: #f8d34b;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 12px;
}

.feature p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.footer {
  background-color: #0c3b5d;
  color: white;
  padding: 40px 20px;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
  align-items: flex-start;
}

.footer-left {
  flex: 1;
  min-width: 200px;
}

.footer-left h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: #f8d34b;
}

.footer-left p {
  margin: 8px 0;
}

.footer-map {
  flex: 1.5;
  min-width: 300px;
  max-width: 500px;
}

.footer-right {
  flex: 1;
  min-width: 200px;
  text-align: right;
}

.footer h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: #ffffff;
}

.footer a {
  color: #ffffff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

#send-query {
  display: inline-block;
  padding: 6px 12px;
  color: #f8d34b;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 2px solid transparent;
}

#send-query:hover{
  background-color: rgba(255,255,255,0.1);
  color: white;
  border: 2px solid #f8d34b;
}

.services-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  background-color: #ffffff;
  font-family: Arial, sans-serif;
}

.services-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
}

.services-image {
  position: relative;
  max-width: 400px;
  right: 20px;
}

.services-image .main-image {
  width: 110%;
  max-width: 400px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.services-image .overlay-image {
  position: absolute;
  top: 75%;
  left: calc(70% - 150px); 
  width: 350px;
  max-width: 60%;
  border-radius: 3px;
  border: 5px solid white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transform: translate(-50%, -50%);
}

.services-content {
  flex: 2;
  min-width: 300px;
  max-width: 700px;
}

.services-content h2 {
  font-size: 2rem;
  margin-left: 0;
  margin-bottom: 30px;
  font-weight: bold;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-left: 0;
  gap: 25px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: transform 0.3s ease-out;
}

.service-item:hover {
  transform: scale(1.1);
  border: 1px solid #0c3b5d;
  box-shadow: 0 0 10px rgba(12, 59, 93, 0.2);
  cursor: pointer;
}

.service-item .icon {
  font-size: 28px;
  color: #f8d34b;
  flex-shrink: 0;
}

.service-item h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.service-item p {
  margin: 5px 0 0;
  font-size: 0.95rem;
  color: #444;
}


.modal {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.submit-btn {
  background-color: #f1c40f;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-btn:hover {
  background-color: #d4ac0d;
}

/* Wspólny popup */
.popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.popupcontent-a {
  text-decoration: none;
  color: black;
}

/* Okienko popup */
.popup-content {
    display: none;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 400px;
    width: 90%;
    padding: 30px 25px;
    background-color: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 2px solid black;
    font-family: 'DM Serif Text', serif;
}

/* Zamknięcie */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    transition: color 0.2s;
}

.close:hover {
    color: #ff4c4c;
}

/* Formularz */
#query-form input,
#query-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.2s, box-shadow 0.2s;
}

#query-form input:focus,
#query-form textarea:focus {
    border-color: #302c2c;
    box-shadow: 0 0 5px rgba(0,123,255,0.5);
    outline: none;
}

#query-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Przycisk wyślij */
#query-form button {
    background-color: #302c2c;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s, transform 0.1s;
}

#query-form button:hover {
    background-color: black;
    transform: translateY(-2px);
}

/* Komunikat sukcesu */
#query-success {
    color: #28a745;
    font-weight: 500;
    margin-top: 10px;
    font-size: 14px;
}
