/* Portfolio overrides layered on top of StartBootstrap Resume theme */

:root {
  --portfolio-bg: #fbfaf7;
  --portfolio-surface: #ffffff;
  --portfolio-text: #1f2328;
  --portfolio-muted: #6b7280;
  --portfolio-border: rgba(31, 35, 40, 0.12);
  --portfolio-shadow: 0 18px 50px rgba(31, 35, 40, 0.12);

  /* Bootstrap variables override */
  --bs-primary: #caa132;
  --bs-primary-rgb: 202, 161, 50;
  --bs-link-color: #9a6f18;
  --bs-link-hover-color: #7f5b13;
}

body {
  padding-left: 0 !important; /* cancel old Resume sidebar layout */
  padding-top: 76px !important; /* space for fixed top navbar */
  color: var(--portfolio-text) !important;
  background: var(--portfolio-bg) !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  scroll-behavior: smooth;
}

main.container {
  max-width: 1200px;
}

/* Make old theme styling less shouty */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  text-transform: none !important;
  font-family: "Playfair Display", ui-serif, Georgia, serif !important;
  letter-spacing: 0 !important;
  color: var(--portfolio-text);
}

.lead {
  color: var(--portfolio-text);
}

.portfolio-nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--portfolio-border);
}

.navbar-light .navbar-nav .nav-link {
  color: rgba(31, 35, 40, 0.78);
  font-weight: 600;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: rgba(31, 35, 40, 0.95);
}

.navbar-light .navbar-nav .nav-link.active {
  color: rgba(31, 35, 40, 0.98);
  position: relative;
}

.navbar-light .navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.7);
}

.brand-avatar {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid var(--portfolio-border);
}

.brand-text {
  font-weight: 700;
  color: rgba(31, 35, 40, 0.95);
  letter-spacing: 0.2px;
}

.portfolio-cta {
  border-radius: 999px;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

/* Enhanced button styles */
.btn {
  font-weight: 600;
  border-radius: 12px;
  padding: 10px 20px;
  transition: all 0.2s ease;
  border-width: 1.5px;
}

.btn-primary {
  background: linear-gradient(135deg, #caa132, #b38d28);
  border-color: #caa132;
  box-shadow: 0 2px 8px rgba(202, 161, 50, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #b38d28, #9a6f18);
  border-color: #b38d28;
  box-shadow: 0 4px 12px rgba(202, 161, 50, 0.35);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: rgba(var(--bs-primary-rgb), 0.5);
  color: #9a6f18;
  background: rgba(255, 255, 255, 0.6);
}

.btn-outline-primary:hover {
  background: rgba(var(--bs-primary-rgb), 0.12);
  border-color: #caa132;
  color: #7f5b13;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.portfolio-eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  color: #9a6f18;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portfolio-eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), 0.6), transparent);
  border-radius: 2px;
}

.portfolio-title {
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 12px;
}

.portfolio-lead {
  color: rgba(31, 35, 40, 0.78);
}

.hero-frame {
  background: linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.12), rgba(var(--bs-primary-rgb), 0));
  border: 1px solid var(--portfolio-border);
  border-radius: 20px;
  padding: 12px;
  box-shadow: var(--portfolio-shadow);
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.portfolio-card {
  background: var(--portfolio-surface);
  border: 1px solid var(--portfolio-border);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(31, 35, 40, 0.04), 0 1px 3px rgba(31, 35, 40, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(31, 35, 40, 0.08), 0 4px 12px rgba(31, 35, 40, 0.08);
}

@media (max-width: 991px) {
  .portfolio-card {
    padding: 24px 20px;
  }
}

.portfolio-strip {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  border: 1px solid var(--portfolio-border);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(31, 35, 40, 0.06);
}

@media (max-width: 767px) {
  .portfolio-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
  }
}

/* Offer page helpers */
.offer-strip {
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.08), rgba(var(--bs-primary-rgb), 0.02));
  border: 1px solid rgba(var(--bs-primary-rgb), 0.25);
}
.offer-divider {
  height: 1px;
  background: var(--portfolio-border);
  margin: 16px 0;
}

