/* ==========================================================================
   VARIABLES
   ========================================================================== */

:root {
  /* Colors */
  --color-primary: #387a6e;
  --color-primary-light: #4a9c8d;
  --color-background: #f8f9fa;
  --color-text: #2c3e50;
  --color-heading: #1a365d;
  --color-white: #ffffff;

  /* Typography */
  --font-family-base: 'Raleway', system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --font-size-h1: 44px;
  --font-size-h2: 32px;
  --font-size-h3: 24px;
  --font-size-section-title: 28px;
  --font-size-intro: 20px;

  /* Layout */
  --width-container-max: 1000px;

  /* UI Elements */
  --border-radius: 8px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition-default: all 0.2s ease-in-out;
}

/* ==========================================================================
   BASE ELEMENTS
   ========================================================================== */

html, body {
  font-family: var(--font-family-base);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: 1.8;
  font-weight: 400;
  background-color: var(--color-background);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

ul {
  padding-left: 20px;
  margin: 20px 0;
}

li {
  margin-bottom: 10px;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

/* Header */
.site-header {
  background-color: var(--color-primary);
  background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 40px 0;
  position: relative;
  width: 100%;
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 80px 0 40px;
  position: relative;
  width: 100%;
  z-index: 1;
}

/* Container */
.container {
  max-width: var(--width-container-max);
  margin: -40px auto -40px;
  padding: 32px;
  width: 90%;
  box-sizing: border-box;
  text-align: left;
  background-color: var(--color-white);
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  position: relative;
  z-index: 2;
  padding-bottom: 48px;
}

.site-header__container {
  max-width: var(--width-container-max);
  margin: 0 auto;
  padding: 32px;
  width: 90%;
  box-sizing: border-box;
}

/* Site branding */
.site-logo {
  margin-bottom: 30px;
  height: auto;
  width: 120px;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.site-title {
  color: var(--color-white);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: var(--font-size-h1);
  font-weight: 700;
  margin: 0 0 20px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 1200px) {
  .container, .header-container {
    width: 95%;
  }
}

@media (max-width: 992px) {
  .title {
    font-size: 38px;
  }
  .container {
    padding: 24px;
  }
}

@media (max-width: 767px) {
  .title {
    font-size: 32px;
  }
  .contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .contact li {
    display: block;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }
  .contact a {
    display: inline-block;
    width: auto;
    max-width: 100%;
    font-size: 15px;
    padding: 8px 12px;
  }
  .container {
    padding: 20px;
    background: var(--color-white);
    border: none;
    border-radius: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    margin-top: 0;
    margin-bottom: 0;
  }

  .header-container, .container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  footer {
    margin-top: 0;
  }
}

/* Contact information */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.contact-list__item {
  display: inline-block;
  padding: 0 10px;
  text-align: center;
}

.contact-list__link {
  color: var(--color-white);
  text-decoration: none;
  font-size: var(--font-size-base);
  padding: 8px 16px;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.1);
  display: inline-block;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  word-break: break-word;
  text-align: center;
  transition: var(--transition-default);
}

/* Make obfuscated placeholders clearly clickable */
.contact-list__link.phone-obf,
.contact-list__link.email-obf {
  cursor: pointer;
}

.contact-list__link:active,
.contact-list__link:focus,
.contact-list__link:hover {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.15);
}

/* Site subtitle */
.site-subtitle {
  text-transform: uppercase;
  font-weight: 500;
  font-size: var(--font-size-intro);
  letter-spacing: 2px;
  margin-top: 16px;
  color: var(--color-white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  display: inline-block;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  margin-top: 40px;
  font-size: var(--font-size-section-title);
}

h3 {
  font-size: var(--font-size-h3);
}

strong, th {
  font-weight: 500;
}

blockquote {
  padding-left: 15px;
  margin: 0 0 30px 0;
}

blockquote p {
  font-style: italic;
  font-size: var(--font-size-base);
  color: #555;
}

/* ==========================================================================
   TABLE COMPONENTS
   ========================================================================== */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin: 32px 0;
  table-layout: fixed;
}

table th,
table td {
  border-style: solid;
  border-width: 0 1px 1px 0;
  border-color: #e2e8f0;
  padding: 12px;
  text-align: left;
  word-wrap: break-word;
}

table th {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

li {
  padding: 5px;
  margin-bottom: 8px;
}

/* Cennik - special styling for the pricing table */
.container h3 + table {
  border-collapse: separate;
  border-spacing: 0;
  border: none;
  width: 100%;
  margin: 32px 0;
  background: transparent;
}

.container h3 + table th,
.container h3 + table td {
  padding: 16px;
  text-align: center;
  border: none;
  background-color: var(--color-white);
}

.container h3 + table tr:first-child td {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 18px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.container h3 + table tr:nth-child(2) td {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  padding-top: 16px;
  padding-bottom: 12px;
}

.container h3 + table tr:last-child td {
  padding-bottom: 20px;
}

/* Add shadow and rounded corners to each column */
.container h3 + table tr:first-child td:first-child {
  border-top-left-radius: var(--border-radius);
}

.container h3 + table tr:first-child td:last-child {
  border-top-right-radius: var(--border-radius);
}

.container h3 + table tr:last-child td:first-child {
  border-bottom-left-radius: var(--border-radius);
}

.container h3 + table tr:last-child td:last-child {
  border-bottom-right-radius: var(--border-radius);
}

.container h3 + table td {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
  .container h3 + table {
    display: block;
    overflow-x: auto;
  }

  .container h3 + table td {
    padding: 12px 8px;
    font-size: 14px;
  }

  .container h3 + table tr:nth-child(2) td {
    font-size: 18px;
  }
}

/* ==========================================================================
   CARD COMPONENT
   ========================================================================== */

.card {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition-default);
  margin-bottom: 16px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   PRICING COMPONENTS
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

/* Pricing card specific styles - używa wspólnej klasy card */

.pricing-card__title {
  color: var(--color-primary);
  margin: 0 0 16px 0;
  font-size: 20px;
}

.pricing-card__price {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 16px 0;
}

.pricing-card__description {
  color: var(--color-text);
  margin: 8px 0;
}

.pricing-note {
  margin-top: 32px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
}

.pricing-note__text {
  margin: 8px 0;
}

.pricing-note__highlight {
  color: var(--color-primary);
}


/* ==========================================================================
   TESTIMONIAL COMPONENTS
   ========================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.testimonial {
  text-align: left;
}

.testimonial__quote {
  font-style: italic;
  margin: 0 0 20px 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
}

.testimonial__author {
  margin-top: 24px;
}

.testimonial__author-name {
  color: var(--color-primary);
  display: block;
  font-style: normal;
  font-size: 18px;
  margin-bottom: 4px;
  font-weight: 500;
}

.testimonial__author-info {
  color: var(--color-text);
  font-style: normal;
  font-size: 14px;
  opacity: 0.8;
}

.testimonials-cta {
  margin-top: 40px;
  margin-bottom: 40px;
  text-align: center;
}

.testimonials-cta__title {
  margin-bottom: 24px;
  color: var(--color-text);
  font-size: var(--font-size-h3);
  font-weight: 500;
}

.testimonials-cta .button {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition-default);
  font-size: 18px;
  font-weight: 500;
  box-shadow: var(--box-shadow);
}

.testimonials-cta .button:hover {
  background: var(--color-primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   UTILITY COMPONENTS
   ========================================================================== */

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-primary-light);
}

/* ==========================================================================
   LARS SECTION
   ========================================================================== */

.lars {
  margin: 30px 0;
  padding: 20px 0;
  overflow: hidden; /* Zapobiega wychodzeniu elementów poza kontener */
  clear: both; /* Zapewnia, że następne elementy nie będą wchodzić pod sekcję */
  display: flex;
  align-items: center;
}

.lars__image-wrapper {
  flex: 0 0 auto;
  max-width: 250px;
  margin-right: 20px;
}

.lars__image-wrapper p {
  margin: 0;
}

.lars__image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
}

.lars__image-wrapper img:hover {
  transform: scale(1.03);
}

.lars__content {
  flex: 1;
}

.lars__content p {
  margin: 0;
}

.lars__image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
}

.lars__image:hover {
  transform: scale(1.03);
}

@media (max-width: 767px) {
  .lars {
    flex-direction: column;
    text-align: center;
  }

  .lars__content {
    text-align: center;
  }

  .lars__image-wrapper {
    margin: 0 auto 20px;
    max-width: 100%;
  }
}

/* ==========================================================================
   MODAL/POPUP COMPONENTS
   ========================================================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal--visible {
  display: flex;
  opacity: 1;
}

.modal__content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  padding: 10px;
  box-shadow: var(--box-shadow);
  animation: modalZoomIn 0.3s;
}

.modal__image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--border-radius);
}

.modal__close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 30px;
  height: 30px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: var(--transition-default);
}

.modal__close:hover {
  background-color: var(--color-primary-light);
  transform: scale(1.1);
}

@keyframes modalZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
