@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Oswald', sans-serif;
}

body {
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #222;
}


body.drony,
body.kamery,
body.mikrofony,
body.szkolenia,
body.pozostale {
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #222;
}

body.kamery .product {
  background: #333;
  color: #eee;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

body.kamery .product:hover {
  background-color: #444;
}

nav {
  background: white;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* nav a {
  margin: 0 15px;
  text-decoration: none;
  color: #222;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: #ff5e57;
}

nav a.active {
  color: #ff5e57;
}

nav a.active:hover {
  color: #ff5e57;
} */

nav a {
  display: inline-block;
  margin: 5px 12px;
  text-decoration: none;
  color: #222;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: #ff5e57;
}

nav a.active {
  color: #ff5e57;
}

nav a.active:hover {
  color: #ff5e57;
}

header {
  background: url('../images/bck.jpg') no-repeat center center / cover;
  height: 80vh; 
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: 20px;
  border-radius: 20px; 
  margin: 20px;
}

.header-top {
  position: relative;
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 10px 20px;
  margin: 10px auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  color: rgb(0, 0, 0);
  text-align: center;
  overflow: hidden;
}

.header-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 40%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.2) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: glass-sweep 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glass-sweep {
  0% { left: -105%; }
  50% { left: 125%; }
  100% { left: 125%; }
}

header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}

header p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto;
}

.header-bottom a {
  position: relative;
  overflow: hidden;
  padding: 15px 30px;
  background-color: #ff5e57;
  color: white;
  text-decoration: none;
  width: 200px;
  font-weight: bold;
  font-size: 20px;
  border-radius: 15px;
  display: inline-block;
  transition: transform 0.3s, box-shadow 0.3s;
}

.header-bottom a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
  transition: left 0.5s;
  z-index: 0;
}

.header-bottom a:hover::before {
  left: 100%;
}

.header-bottom a:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 15px rgba(255, 94, 87, 0.4);
}

section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.2rem;
}

.centered {
  max-width: 800px;
  margin: auto;
  text-align: center;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 kolumny = kwadrat przy 4 elementach */
  gap: 30px;
  max-width: 700px;
  margin: 0 auto;
}

.offer-item {
  position: relative;
  z-index: 0;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  text-decoration: none;
  color: inherit;

  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1; /* Desktop – kwadrat */
}

.offer-item:hover {
  transform: scale(1.03);
}

.offer-item img {
  width: 100%;
  height: 60%;
  object-fit: cover;
}

.offer-item h3 {
  padding: 15px;
  font-size: 1.4rem;
}

.offer-item p {
  padding: 0 15px 15px;
  color: #555;
}

.offer-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -700%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 40%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.2) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: glass-sweep 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: 10px;
}

.gallery {
  display: grid;
  position: relative;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.gallery::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 40%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.2) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg) translateX(-150%);
  animation: glass-sweep 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: 10px;
  will-change: transform;
}

.product {
  display: flex;
  align-items: flex-start;
  gap: 70px;
  margin: 30px 0;
  background-color: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product img {
  width: 300px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.product-info h3 {
  margin-top: 0;
}

.product-info ul {
  list-style-type: disc;
  padding-left: 20px;
  text-align: left;
}

footer {
  background: #222;
  color: white;
  padding: 10px 20px;
  text-align: center;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

footer p {
  margin: 5px 0;
}

/* Responsywność */
@media (max-width: 768px) {
  header h1 { font-size: 2.2rem; }
  header p { font-size: 1rem; }
  .header-bottom a { padding: 12px 24px; font-size: 0.95rem; }
  nav a { margin: 0 8px; font-size: 0.95rem; }
  section { padding: 40px 15px; }
  .offer-grid { grid-template-columns: 1fr; max-width: 400px; }
  .offer-item { aspect-ratio: auto; min-height: 320px; }
  .offer-item img { height: 180px; }
  .offer-item h3 { font-size: 1.2rem; }
  .offer-item p { font-size: 1rem; line-height: 1.5; }
  .product { flex-direction: column; align-items: center; text-align: center; }
  .product img { width: 100%; max-width: 400px; }
  .product-info { margin-top: 15px; }
}

@media (max-width: 480px) {
  nav { font-size: 0.9rem; }
  header { padding: 30px 10px; }
  .header-bottom a { width: 90%; }
}

/* Product details modal */
#product-details {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  overflow-y: auto;
  z-index: 999;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  display: none;
}

#product-details.visible {
  display: block;
  opacity: 1;
  visibility: visible;
}

#close-details {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

#product-content {
  max-width: 800px;
  margin: 4rem auto 0;
}

h1 { color: #000000; }

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

.centered a {
  color: inherit;
  text-decoration: none;
}

.centered a:hover {
  text-decoration: underline;
}