/* Enhanced list styling for offers */
.portfolio-card ul {
  list-style: none;
  padding-left: 0;
}

.portfolio-card ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--portfolio-muted);
  line-height: 1.6;
}

.portfolio-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #9a6f18;
  font-weight: 700;
  font-size: 1rem;
}

.portfolio-card h2,
.portfolio-card .h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--portfolio-text);
}

.portfolio-card .text-muted {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--portfolio-muted);
}
.offer-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.15), rgba(var(--bs-primary-rgb), 0.08));
  border: 1px solid rgba(var(--bs-primary-rgb), 0.25);
  color: #9a6f18;
  flex: 0 0 auto;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-card:hover .offer-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(var(--bs-primary-rgb), 0.18);
}
/* (Offer accordion/packages styles removed — section simplified) */

/* Offer variants helpers (for oferta1/2/3 drafts) */
.offer-variant-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(var(--bs-primary-rgb), 0.3);
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.15), rgba(var(--bs-primary-rgb), 0.08));
  color: #9a6f18;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.15);
}
.offer-preview {
  background: linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.12), rgba(var(--bs-primary-rgb), 0.04));
  border: 1px solid var(--portfolio-border);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(31, 35, 40, 0.08), 0 2px 8px rgba(31, 35, 40, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.offer-preview:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(31, 35, 40, 0.12), 0 4px 12px rgba(31, 35, 40, 0.06);
}

.offer-preview--small {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 992px) {
  .offer-preview--small {
    max-width: 300px;
    margin-left: auto;
    margin-right: 0;
  }
}
.offer-preview-media {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(31, 35, 40, 0.08);
  background: #0b0c0f;
  transition: transform 0.3s ease;
}

.offer-preview:hover .offer-preview-media {
  transform: scale(0.98);
}

.offer-preview-media--portrait {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Smooth video loading */
video.offer-preview-media {
  background: linear-gradient(135deg, #1a1a1a, #0b0c0f);
}

.portfolio-footer {
  border-top: 1px solid var(--portfolio-border);
  background: rgba(255, 255, 255, 0.7);
}

.footer-link {
  color: rgba(31, 35, 40, 0.7);
  text-decoration: none;
  font-weight: 600;
}
.footer-link:hover {
  color: rgba(31, 35, 40, 0.92);
  text-decoration: underline;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.gallery-item {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  border-radius: 16px;
  outline: none;
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--portfolio-border);
  background: #f3f4f6;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 300ms ease, opacity 300ms ease;
}

/* Efekt czarno-biały TYLKO na urządzeniach z myszką (desktop) */
@media (hover: hover) {
  .gallery-thumb {
    filter: grayscale(100%);
    opacity: 0.65;
  }

  .gallery-item:hover .gallery-thumb,
  .gallery-item:focus-visible .gallery-thumb {
    filter: grayscale(0%);
    opacity: 1;
  }
}

/* Na wszystkich urządzeniach - efekt podniesienia przy hover/focus */
.gallery-item:hover .gallery-thumb,
.gallery-item:focus-visible .gallery-thumb {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 32px rgba(31, 35, 40, 0.14);
}

/* Video tiles */
.video-tile {
  position: relative;
}
.video-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.18));
  pointer-events: none;
}
.video-play {
  position: absolute;
  inset: auto auto 12px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--portfolio-border);
  color: rgba(31, 35, 40, 0.9);
  font-weight: 700;
  font-size: 0.9rem;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.video-tile:hover .video-play,
.video-tile:focus-visible .video-play {
  opacity: 0.2;
  transform: translateY(1px);
}

