/* ================================
   GLOBAL STYLES
================================ */
:root {
  --primary: #23c54d;
  --primary-dark: #1ca53f;
  --primary-light: #5ad97a;
  --primary-ultra-light: #ebf9efd3;
  --dark: #333333;
  --gray-dark: #555555;
  --gray: #777777;
  --gray-light: #eeeeeed8;
  --white: #ffffffdc;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-family: 'Montserrat', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  font-size: 1.6rem;
  background-color: var(--white);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 3.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 5rem;
  position: relative;
  padding-bottom: 2rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6rem;
  height: 0.4rem;
  background-color: var(--primary);
  border-radius: 2px;
}

section {
  padding: 8rem 0;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 1.2rem 2.4rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1.6rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-ultra-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-text {
  color: var(--primary);
  padding: 0;
  background: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.btn-text i {
  margin-left: 0.8rem;
  transition: var(--transition);
}

.btn-text:hover i {
  transform: translateX(5px);
}

/* ================================
   HEADER STYLES - MOBILE MENU FIX
================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  transition: var(--transition);
}

.header.scrolled {
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.logo img {
  height: 5rem;
  transition: var(--transition);
}

.main-nav {
  display: flex;
}

.main-nav ul {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--dark);
  font-weight: 500;
  padding: 0.8rem 1.2rem;
  border-radius: 4px;
  font-size: 1.6rem;
  transition: var(--transition);
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--primary);
  background-color: var(--primary-ultra-light);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 3rem;
  height: 2.4rem;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.mobile-menu-btn span {
  display: block;
  height: 0.3rem;
  width: 100%;
  background-color: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

/* MOBILE MENU STYLES */
@media screen and (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2000;
    pointer-events: none;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
    text-align: center;
  }

  .main-nav a {
    font-size: 2.2rem;
    padding: 1.5rem 3rem;
    display: block;
    width: 100%;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(0.8rem) rotate(45deg);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-0.8rem) rotate(-45deg);
  }
}

/* ================================
   HERO SECTION
================================ */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.842), rgba(0, 0, 0, 0.842)), url(images/logistyka.jpg);
  background-size: cover;
  background-position: center;
  color: var(--white);
  margin-top: 0;
  padding-top: 8rem;
}

.hero-content {
  max-width: 70rem;
}

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
}
.modal-close-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.hero h1 {
  font-size: 4.8rem;
  line-height: 1.2;
  margin-bottom: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 2.2rem;
  margin-bottom: 3rem;
  font-weight: 300;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ================================
   SERVICES OVERVIEW
================================ */
.services-overview {
  padding: 8rem 0;
  background-color: var(--primary-ultra-light);
  background-image: url(images/services-bg.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.services-overview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.9);
}

.services-overview .container {
  position: relative;
  z-index: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.service-card {
  background-color: var(--white);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 3.2rem;
  color: var(--primary);
  margin-bottom: 2rem;
  height: 6rem;
  width: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-ultra-light);
  border-radius: 50%;
}

.service-card h3 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.service-card p {
  color: var(--gray);
  margin-bottom: 2rem;
  flex-grow: 1;
}

/* ================================
   CASE STUDIES SECTION
================================ */
.case-studies {
  padding: 8rem 0;
  background-color: var(--white);
  background-image: url(images/case-bg.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.case-studies::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.95);
}

.case-studies .container {
  position: relative;
  z-index: 1;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50rem, 1fr));
  gap: 4rem;
  margin-top: 4rem;
}

