html, body {
  overflow-x: hidden;
  width: 100%;
}

/* ===== THEME VARIABLES ===== */
:root {
    --bg: #0e0e11;
    --bg-alt: #15151c;
    --primary: #ef4444; /* jaśniejszy danger pod dark */
    --text: #eaeaea;
    --muted: #9ca3af;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
}


.navbar-brand {
    color: var(--text);
}

.lang-btn {
    background: none;
    border: 1px solid var(--muted);
    color: var(--text);
    padding: 4px 10px;
    cursor: pointer;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
}

.section {
    padding: 100px 0;
}

.bg-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.card-custom {
    background: var(--bg-alt);
    padding: 30px;
    border-radius: 16px;
    height: 100%;
}

.portfolio-box {
    background: var(--bg-alt);
    padding: 60px 20px;
    text-align: center;
    border-radius: 16px;
}

.contact-form {
    max-width: 500px;
    margin: auto;
    display: grid;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
}

.contact-form button {
    background: var(--primary);
    border: none;
    padding: 12px;
    color: #fff;
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 30px;
    background: #000;
    color: var(--muted);
}


/* ===== ANIMATIONS ===== */
.animate {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== THEME BUTTON ===== */
.theme-btn {
    background: none;
    border: 1px solid var(--muted);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .3s ease;
}

.theme-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus {
    color: var(--text) !important;
    text-decoration: none;
}

.navbar {
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
}

.navbar.scrolled {
    background: rgba(14, 14, 17, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp {
    display: none !important;
}

/* ===== FORM ANIMATIONS ===== */
.field {
  position: relative;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 12px;
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 10px;
  color: var(--text);
  outline: none;
  transition: border .3s ease, box-shadow .3s ease;
}

.field label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 6px;
  color: var(--muted);
  pointer-events: none;
  transition: all .3s ease;
}

/* FLOATING LABEL */
.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 0.75rem;
  color: var(--primary);
}

/* FOCUS GLOW */
.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #dc354633;
}

/* SUBMIT BUTTON */
.submit-btn {
  position: relative;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
}

.submit-btn.loading {
  pointer-events: none;
  opacity: .8;
}

.btn-loader {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto;
}

.submit-btn.loading .btn-text {
  display: none;
}

.submit-btn.loading .btn-loader {
  display: block;
}

/* SHAKE ERROR */
.shake {
  animation: shake .4s;
}

/* SUCCESS */
#formStatus.success {
  color: #22c55e;
  animation: fadeIn .6s ease;
}

#formStatus.error {
  color: #ef4444;
  animation: shake .4s;
}

/* KEYFRAMES */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PORTFOLIO ===== */

.portfolio-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.portfolio-tabs .tab {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .3s ease;
}

.portfolio-tabs .tab.active,
.portfolio-tabs .tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.portfolio-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.portfolio-grid.active {
  display: grid;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) brightness(0.75);
  transition: transform .6s ease, filter .6s ease;
  background: var(--bg);
}

.portfolio-item:hover img {
  transform: scale(1.05);
  filter: blur(0) brightness(0.9);
}

.portfolio-item .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  pointer-events: none;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox.active {
  display: flex;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

/* ===== BACKGROUND ===== */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-bg.webp");
  background-size: cover;
  background-position: center;
  z-index: -2;

  filter: grayscale(100%) contrast(1.05) brightness(0.75);
  transform: scale(1.05);
}


.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.hero-content .active {
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  padding: 32px 20px;
  border-radius: 24px;

  max-width: 100%;
  width: 100%;
}

.hero-bg {
  animation: slowZoom 15s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* ===== FAQ ===== */

.accordion-item {
  background: var(--bg-alt);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--muted);
}

.accordion-button {
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  background: var(--primary);
  color: #fff;
}

.accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(220,53,69,.25);
}

.accordion-body {
  color: var(--muted);
}

/* ===== NAV MENU LINKS ===== */

.navbar .nav-link {
  color: var(--text);
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  transition: color .3s ease;
}

.navbar .nav-link:hover {
  color: var(--primary);
}

/* underline animation */
.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .3s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 100%;
}

/* active section */
.navbar .nav-link.active {
  color: var(--primary);
}

/* ===== FORCE NAV LINK COLORS (BOOTSTRAP OVERRIDE) ===== */

.navbar .nav-link,
.navbar .nav-link:visited {
  color: var(--text) !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--primary) !important;
}

.navbar .nav-link.active {
  color: var(--primary) !important;
}

/* ===== BURGER MENU COLOR ===== */

/* usuń ramki i focus */
.navbar-toggler {
  border: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* MOBILE MENU */
@media (max-width: 991px) {

  .navbar-collapse.show {
    position: fixed;
    inset: 0;
    padding-top: 120px;

    background: rgba(14, 14, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    z-index: 1050;
  }

}

@media (max-width: 991px) {

  .navbar.menu-open {
    background: transparent !important;
    backdrop-filter: none !important;
    border-bottom: none !important;
  }

}

/* ===== COOKIE NOTE ===== */
.cookie-note {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 8px 14px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  z-index: 9998;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.cookie-note button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 4px 12px;
  font-size: 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity .2s ease;
}

.cookie-note button:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  .cookie-note {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-note button {
    width: 100%;
    font-size: 0.8rem;
    padding: 8px;
  }
}