/* Modal (photos + videos) */
.media-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1055; /* above navbar */
}
.media-modal.is-open {
  display: block;
}
.media-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 20, 0.78);
  backdrop-filter: blur(6px);
}
.media-modal__dialog {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px;
  gap: 10px;
}
.media-modal__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-height: calc(100vh - 36px);
}
.media-modal__img,
.media-modal__video {
  max-width: min(1100px, 92vw);
  max-height: min(78vh, 720px);
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: var(--portfolio-shadow);
  background: #0b0c0f;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.media-modal__video {
  width: min(1100px, 92vw);
}
.media-modal__caption {
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  font-size: 0.95rem;
  max-width: min(1100px, 92vw);
}
.media-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 17, 20, 0.45);
  color: #fff;
}
.media-modal__nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 17, 20, 0.45);
  color: #fff;
}
.media-modal__nav:disabled {
  opacity: 0.35;
}
.no-scroll {
  overflow: hidden !important;
}

/* Enhanced header section for offer pages */
header.mb-4 {
  margin-bottom: 3rem !important;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.1);
}

@media (min-width: 992px) {
  header.mb-4 {
    margin-bottom: 3.5rem !important;
    padding-bottom: 1.5rem;
  }
}

/* Better spacing between offer sections */
section.portfolio-card.mb-4 {
  margin-bottom: 2rem !important;
}

@media (min-width: 768px) {
  section.portfolio-card.mb-4 {
    margin-bottom: 2.5rem !important;
  }
}

/* Gap improvements for offer sections */
.portfolio-card .d-flex.gap-3 {
  margin-top: 1rem;
}

.portfolio-card .d-flex.flex-wrap.gap-2 {
  margin-top: 1.25rem;
}

/* Subtle animation on page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portfolio-card {
  animation: fadeInUp 0.6s ease-out;
}

.portfolio-card:nth-child(1) {
  animation-delay: 0.1s;
}

.portfolio-card:nth-child(2) {
  animation-delay: 0.2s;
}

.portfolio-card:nth-child(3) {
  animation-delay: 0.3s;
}

.portfolio-strip {
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Enhanced styling for offer variant cards (oferta2, oferta3) */
.portfolio-card .border.rounded-4.bg-white {
  border: 1.5px solid var(--portfolio-border) !important;
  box-shadow: 0 2px 8px rgba(31, 35, 40, 0.04);
  transition: all 0.2s ease;
}

.portfolio-card .border.rounded-4.bg-white:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.3) !important;
  box-shadow: 0 4px 12px rgba(31, 35, 40, 0.08);
  transform: translateY(-2px);
}

.portfolio-card .fw-bold {
  color: var(--portfolio-text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

/* Special styling for nested cards in offer variants */
.portfolio-card .border.rounded-4.bg-white ul {
  margin-bottom: 0;
  padding-left: 1rem;
}

.portfolio-card .border.rounded-4.bg-white ul li {
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.portfolio-card .border.rounded-4.bg-white ul li::before {
  font-size: 0.9rem;
}

/* Responsive improvements for offer cards */
@media (max-width: 991px) {
  .portfolio-card .d-flex.align-items-start.gap-3 {
    align-items: flex-start !important;
  }
  
  .offer-preview--small {
    margin-top: 1.5rem;
    max-width: 100%;
  }
  
  .offer-icon {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 767px) {
  .portfolio-card h2,
  .portfolio-card .h4 {
    font-size: 1.35rem;
  }
  
  .btn-sm {
    font-size: 0.85rem;
    padding: 7px 14px;
  }
}

/* Text alignment fixes */
.portfolio-card .row .col-lg-7,
.portfolio-card .row .col-lg-6,
.portfolio-card .row .col-lg-5 {
  display: flex;
  flex-direction: column;
}

@media (max-width: 576px) {
  .media-modal__dialog {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .media-modal__nav {
    display: none;
  }
  .media-modal__img,
  .media-modal__video {
    max-height: 74vh;
  }
}


