/* ========================================
   iOS SAFARI FIXES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-overflow-scrolling: touch;
}

html {
  height: 100%;
  height: -webkit-fill-available;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f0f7ff;
  color: #0f172a;
  opacity: 0;
  animation: fadeIn 0.8s ease-in forwards;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* NAVBAR */
.navbar {
  background: #3b82f6;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  width: 100%;
  position: relative;
  z-index: 1000;  /* ← To zapewnia, że navbar jest nad contentem */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.navbar-brand img {
  width: 160px;
  height: 80px;
  object-fit: contain;
}

.navbar-menu {
  display: flex;
  gap: 8px;
  align-items: center;
  list-style: none;
}

.navbar-social {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.navbar-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: 6px;
  transition: all 0.2s;
}

.navbar-social a:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.navbar-link {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}

.navbar-link:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.navbar-link.active {
  background: rgba(255,255,255,0.2);
  color: white;
}

.navbar-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 8px;
  min-width: 220px;
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

.navbar-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  color: #0f172a;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  background: #e0f2fe;
  color: #3b82f6;
}

/* CONTENT */
.content {
  max-width: 1280px;
  margin: 40px auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin: 60px 0 30px 0;
}

.section-header h2 {
  font-size: 32px;
  color: #0f172a;
  margin-bottom: 10px;
  font-weight: 700;
}

.btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

.section-separator {
  height: 1px;
  background: #cbd5e1;
  margin: 60px 0;
}

/* HERO */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: start;
}

.hero-left, .hero-right {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.hero-left {
  animation: slideInLeft 0.6s ease-out 0.2s backwards;
  -webkit-animation: slideInLeft 0.6s ease-out 0.2s backwards;
}

.hero-right {
  animation: slideInRight 0.6s ease-out 0.4s backwards;
  -webkit-animation: slideInRight 0.6s ease-out 0.4s backwards;
}

.hero-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  max-height: 300px;
  object-fit: cover;
}

.hero-left h1 {
  font-size: 32px;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.lead {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-right h2 {
  font-size: 22px;
  color: #0f172a;
  margin: 20px 0 8px 0;
  font-weight: 700;
}

/* FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.feature-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #f0f7ff;
  border-radius: 8px;
  align-items: start;
  opacity: 0;
  animation: slideUp 0.5s ease-out forwards;
  -webkit-animation: slideUp 0.5s ease-out forwards;
}

.feature-card:nth-child(1) {
  animation-delay: 0.5s;
  -webkit-animation-delay: 0.5s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.6s;
  -webkit-animation-delay: 0.6s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.7s;
  -webkit-animation-delay: 0.7s;
}

.feature-card:nth-child(4) {
  animation-delay: 0.8s;
  -webkit-animation-delay: 0.8s;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: #e0f2fe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: #3b82f6;
}

.feature-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.how-it-works {
  margin-top: 24px;
  padding: 16px 24px;
  background: #f0f7ff;
  border-radius: 8px;
  color: #64748b;
  opacity: 0;
  animation: slideUp 0.5s ease-out 0.9s forwards;
  -webkit-animation: slideUp 0.5s ease-out 0.9s forwards;
}

.how-it-works strong {
  color: #0f172a;
  display: block;
  margin-bottom: 8px;
}

.how-it-works ol {
  padding-left: 20px;
  margin-left: 0;
}

.how-it-works li {
  margin-bottom: 8px;
}

/* GALLERY */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  opacity: 0;
  animation: slideUp 0.5s ease-out forwards;
  -webkit-animation: slideUp 0.5s ease-out forwards;
}

.gallery-item:nth-child(1) {
  animation-delay: 0.2s;
  -webkit-animation-delay: 0.2s;
}

.gallery-item:nth-child(2) {
  animation-delay: 0.3s;
  -webkit-animation-delay: 0.3s;
}

.gallery-item:nth-child(3) {
  animation-delay: 0.4s;
  -webkit-animation-delay: 0.4s;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
}

.gallery-button-container {
  text-align: center;
  margin: 30px 0 60px 0;
}

/* BENEFITS */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.benefit-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 5px solid #3b82f6;
  opacity: 0;
  animation: slideUp 0.5s ease-out forwards;
  -webkit-animation: slideUp 0.5s ease-out forwards;
}

.benefit-card:nth-child(1) {
  animation-delay: 0.2s;
  -webkit-animation-delay: 0.2s;
}

