/**
 * GreenSpace - Style specyficzne dla podstron
 * Zawiera: page hero, timeline, accordion, lightbox, karty zespołu
 */

/* ===========================================
   PAGE HERO - Hero dla podstron
   =========================================== */
.page-hero {
  position: relative;
  min-height: max(55vh, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  overflow: hidden;
  padding-top: 120px;
  /* Przestrzeń dla fixed navbar */
  padding-bottom: 60px;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://images.pexels.com/photos/1301856/pexels-photo-1301856.jpeg?auto=compress&cs=tinysrgb&w=1920');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
}

.page-hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 var(--spacing-md);
}

.page-hero .hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: var(--spacing-sm);
}

.page-hero .hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.9;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb span {
  opacity: 0.7;
}

/* ===========================================
   TIMELINE - Historia firmy
   =========================================== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-lg) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: var(--spacing-md);
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: calc(var(--spacing-lg) + 20px);
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: calc(var(--spacing-lg) + 20px);
}

.timeline-dot {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border: 4px solid var(--white);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: var(--shadow-md);
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

.timeline-content {
  background: var(--white);
  padding: var(--spacing-md);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.timeline-year {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===========================================
   ACCORDION - FAQ
   =========================================== */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--white);
  border-radius: 10px;
  margin-bottom: var(--spacing-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: var(--spacing-md);
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.accordion-header:hover {
  background-color: var(--light);
}

.accordion-header i {
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.accordion-item.active .accordion-header i {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

/* max-height jest teraz dynamicznie ustawiane przez JavaScript */

.accordion-body {
  padding: var(--spacing-md);
  padding-top: var(--spacing-sm);
  color: var(--gray);
  line-height: 1.8;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ===========================================
   LIGHTBOX - Galeria modal
   =========================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 50%;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

.lightbox-caption {
  text-align: center;
  color: var(--white);
  margin-top: var(--spacing-sm);
  font-size: 1.1rem;
}

/* ===========================================
   TEAM CARDS - Karty zespołu
   =========================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.team-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.team-card-image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.team-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.team-card:hover .team-card-image img {
  transform: scale(1.1);
}

.team-card-content {
  padding: var(--spacing-md);
  text-align: center;
}

.team-card h3 {
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.team-card .role {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.team-card p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

.team-card .social-links {
  margin-top: var(--spacing-sm);
}

/* ===========================================
   PRICING CARDS - Cennik
   =========================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.pricing-card {
  background: var(--white);
  border-radius: 20px;
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border: 3px solid var(--primary-color);
  transform: scale(1.05);
}

.pricing-card.featured::before {
  content: 'Polecane';
  position: absolute;
  top: 20px;
  right: -35px;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 3rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  transform: rotate(45deg);
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-10px);
}

.pricing-header {
  text-align: center;
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: var(--spacing-md);
}

.pricing-header h3 {
  color: var(--dark);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: var(--gray-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-features li i {
  color: var(--secondary-color);
}

.pricing-features li.disabled {
  opacity: 0.5;
}

.pricing-features li.disabled i {
  color: var(--gray-light);
}

.pricing-card .btn {
  margin-top: auto;
}

/* ===========================================
   CONTACT FORM ENHANCED
   =========================================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: var(--error);
}

.form-group .error-message {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

.form-group.success input,
.form-group.success textarea {
  border-color: var(--success);
}

/* ===========================================
   VALUE CARDS - Wartości firmy
   =========================================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.value-card {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.value-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
}

.value-icon i {
  font-size: 2rem;
  color: var(--white);
}

.value-card h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.value-card p {
  color: var(--gray);
  line-height: 1.6;
}

/* ===========================================
   PROCESS STEPS - Proces współpracy
   =========================================== */
.process-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--gray-light);
  z-index: 0;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 1;
  /* Staggered animation */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays - each step appears after the previous one */
.process-step:nth-child(1) {
  transition-delay: 0s;
}

.process-step:nth-child(2) {
  transition-delay: 0.25s;
}

.process-step:nth-child(3) {
  transition-delay: 0.5s;
}

.process-step:nth-child(4) {
  transition-delay: 0.75s;
}

.process-step:nth-child(5) {
  transition-delay: 1s;
}

.process-step:nth-child(6) {
  transition-delay: 1.25s;
}

.step-number {
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto var(--spacing-sm);
  box-shadow: var(--shadow-md);
}

.process-step h4 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.process-step p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ===========================================
   MAP PLACEHOLDER
   =========================================== */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gray-light), var(--light));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray);
}

