/* ========================================
   Słodki Zakątek — Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
  --primary: #D4A574;
  --secondary: #8B5A3C;
  --accent: #E85D75;
  --bg: #FDF8F3;
  --bg-alt: #F5EBE0;
  --text: #3D2B1F;
  --text-muted: #7A6558;
  --border: #E0D5C8;
  --success: #7CB342;
  --error: #D32F2F;
}

/* Base Styles */
body {
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: white;
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========================================
   Components
   ======================================== */

/* Primary Button */
.btn-primary {
  background-color: var(--accent);
  transition: all 300ms ease-out;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  background-color: #d14a62;
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(232, 93, 117, 0.3);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Secondary Button */
.btn-secondary {
  border: 2px solid var(--secondary);
  color: var(--secondary);
  transition: all 300ms ease-out;
  display: inline-block;
  text-align: center;
}

.btn-secondary:hover {
  background-color: var(--secondary);
  color: white;
}

/* Hover Card Effect (DICE Variant 1: Scale + Shadow) */
.hover-card {
  transition: transform 300ms ease-out, box-shadow 300ms ease-out;
}

.hover-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 40px rgba(139, 90, 60, 0.15);
}

/* ========================================
   Animations (DICE Variant 3: Slide from Left)
   ======================================== */

.slide-in {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger animation delays */
.slide-in:nth-child(1) { transition-delay: 0ms; }
.slide-in:nth-child(2) { transition-delay: 100ms; }
.slide-in:nth-child(3) { transition-delay: 200ms; }
.slide-in:nth-child(4) { transition-delay: 300ms; }
.slide-in:nth-child(5) { transition-delay: 400ms; }
.slide-in:nth-child(6) { transition-delay: 500ms; }
.slide-in:nth-child(7) { transition-delay: 600ms; }
.slide-in:nth-child(8) { transition-delay: 700ms; }

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide Up Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.faq-question {
  cursor: pointer;
  user-select: none;
}

.faq-question i {
  transition: transform 400ms ease;
  font-size: 0.875rem;
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.faq-answer.open {
  max-height: 300px;
  padding-bottom: 1.25rem;
  opacity: 1;
}

/* ========================================
   Form Wizard
   ======================================== */

.wizard-step {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.wizard-step.active {
  display: block;
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 117, 0.15);
}

/* Checkbox Custom */
input[type="checkbox"] {
  accent-color: var(--accent);
}

/* ========================================
   Header
   ======================================== */

#slodki-header {
  transition: all 0.3s ease-out;
}

#slodki-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Navigation Links */
nav a {
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease-out;
}

nav a:hover::after {
  width: 100%;
}

/* ========================================
   Mobile Menu
   ======================================== */

#slodki-mobile-menu {
  animation: fadeIn 0.2s ease-out;
}

#slodki-mobile-menu nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

#slodki-mobile-menu nav a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

/* ========================================
   Hero Section
   ======================================== */

#witamy-slodko {
  min-height: 100vh;
}

/* Hero Card */
#witamy-slodko .bg-white\/95 {
  backdrop-filter: blur(10px);
}

/* ========================================
   Testimonials
   ======================================== */

#opinie-klientow .flex-col img {
  border: 4px solid var(--primary);
}

/* Star Rating */
.fa-star {
  transition: transform 0.2s ease;
}

.fa-star:hover {
  transform: scale(1.2);
}

/* ========================================
   Portfolio Gallery
   ======================================== */

#nasze-realizacje .group img {
  transition: transform 0.5s ease-out;
}

#nasze-realizacje .group:hover img {
  transform: scale(1.1);
}

/* ========================================
   Pricing Cards
   ======================================== */

#zestawy-cenowe .hover-card {
  position: relative;
}

/* Popular badge pulse */
#zestawy-cenowe .absolute.-top-3 {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ========================================
   Process Steps
   ======================================== */

#jak-zamawiamy .absolute {
  z-index: 10;
}

/* ========================================
   Benefits Section
   ======================================== */

#dlaczego-my span.text-5xl,
#dlaczego-my span.text-6xl {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   Products Grid
   ======================================== */

#nasze-slodkosci .hover-card img {
  transition: transform 0.3s ease-out;
}

#nasze-slodkosci .hover-card:hover img {
  transform: scale(1.05);
}

/* ========================================
   CTA Section
   ======================================== */

#zamow-teraz {
  position: relative;
  overflow: hidden;
}

#zamow-teraz::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 15s linear infinite;
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========================================
   Footer
   ======================================== */

footer a {
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--primary);
}

/* ========================================
   Scroll to Top Button
   ======================================== */

#scroll-top {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#scroll-top:hover {
  transform: translateY(-3px);
}

#scroll-top:active {
  transform: translateY(0);
}

/* ========================================
   Cookie Popup
   ======================================== */

#slodki-cookie-popup {
  animation: slideUp 0.3s ease-out;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
  /* Reduce animation distance on mobile */
  .slide-in {
    transform: translateX(-15px);
  }

  /* Disable hover effects on touch devices */
  .hover-card:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(139, 90, 60, 0.1);
  }

  /* Adjust hero card position */
  #witamy-slodko .max-w-xl {
    margin: 0 1rem;
  }

  /* Stack pricing cards */
  #zestawy-cenowe .md\:-translate-y-4 {
    transform: none;
  }
}

@media (max-width: 640px) {
  /* Smaller headings on mobile */
  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Full width buttons */
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  header,
  footer,
  #scroll-top,
  #slodki-cookie-popup,
  .btn-primary,
  .btn-secondary {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .slide-in {
    opacity: 1;
    transform: none;
  }
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .slide-in {
    opacity: 1;
    transform: none;
  }

  .hover-card:hover {
    transform: none;
  }
}