.case-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.case-image {
  height: 25rem;
  overflow: hidden;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.case-card:hover .case-image img {
  transform: scale(1.05);
}

.case-content {
  padding: 3rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.case-content h3 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.case-results {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
  color: var(--primary);
}

.result-item i {
  font-size: 1.6rem;
}

.case-content p {
  margin-bottom: 2rem;
  color: var(--gray-dark);
  flex-grow: 1;
}

.case-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.case-features li {
  background-color: var(--primary-ultra-light);
  color: var(--primary);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-size: 1.4rem;
  font-weight: 500;
}

/* ================================
   WHY US SECTION
================================ */
.why-us {
  padding: 8rem 0;
  background-color: var(--primary-ultra-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.feature {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-icon {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background-color: var(--primary-ultra-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 3.6rem;
  transition: var(--transition);
}

.feature:hover .feature-icon {
  background-color: var(--primary);
  color: var(--white);
}

.feature h3 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.feature p {
  color: var(--gray-dark);
}

/* ================================
   CONTACT SECTION
================================ */
.contact {
  padding: 8rem 0;
  background-color: var(--white);
  background-image: url(images/contact-bg.jpg);
  background-size: cover;
  background-position: center;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.95);
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40rem, 1fr));
  gap: 5rem;
}

.contact-info {
  padding: 4rem;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-info h3 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: var(--dark);
}

.contact-info2 {
  padding: 4rem;
  background-color: var(--dark);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-info2 h3 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: var(--white);
}

.contact-details {
  margin-bottom: 4rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-item i {
  font-size: 2rem;
  color: var(--primary);
  width: 3rem;
  text-align: center;
  margin-right: 1.5rem;
  margin-top: 0.3rem;
}

.contact-item p {
  color: var(--gray-dark);
}

.map {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 4rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

.contact-form {
  background-color: var(--white);
  padding: 4rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: var(--dark);
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--gray-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1.2rem;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  font-size: 1.6rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(35, 197, 77, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 15rem;
}

.form-group.checkbox {
  display: flex;
  align-items: flex-start;
}

.form-group.checkbox input {
  width: auto;
  margin-right: 1rem;
  margin-top: 0.5rem;
}

.form-group.checkbox label {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.form-group input[type="file"] {
  padding: 0.8rem;
}

/* ================================
   FOOTER
================================ */
.footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 6rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-col h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 0.3rem;
  background-color: var(--primary);
}

.footer-logo {
  height: 5rem;
  margin-bottom: 2rem;
}

.footer-col p {
  color: var(--gray-light);
  margin-bottom: 2rem;
}

.footer-col ul li {
  margin-bottom: 1rem;
}

.footer-col ul li a {
  color: var(--gray-light);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

.footer-col .social-links {
  margin-top: 2rem;
}

.footer-col .social-icon {
  width: 3.6rem;
  height: 3.6rem;
  font-size: 1.6rem;
}

.contact-info li {
  display: flex;
  margin-bottom: 1.5rem;
  color: var(--gray-light);
}

.contact-info i {
  width: 2rem;
  margin-right: 1rem;
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-bottom p {
  color: var(--gray-light);
}

.footer-links a {
  color: var(--gray-light);
  margin-left: 2rem;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ================================
   ABOUT SECTION
================================ */
.about {
  padding: 8rem 0;
  background-color: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-bottom: 5rem;
}

.about-content h3 {
  font-size: 2.8rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--dark);
}

.about-content p {
  margin-bottom: 2rem;
  color: var(--gray-dark);
  line-height: 1.8;
}

.values-list {
  margin-top: 3rem;
}

.values-list li {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.values-list i {
  color: var(--primary);
  font-size: 2rem;
  margin-top: 0.3rem;
}

.about-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 3rem;
  margin-top: 6rem;
  text-align: center;
}

.stat-item {
  background-color: var(--primary-ultra-light);
  padding: 3rem 2rem;
  border-radius: 8px;
}

.stat-number {
  font-size: 4.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.stat-label {
  font-size: 1.6rem;
  color: var(--gray-dark);
  font-weight: 500;
}

/* ================================
   CALCULATOR SECTION
================================ */
.calculator {
  padding: 8rem 0;
  background-color: var(--primary-ultra-light);
}

.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
}

.calculator-form {
  background-color: var(--white);
  padding: 4rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.calculator-form h3 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: var(--dark);
}

.calculator-results {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.result-card {
  background-color: var(--white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.result-card h4 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark);
}

.result-card p {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
}

.result-card .result-description {
  font-size: 1.4rem;
  color: var(--gray);
  margin-top: 0.5rem;
}

.result-card.highlight {
  background-color: var(--primary);
}

.result-card.highlight h4,
.result-card.highlight p,
.result-card.highlight .result-description {
  color: var(--white);
}

.result-disclaimer {
  font-size: 1.4rem;
  color: var(--gray);
  margin: 2rem 0;
}

/* ================================
   FAQ SECTION
================================ */
.faq {
  padding: 8rem 0;
  background-color: var(--white);
}

.faq-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.faq-tab {
  padding: 1rem 2rem;
  border: none;
  background-color: var(--gray-light);
  color: var(--gray-dark);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.faq-tab.active,
.faq-tab:hover {
  background-color: var(--primary);
  color: var(--white);
}

.faq-content {
  display: none;
}

.faq-content.active {
  display: block;
}

.faq-list {
  max-width: 80rem;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 2rem;
  background-color: var(--white);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  background-color: var(--primary-ultra-light);
}

.faq-question h3 {
  font-size: 1.8rem;
  font-weight: 600;
}

.faq-question i {
  color: var(--primary);
  transition: var(--transition);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 2rem 2rem;
  max-height: 30rem;
}

.faq-answer p {
  color: var(--gray-dark);
  line-height: 1.7;
}

.faq-cta {
  text-align: center;
  margin-top: 5rem;
}

.faq-cta p {
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* Audit Process Section */
.audit-process {
    padding: 8rem 0;
    background-color: var(--primary-ultra-light);
}

.audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.audit-content h2 {
    font-size: 3.2rem;
    margin-bottom: 3rem;
    text-align: left;
}

.audit-steps {
    margin: 3rem 0;
}

.audit-steps h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.audit-steps ul {
    margin-left: 2rem;
}

.audit-steps li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.audit-steps li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-size: 2rem;
}

.audit-stats {
    margin: 4rem 0;
}

.stats-cards {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    flex: 1;
    padding: 2rem;
    border-radius: 8px;
    background-color: var(--white);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card.accent {
    background-color: var(--primary);
    color: var(--white);
}

.stat-percent {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.audit-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-quote {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 1rem;
    text-align: center;
    font-style: italic;
    font-size: 1.8rem;
}

/* ================================
   MOBILE OVERFLOW FIX - NAJWAŻNIEJSZE!
================================ */

/* Zapobiega przesuwaniu strony na boki */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

* {
  max-width: 100%;
  box-sizing: border-box;
}

/* Naprawia szerokość kontenera */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow-x: hidden;
}

/* Naprawia wszystkie sekcje */
section {
  width: 100%;
  overflow-x: hidden;
}

/* Naprawia header */
.header {
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
}

.header-inner {
  width: 100%;
  max-width: 100%;
}

/* Naprawia hero */
.hero {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Naprawia wszystkie grid-y */
.services-grid,
.case-grid,  
.features-grid,
.contact-grid,
.footer-grid,
.about-grid,
.calculator-container,
.audit-grid {
  width: 100%;
  max-width: 100%;
}

/* Naprawia karty */
.service-card,
.case-card,
.feature,
.contact-info,
.contact-info2,
.contact-form,
.calculator-form,
.result-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Naprawia obrazy */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Naprawia formularze */
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ================================
   RESPONSIVE STYLES - ULEPSZONE
================================ */

/* Tablet Portrait */
@media screen and (max-width: 1024px) {
  .container {
    padding: 0 3rem;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .about-grid,
  .calculator-container,
  .audit-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-grid {
    gap: 3rem;
  }
}

/* Tablet Landscape */
@media screen and (max-width: 992px) {
  html {
    font-size: 56.25%; /* 9px */
  }
  
  .header .btn-primary {
    display: none;
  }
  
  .case-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  }
  
  .case-results {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stats-cards {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Mobile Large */
@media screen and (max-width: 768px) {
  html {
    font-size: 50%; /* 8px */
  }
  
  /* KRYTYCZNE POPRAWKI DLA MOBILE */
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .container {
    padding: 0 1.5rem;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }
  
  /* Naprawia wszystkie sekcje */
  section {
    padding: 6rem 0;
    width: 100%;
    margin: 0;
  }
  
  /* Naprawia hero na mobile */
  .hero {
    margin: 0;
    padding: 7rem 0 6rem 0;
    width: 100%;
    max-width: 100%;
    background-attachment: scroll;
  }
  
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0 1.5rem;
  }
  
  /* Header Mobile */
  .header-inner {
    padding: 1rem 0;
  }
  
  .logo img {
    height: 10vh;
  }
  
  .main-nav {
    position: fixed;
    top: 7rem;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 99;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  
  .main-nav li {
    border-bottom: 1px solid var(--gray-light);
  }
  
  .main-nav li:last-child {
    border-bottom: none;
  }
  
  .main-nav a {
    display: block;
    padding: 1.5rem 0;
    font-size: 1.8rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.5rem, 0.5rem);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.7rem, -0.6rem);
  }
  
  /* Hero Mobile */
  .hero {
    padding-top: 7rem;
    height: 80vh;
    min-height: 500px;
  }

  .hero h1 {
    font-size: 3.6rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
  }

  .hero p {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
  }
  
  /* Sections Mobile */
  section {
    padding: 6rem 0;
  }
  
  .section-title {
    font-size: 2.8rem;
    margin-bottom: 4rem;
  }
  
  /* Services Mobile - NAPRAWIONE */
  .services-overview {
    padding: 6rem 0;
    background-attachment: scroll;
    width: 100%;
    margin: 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    margin: 0;
  }
  
  .service-card {
    padding: 2rem;
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }
  
  /* Case Studies Mobile - NAPRAWIONE */
  .case-studies {
    background-attachment: scroll;
    padding: 6rem 0;
    width: 100%;
    margin: 0;
  }
  
  .case-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
  }
  
  .case-card {
    width: 100%;
    margin: 0;
  }
  
  .case-image {
    height: 20rem;
    width: 100%;
  }
  
  .case-content {
    padding: 2rem;
    width: 100%;
  }
  
  .case-results {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .case-features {
    justify-content: flex-start;
    width: 100%;
  }
  
  /* Why Us Mobile - NAPRAWIONE */
  .why-us {
    padding: 6rem 0;
    width: 100%;
    margin: 0;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
  }
  
  .feature {
    padding: 2.5rem 2rem;
    width: 100%;
    margin: 0;
  }
  
  /* Contact Mobile - NAPRAWIONE */
  .contact {
    background-attachment: scroll;
    padding: 6rem 0;
    width: 100%;
    margin: 0;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
  }
  
  .contact-info,
  .contact-info2,
  .contact-form {
    padding: 2rem;
    width: 100%;
    margin: 0;
  }
  
  .contact-item {
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
  }
  
  .social-links {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }
  
  /* Calculator Mobile */
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .calculator-form {
    padding: 3rem;
  }
  
  .calculator-results {
    gap: 1.5rem;
  }
  
  .result-card {
    padding: 2rem;
  }
  
  /* FAQ Mobile */
  .faq-tabs {
    gap: 0.5rem;
  }
  
  .faq-tab {
    padding: 0.8rem 1.5rem;
    font-size: 1.4rem;
  }
  
  .faq-question {
    padding: 1.5rem;
  }
  
  .faq-question h3 {
    font-size: 1.6rem;
  }
  
  /* Audit Process Mobile */
  .audit-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .audit-content h2 {
    font-size: 2.8rem;
    text-align: center;
  }
  
  .stats-cards {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  /* Footer Mobile */
  .footer {
    padding: 4rem 0 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .footer-col h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-links a {
    margin: 0 1rem;
  }
}

/* Mobile Medium */
@media screen and (max-width: 576px) {
  html {
    font-size: 43.75%; /* 7px */
  }
  
  /* DODATKOWE NAPRAWKI DLA MAŁYCH TELEFONÓW */
  body {
    overflow-x: hidden !important;
    width: 100% !important;
  }
  
  .container {
    padding: 0 1rem;
    width: 100%;
    max-width: 100%;
  }
  
  /* Hero jeszcze mniejszy */
  .hero {
    height: 70vh;
    min-height: 450px;
    padding: 6.5rem 0 5rem 0;
    width: 100%;
  }
  
  .hero-content {
    padding: 0 1rem;
    width: 100%;
  }
  
  .hero h1 {
    font-size: 3.2rem;
  }
  
  .hero p {
    font-size: 1.6rem;
  }
  
  /* Wszystkie sekcje mniejsze */
  section {
    padding: 5rem 0;
    width: 100%;
  }
  
  .section-title {
    font-size: 2.4rem;
    margin-bottom: 3rem;
  }
  
  /* Karty jeszcze mniejsze */
  .service-card,
  .contact-form,
  .contact-info,
  .contact-info2,
  .calculator-form {
    padding: 1.5rem;
    width: 100%;
  }
  
  .case-content,
  .feature {
    padding: 2rem 1.5rem;
    width: 100%;
  }
  
  /* Formularze mniejsze */
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 1rem;
    font-size: 1.4rem;
    width: 100%;
  }
  
  /* Przyciski mniejsze */
  .btn {
    padding: 1rem 2rem;
    font-size: 1.4rem;
    width: auto;
    max-width: 100%;
  }
  
  /* FAQ mniejsze */
  .faq-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
  }
  
  .faq-tab {
    width: 100%;
    text-align: center;
    padding: 1rem;
  }
  
  .faq-question {
    padding: 1.2rem;
    width: 100%;
  }
  
  .faq-question h3 {
    font-size: 1.4rem;
  }
  
  /* Modal mniejszy */
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
    width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
  }
}

/* Mobile Extra Small */
@media screen and (max-width: 375px) {
  html {
    font-size: 40%; /* 6.4px */
  }
  
  /* NAJOSTRZEJSZE NAPRAWKI DLA BARDZO MAŁYCH TELEFONÓW */
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .container {
    padding: 0 0.8rem;
    width: 100%;
    max-width: 100%;
  }
  
  .hero {
    padding: 6rem 0 4rem 0;
    width: 100%;
  }
  
  .hero-content {
    padding: 0 0.8rem;
    width: 100%;
  }
  
  .hero h1 {
    font-size: 2.8rem;
    line-height: 1.1;
  }
  
  .hero p {
    font-size: 1.4rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  /* Wszystkie karty minimalne */
  .service-card,
  .contact-form,
  .contact-info,
  .contact-info2,
  .calculator-form,
  .case-content,
  .feature {
    padding: 1.2rem;
    width: 100%;
    margin: 0;
  }
  
  .case-image {
    height: 18rem;
    width: 100%;
  }
  
  .social-links {
    gap: 1rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .social-icon {
    width: 4rem;
    height: 4rem;
    font-size: 1.8rem;
  }
  
  .footer {
    padding: 3rem 0 1.5rem;
    width: 100%;
  }
  
  .footer-grid {
    gap: 2rem;
    width: 100%;
    grid-template-columns: 1fr;
  }
  
  /* Naprawia przyciski */
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
    width: auto;
    max-width: 100%;
  }
  
  /* Naprawia formularze */
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.8rem;
    font-size: 1.2rem;
    width: 100%;
  }
}

/* Landscape Orientation for Mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: 100vh;
    min-height: 400px;
  }
  
  .hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }
  
  section {
    padding: 4rem 0;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 4.4rem;
    padding: 1.2rem 2.4rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    min-height: 4.4rem;
    padding: 1.2rem;
  }
  
  .faq-question {
    min-height: 4.4rem;
  }
  
  .main-nav a {
    min-height: 4.4rem;
    display: flex;
    align-items: center;
  }
  
  .social-icon {
    min-width: 4.4rem;
    min-height: 4.4rem;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero,
  .services-overview,
  .case-studies,
  .contact {
    background-attachment: scroll;
  }
}

/* DODATKOWE NAPRAWKI OVERFLOW - BARDZO WAŻNE! */
@media screen and (max-width: 768px) {
  
  /* Naprawia długie teksty */
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  p, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Naprawia tabele jeśli są */
  table {
    width: 100%;
    table-layout: fixed;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }
  
  /* Naprawia iframe'y */
  iframe {
    max-width: 100%;
    width: 100%;
  }
  
  /* Naprawia pre i code */
  pre, code {
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
  }
  
  /* Naprawia bardzo długie linki */
  a {
    word-break: break-all;
    overflow-wrap: break-word;
  }
  
  /* Naprawia listy */
  ul, ol {
    padding-left: 2rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  li {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Naprawia flex elementy */
  .case-results,
  .contact-item,
  .social-links,
  .footer-bottom {
    flex-wrap: wrap;
    width: 100%;
  }
  
  /* Naprawia map jeśli jest */
  .map {
    width: 100%;
    height: 250px;
    overflow: hidden;
  }
  
  .map iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
}

/* EMERGENCY OVERFLOW FIX - ostateczna linia obrony */
@media screen and (max-width: 768px) {
  * {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  html {
    overflow-x: hidden !important;
  }
  
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
  }
  
  .container {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}