.benefit-card:nth-child(2) {
  animation-delay: 0.3s;
  -webkit-animation-delay: 0.3s;
}

.benefit-card:nth-child(3) {
  animation-delay: 0.4s;
  -webkit-animation-delay: 0.4s;
}

.benefit-card:nth-child(4) {
  animation-delay: 0.5s;
  -webkit-animation-delay: 0.5s;
}

.benefit-card h3 {
  font-size: 20px;
  color: #3b82f6;
  margin-bottom: 10px;
  font-weight: 700;
}

.benefit-card p {
  font-size: 15px;
  color: #64748b;
  line-height: 1.5;
}

/* FORM */
.form-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
  background: #ffffff;
  color: #0f172a;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  font-size: 16px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.btn-submit:hover {
  opacity: 0.9;
}

.contact-info {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #cbd5e1;
  font-size: 14px;
  color: #64748b;
  text-align: center;
}

.contact-info strong {
  color: #0f172a;
}

/* FOOTER */
.footer {
  margin-top: 60px;
  padding: 40px 24px;
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
  color: #64748b;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-social {
  margin-bottom: 20px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #1877f2;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: opacity 0.2s;
}

.social-link:hover {
  opacity: 0.9;
}

.footer-links a {
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #3b82f6;
}

.footer-info {
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

/* GALLERY PAGE SPECIFIC STYLES */

.page-header {
  background: #ffffff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 32px;
  opacity: 0;
  animation: slideUp 0.6s ease-out 0.2s forwards;
  -webkit-animation: slideUp 0.6s ease-out 0.2s forwards;
}

.page-header h1 {
  font-size: 36px;
  color: #0f172a;
  margin-bottom: 12px;
  font-weight: 800;
}

.page-header p {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
}

/* GALLERY */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery .gallery-item {
  display: block;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  opacity: 0;
  animation: slideUp 0.5s ease-out forwards;
  -webkit-animation: slideUp 0.5s ease-out forwards;
}

.gallery .gallery-item:nth-child(1) {
  animation-delay: 0.3s;
  -webkit-animation-delay: 0.3s;
}

.gallery .gallery-item:nth-child(2) {
  animation-delay: 0.4s;
  -webkit-animation-delay: 0.4s;
}

.gallery .gallery-item:nth-child(3) {
  animation-delay: 0.5s;
  -webkit-animation-delay: 0.5s;
}

.gallery .gallery-item:nth-child(4) {
  animation-delay: 0.6s;
  -webkit-animation-delay: 0.6s;
}

.gallery .gallery-item:nth-child(5) {
  animation-delay: 0.7s;
  -webkit-animation-delay: 0.7s;
}

.gallery .gallery-item:nth-child(6) {
  animation-delay: 0.8s;
  -webkit-animation-delay: 0.8s;
}

.gallery .gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.15);
}

.gallery .gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.caption {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  background: white;
  border-top: 1px solid #e2e8f0;
}

/* CTA SECTION */
.cta-section {
  margin-top: 48px;
  padding: 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
  opacity: 0;
  animation: slideUp 0.6s ease-out 0.9s forwards;
  -webkit-animation: slideUp 0.6s ease-out 0.9s forwards;
}

.cta-section p {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 20px;
}

.cta-button {
  display: inline-block;
  padding: 14px 28px;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: opacity 0.2s;
}

.cta-button:hover {
  opacity: 0.9;
}

/* PROGRAM PAGES SPECIFIC STYLES */

.info-box {
  background: #fff7ed;
  border-left: 4px solid #f59e0b;
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
  opacity: 0;
  animation: slideUp 0.5s ease-out 0.4s forwards;
  -webkit-animation: slideUp 0.5s ease-out 0.4s forwards;
}