.map-placeholder i {
  font-size: 4rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

/* ===========================================
   RESPONSIVE - Podstrony
   =========================================== */

/* --- TABLET (769px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
  .process-steps {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .process-step {
    flex: 0 0 calc(50% - 1rem);
    text-align: center;
  }

  .process-steps::before {
    display: none;
  }

  .team-card-image {
    height: 240px;
  }

  .pricing-grid {
    gap: 1rem;
  }

  .pricing-card {
    padding: var(--spacing-md);
  }

  .lightbox-nav {
    font-size: 1.5rem;
    padding: 0.75rem;
  }

  .lightbox-prev {
    left: -60px;
  }

  .lightbox-next {
    right: -60px;
  }
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 350px;
    padding-top: 80px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px !important;
    padding-right: var(--spacing-sm) !important;
    text-align: left !important;
  }

  .timeline-dot {
    left: 10px !important;
    right: auto !important;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .process-steps {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .process-steps::before {
    display: none;
  }

  .pricing-card.featured {
    transform: none;
  }

  .pricing-card.featured:hover {
    transform: translateY(-10px);
  }

  .lightbox-nav {
    display: none;
  }
}

/* ===========================================
   DARK MODE - Podstrony
   =========================================== */

/* Page Hero - bez zmian w dark mode, identyczne jak index hero */

/* Timeline */
[data-theme="dark"] .timeline::before {
  background: linear-gradient(to bottom, var(--secondary-color), var(--primary-light));
}

[data-theme="dark"] .timeline-content {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .timeline-content h3 {
  color: #f0f0f0;
}

[data-theme="dark"] .timeline-content p {
  color: #b0b0b0;
}

[data-theme="dark"] .timeline-dot {
  border-color: #0f0f0f;
  box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.2);
}

/* Accordion */
[data-theme="dark"] .accordion-item {
  background: #1e1e1e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .accordion-header {
  color: #f0f0f0;
}

[data-theme="dark"] .accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .accordion-body {
  color: #b0b0b0;
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* Lightbox */
[data-theme="dark"] .lightbox {
  background-color: rgba(0, 0, 0, 0.98);
}

/* Team cards */
[data-theme="dark"] .team-card {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .team-card-content h3 {
  color: #f0f0f0;
}

[data-theme="dark"] .team-card-content .role {
  color: var(--secondary-color);
}

[data-theme="dark"] .team-card-content p {
  color: #b0b0b0;
}

/* Pricing cards */
[data-theme="dark"] .pricing-card {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .pricing-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .pricing-header h3 {
  color: #f0f0f0;
}

[data-theme="dark"] .pricing-features li {
  color: #b0b0b0;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .pricing-card.featured {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  border-color: var(--secondary-color);
}

/* Value cards */
[data-theme="dark"] .value-card {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .value-card h3 {
  color: #f0f0f0;
}

[data-theme="dark"] .value-card p {
  color: #b0b0b0;
}

/* Process steps */
[data-theme="dark"] .process-steps::before {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .step-number {
  box-shadow: 0 4px 20px rgba(82, 183, 136, 0.25);
}

[data-theme="dark"] .process-step h4 {
  color: #f0f0f0;
}

[data-theme="dark"] .process-step p {
  color: #9a9a9a;
}

/* Map placeholder */
[data-theme="dark"] .map-placeholder {
  background: linear-gradient(135deg, #1e1e1e, #161616);
}

[data-theme="dark"] .map-placeholder i {
  color: var(--secondary-color);
}

/* Form elements */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background-color: #252525;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: #757575;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.15);
}

/* Error states */
[data-theme="dark"] .form-group.error input,
[data-theme="dark"] .form-group.error textarea {
  border-color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.05);
}

/* Breadcrumb */
[data-theme="dark"] .breadcrumb a {
  color: var(--secondary-color);
}

[data-theme="dark"] .breadcrumb a:hover {
  color: #ffffff;
}

[data-theme="dark"] .breadcrumb span {
  color: #757575;
}