/* ==========================================================================
   Firmowa Strona Produktowa - Apple Apps Portfolio
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-base: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 1.25rem;
  --radius-md: 0.75rem;
  --radius-sm: 0.5rem;
  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  color: #f1f5f9;
  background-color: #05070a;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------- Navbar ---------------- */
.navbar-custom {
  background: rgba(10, 14, 23, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: var(--nav-height);
  transition: var(--transition-base);
  z-index: 1040;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.35rem;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-dot {
  width: 142px;
  height: 22px;
  /*border-radius: 50%;*/
  /*background: linear-gradient(135deg, #38bdf8, #818cf8);*/
  background: url('../img/logo.png');
  display: inline-block;
  /*box-shadow: 0 0 12px #38bdf8;*/
}

.nav-link {
  color: #cbd5e1 !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.nav-link:hover, .nav-link:focus, .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08);
}

.lang-selector {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: var(--transition-base);
}

.lang-selector:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ---------------- Hero Section ---------------- */
.hero-section {
  position: relative;
  padding: 6.5rem 0 4.5rem;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #080b11 70%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #94a3b8;
  max-width: 720px;
  margin: 1.2rem auto 2.2rem;
  line-height: 1.6;
}

.quick-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  transition: var(--transition-base);
}

.quick-pill:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ---------------- App Sections General ---------------- */
.app-section {
  position: relative;
  padding: 5.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* App 1: Szybki Kurs Walut (Czarny / Black) */
.section-kurs-walut {
  background-color: #07090d;
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(202, 138, 4, 0.08) 0px, transparent 50%);
}

.section-kurs-walut .accent-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* App 2: iFunSchool (Zielony / Green) */
.section-ifunschool {
  background-color: #062316;
  background-image: 
    radial-gradient(at 0% 0%, rgba(34, 197, 94, 0.15) 0px, transparent 60%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 60%);
}

.section-ifunschool .accent-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

/* App 3: iFunSchool: Memo (Fioletowy / Purple & Indigo) */
.section-memo {
  background-color: #170d2b;
  background-image: 
    radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 60%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.12) 0px, transparent 60%);
}

.section-memo .accent-badge {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

/* App 4: Car Camera Recorder (Ciemny grafit & Czerwony / Graphite & Red) */
.section-car-camera {
  background-color: #0b0f16;
  background-image: 
    radial-gradient(at 0% 0%, rgba(239, 68, 68, 0.14) 0px, transparent 60%),
    radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.1) 0px, transparent 60%);
}

.section-car-camera .accent-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* App Icon & Header */
.app-icon-wrapper {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  flex-shrink: 0;
  transition: var(--transition-base);
}

.app-icon-wrapper:hover {
  transform: scale(1.05) rotate(1deg);
}

.app-icon-wrapper img, .app-icon-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
}

.app-title {
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 0.3rem;
  color: #fff;
}

.app-subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Badges list */
.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 1.5rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

/* Buttons and App Store links */
.store-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin: 1.5rem 0 2rem;
}

/* Official Apple Store Badges (PNG) */
.store-badge-link {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  line-height: 0;
  text-decoration: none;
}

.store-badge-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.store-badge-link:active {
  transform: translateY(0);
}

.store-badge-img {
  height: 42px;
  width: auto;
  display: block;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #000000;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  transition: var(--transition-base);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.app-store-btn:hover {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

.app-store-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.app-store-btn .btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.app-store-btn .sub-text {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.app-store-btn .main-text {
  font-size: 1.05rem;
  font-weight: 700;
}

.privacy-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.privacy-link-badge:hover {
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.05);
}

/* Description & Expandable Content */
.app-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 1.2rem;
}

.expandable-block {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-base);
}

.expandable-block details {
  padding: 0;
}

.expandable-block summary {
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  color: #e2e8f0;
  transition: var(--transition-base);
}

.expandable-block summary::-webkit-details-marker {
  display: none;
}

.expandable-block summary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.expandable-block summary::after {
  content: "▾";
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.expandable-block details[open] summary::after {
  transform: rotate(180deg);
}

.expandable-content {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  line-height: 1.65;
  color: #94a3b8;
}

.expandable-content ul {
  padding-left: 1.3rem;
  margin-bottom: 0;
}

.expandable-content li {
  margin-bottom: 0.35rem;
}

/* ---------------- Screenshot Carousel ---------------- */
.carousel-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screenshot-stage {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 9 / 18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
  border: 4px solid #1e293b;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              aspect-ratio 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.35s ease;
}

/* Dynamiczne wsparcie dla grafik horyzontalnych (16:9 Dashcam / tvOS / macOS) */
.screenshot-stage.is-landscape {
  max-width: 620px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
}

.orientation-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  position: relative;
}

.carousel-slide img, .carousel-slide svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

/* Carousel Controls */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-base);
  z-index: 10;
  backdrop-filter: blur(8px);
}

.carousel-nav-btn:hover {
  background: rgba(56, 189, 248, 0.9);
  color: #000;
  border-color: transparent;
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.prev-btn {
  left: -12px;
}

.carousel-nav-btn.next-btn {
  right: -12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.dot-btn {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-base);
}

.dot-btn.active {
  width: 26px;
  background: #38bdf8;
}

/* ---------------- News & Updates Section ---------------- */
.news-section {
  padding: 5rem 0;
  background: #090c13;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-headline {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.news-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}

.news-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.news-excerpt {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.6;
  flex-grow: 1;
}

.news-link {
  color: #38bdf8;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.news-link:hover {
  text-decoration: underline;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: #040608;
  padding: 4.5rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  color: #64748b;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-nav-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition-base);
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ---------------- Responsive Tweaks ---------------- */
@media (max-width: 991.98px) {
  .app-section {
    padding: 4rem 0;
  }
  .carousel-card {
    margin-top: 2.5rem;
  }
  .carousel-nav-btn.prev-btn {
    left: 4px;
  }
  .carousel-nav-btn.next-btn {
    right: 4px;
  }
  .navbar-collapse {
    background: rgba(10, 14, 23, 0.98);
    padding: 1.2rem;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    padding: 5rem 0 3rem;
  }
  .store-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .store-badge-img {
    height: 44px;
  }
  .app-store-btn {
    justify-content: center;
  }
}

/* ---------------- Custom Dark Pagination ---------------- */
.pagination-custom .page-item {
  margin: 0 0.25rem;
}

.pagination-custom .page-link {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.65rem 1.15rem;
  border-radius: 0.6rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination-custom .page-link:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.pagination-custom .page-item.active .page-link {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.pagination-custom .page-item.disabled .page-link {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: #475569;
  pointer-events: none;
}

img[alt=apple-watch] {
  width: 200px;
  display: inline-block;
}