.info-box strong {
  color: #92400e;
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.content-section {
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 24px;
  opacity: 0;
  animation: slideUp 0.6s ease-out 0.3s forwards;
  -webkit-animation: slideUp 0.6s ease-out 0.3s forwards;
}

.content-section h2 {
  font-size: 24px;
  color: #3b82f6;
  margin-bottom: 16px;
  font-weight: 700;
}

.content-section h3 {
  font-size: 20px;
  color: #0f172a;
  margin: 20px 0 12px 0;
  font-weight: 700;
}

.content-section p {
  font-size: 15px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 12px;
}

.content-section ul {
  margin: 12px 0 12px 20px;
  color: #64748b;
}

.content-section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .navbar-container {
    padding: 0 16px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* NAVBAR MOBILE */
  .navbar {
    position: relative;
    width: 100%;
  }
  
  .navbar-container {
    height: auto;
    min-height: 70px;
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
  }
  
  .navbar-brand {
    width: 100%;
    justify-content: center;
  }
  
  .navbar-brand img {
    width: 140px;
    height: 60px;
  }
  
  .navbar-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    width: 100%;
  }
  
  .navbar-link {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .navbar-social {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
  }
  
  .dropdown-menu {
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    right: auto;
    min-width: 200px;
  }
  
  /* CONTENT MOBILE */
  .content {
    margin: 20px auto;
    padding: 0 16px;
  }
  
  /* iOS Safari viewport fix */
  body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
  
  /* HERO MOBILE */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .hero-left, .hero-right {
    padding: 20px;
  }
  
  .hero-left h1 {
    font-size: 24px;
    line-height: 1.3;
  }
  
  .hero-right h2 {
    font-size: 20px;
    margin: 0 0 8px 0;
  }
  
  .lead {
    font-size: 15px;
  }
  
  .hero-image {
    max-height: 200px;
  }
  
  /* FEATURES MOBILE */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .feature-card {
    padding: 14px;
  }
  
  .feature-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .feature-title {
    font-size: 15px;
  }
  
  .feature-desc {
    font-size: 13px;
  }
  
  /* HOW IT WORKS MOBILE */
  .how-it-works {
    padding: 14px 16px;
    margin-top: 16px;
  }
  
  /* SECTION HEADERS MOBILE */
  .section-header {
    margin: 40px 0 20px 0;
  }
  
  .section-header h2 {
    font-size: 24px;
  }
  
  .section-separator {
    margin: 40px 0;
  }
  
  /* GALLERY MOBILE */
  .gallery-preview {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .gallery-item img {
    height: 180px;
  }
  
  .gallery-button-container {
    margin: 20px 0 40px 0;
  }
  
  /* BENEFITS MOBILE */
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .benefit-card {
    padding: 20px;
  }
  
  .benefit-card h3 {
    font-size: 18px;
  }
  
  .benefit-card p {
    font-size: 14px;
  }
  
  /* BUTTONS MOBILE */
  .btn-primary {
    padding: 12px 24px;
    font-size: 15px;
  }
  
  .btn-submit {
    padding: 12px;
    font-size: 16px;
  }
  
  /* FORM MOBILE - CRITICAL iOS FIX */
  .form-group input,
  .form-group textarea {
    font-size: 16px !important;
    padding: 10px;
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    font-size: 16px !important;
  }
  
  /* FOOTER MOBILE */
  .footer {
    padding: 30px 16px;
    margin-top: 40px;
  }
  
  .footer-info {
    font-size: 13px;
  }
  
  /* PAGE HEADER MOBILE */
  .page-header {
    padding: 24px 20px;
    margin-bottom: 24px;
  }

  .page-header h1 {
    font-size: 26px;
  }
  
  .page-header p {
    font-size: 15px;
  }

  /* GALLERY PAGE MOBILE */
  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .gallery .gallery-item img {
    height: 200px;
  }

  /* CTA SECTION MOBILE */
  .cta-section {
    padding: 24px 20px;
    margin-top: 32px;
  }

  .cta-section p {
    font-size: 16px;
  }

  /* CONTENT SECTION MOBILE */
  .content-section {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  .content-section h2 {
    font-size: 20px;
  }
  
  .content-section h3 {
    font-size: 18px;
  }
  
  .content-section p {
    font-size: 14px;
  }
  
  /* INFO BOX MOBILE */
  .info-box {
    padding: 16px;
    margin: 16px 0;
  }
  
  .info-box strong {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .navbar-container {
    padding: 10px 12px;
  }
  
  .navbar-brand img {
    width: 120px;
    height: 50px;
  }
  
  .navbar-link {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .content {
    padding: 0 12px;
  }
  
  .hero-left, .hero-right {
    padding: 16px;
  }
  
  .hero-left h1 {
    font-size: 22px;
  }
  
  .section-header h2 {
    font-size: 22px;
  }
  
  .btn-primary,
  .btn-submit {
    font-size: 15px;
    padding: 10px 20px;
  }
  
  /* Ensure 16px minimum on smallest screens */
  .form-group input,
  .form-group textarea {
    font-size: 16px !important;
  }
}