:root {
  --primary-color: #201847;
  --secondary-color: #ffc107;
  --accent-color: #ff69b4;
  --text-color: #ffffff;
  --background-light: #e6f0ff;
  --body-bg: #f7f7f7;
  --transition-speed: 0.3s;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Basic reset & global settings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--body-bg);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 70px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--secondary-color);
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Navbar gradient (optional) */
.navbar-gradient {
  background-color: #201847;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Increase the logo size but keep navbar height fixed */
.navbar-brand img {
  height: 90px;
  /* Larger than the default 70px */
  width: auto;
  /* Keep aspect ratio */
  margin-top: -10px;
  /* Pull the logo upwards */
  margin-bottom: -10px;
  /* Pull the logo downwards */
}


/* Full-screen sections */
.full-screen-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 20px;
}

/* Hero */
#hero {
  position: relative;
  background-color: var(--primary-color);
  color: var(--text-color);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures images cover the area without distortion */
  opacity: 0; /* Default to hidden */
  transition: opacity 1s ease-in-out; /* Smooth fade transition */
}

.hero-image.active {
  opacity: 1; /* Only the active image is visible */
}

.hero-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Adjust as needed */
  z-index: -1; /* Above images, below content */
}



#hero h1 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 20px;
}

#hero p {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 30px;
  color: var(--accent-color);
}

#hero .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  transform: translateY(-80px); /* Moves content down by 30px */
}




.btn {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  box-shadow: var(--shadow-sm);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn:hover {
  background-color: #ffb300;
  transform: translateY(-3px) rotate(-2deg);
  box-shadow: var(--shadow-md);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section backgrounds */
#services,
#success-stories,
#partners {
  background-color: #ffffff;
}

#services h2,
#why-poland h2,
#success-stories h2,
#visa-process h2,
#partners h2 {

  font-size: clamp(1.75rem, 5vw, 3.5rem);
}


#why-poland {
  background-color: #ffffff;
  position: relative;
}

#why-poland .start-journey-btn {
  margin-top: 40px;
  /* Adds spacing between cards and button */
}

#why-poland {
  position: relative;
  overflow: hidden;
}

/* Style for the map container as a background element */
.background-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* This ensures it stays behind other content */
  opacity: 0.15;
}

/* Optional: Ensure the SVG fills its container */
.background-map .map {
  width: 100%;
  height: 100%;
}

/* Service Grid, Why Grid, Team Grid */
.service-grid,
.why-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

/* Service Cards */
.service-card {
  background-color: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 3px solid var(--secondary-color);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.service-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.service-card h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.service-card p {
  font-size: 1.1rem;
  color: #555;
}

/* Why Cards */
.why-card {
  background-color: #fff;
  border: 2px solid #dc143c;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  padding: 20px;
  position: relative;
}

#why-poland .container {
  position: relative;
  z-index: 1;
}

.why-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #fff 50%, #dc143c 50%);
}

.why-card:hover {
  transform: translateY(-10px) rotateY(5deg);
  box-shadow: 0 16px 24px rgba(220, 20, 60, 0.4);
}

.why-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.why-card h3 {
  color: #dc143c;
}

/* Carousel (Success Stories) */
.carousel {
  position: relative;
  width: 100%;
  height: 400px;
  perspective: 1500px;
  margin-top: 50px;
}

.carousel .story-card {
  position: absolute;
  width: 250px;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease, opacity 0.5s ease;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.carousel .story-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
  filter: brightness(90%) contrast(110%);
  transition: filter 0.3s ease;
}

.carousel .story-card:hover img {
  filter: brightness(100%) contrast(100%);
}

.carousel .far-left {
  transform: translate(-250%, -50%) scale(0.7) rotateY(45deg);
  opacity: 0.5;
  z-index: 1;
}

.carousel .left {
  transform: translate(-150%, -50%) scale(0.85) rotateY(25deg);
  opacity: 0.7;
  z-index: 2;
}

.carousel .center {
  transform: translate(-50%, -50%) scale(1) rotateY(0deg);
  opacity: 1;
  z-index: 3;
}

.carousel .right {
  transform: translate(50%, -50%) scale(0.85) rotateY(-25deg);
  opacity: 0.7;
  z-index: 2;
}

.carousel .far-right {
  transform: translate(150%, -50%) scale(0.7) rotateY(-45deg);
  opacity: 0.5;
  z-index: 1;
}

.carousel .story-card:hover {
  box-shadow: var(--shadow-md);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: var(--text-color);
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  z-index: 5;
  border-radius: 50%;
}

.carousel-arrow.left-arrow {
  left: 10px;
}

.carousel-arrow.right-arrow {
  right: 10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.carousel-dots span {
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dots span.active {
  background: var(--secondary-color);
}

/* Visa Process */
#visa-process {
  position: relative;
  background: linear-gradient(135deg, #e0f7fa 0%, #80deea 100%);
  overflow: hidden;
}

#visa-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#visa-process .container {
  position: relative;
  z-index: 1;
}

.visa-timeline {
  position: relative;
  max-width: 800px;
  margin: 30px auto;
  padding: 20px 0;
}

.visa-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: var(--secondary-color);
  transform: translateX(-50%);
  z-index: -1;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px;
  margin-bottom: 20px;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.timeline-item:hover .timeline-content {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.step-number {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  transition: background-color var(--transition-speed);
}

.timeline-item:nth-child(odd) .step-number {
  right: -60px;
  transform: translateY(-50%);
}

.timeline-item:nth-child(even) .step-number {
  left: -60px;
  transform: translateY(-50%);
}

.timeline-item:hover .step-number {
  background: #ffb300;
}

.timeline-content h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.timeline-item:nth-child(odd) h3 {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.timeline-content p {
  color: #666;
}

.visa-cta:hover {
  background-color: #001f3f;
  color: white;
}

.visa-cta i {
  margin-right: 8px;
}

/* Partners */
.team-card {
  position: relative;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.team-card:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: var(--shadow-md);
}

.team-image img {
  width: 100%;
  height: auto;
  filter: brightness(90%) contrast(110%);
  transition: filter 0.3s ease;
}

.team-card:hover img {
  filter: brightness(100%) contrast(100%);
}

.team-card h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 15px 0 5px;
}

.team-card p {
  color: #555;
  margin-bottom: 15px;
}

.team-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  text-align: center;
  transition: bottom 0.5s ease;
  font-family: "Merriweather", serif;
}

.team-card:hover .team-overlay {
  bottom: 0;
}

/* Contact */
.contact-enhanced-section {
  padding: 80px 20px;
  position: relative;
}

.sticky-sidebar {
  position: sticky;
  top: 80px;
  width: 200px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.sticky-sidebar h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.sticky-sidebar a {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
  text-decoration: none;
}

.sticky-sidebar a:hover {
  color: var(--secondary-color);
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.contact-info {
  flex: 1 1 400px;
  max-width: 600px;
}

.contact-info iframe {
  margin-top: 20px;
  border-radius: 10px;
}

.contact-details i {
  margin-right: 10px;
  color: var(--primary-color);
}

.contact-form {
  flex: 1 1 400px;
  max-width: 600px;
  background-color: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 15px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.contact-form button:hover {
  background-color: #ffb300;
  transform: translateY(-2px) rotate(-2deg);
}

.contact-form .form-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 15px 0;
}

.contact-form .form-terms input[type="checkbox"] {
  margin-top: 4px;
}

.contact-form .form-terms label {
  font-size: 0.9rem;
  color: #555;
}

.contact-form .terms-agreement {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

.contact-form .terms-agreement a {
  color: var(--primary-color);
  text-decoration: underline;
}

.contact-form .terms-agreement a:hover {
  color: var(--secondary-color);
}

/* Footer */
.footer-enhanced {
  background-color: var(--primary-color);
  color: var(--text-color);
  padding: 40px 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-logo img {
  height: 120px;
  width: auto;
}

.footer-info {
  color: var(--text-color);
}

.footer-links a,
.footer-social a {
  color: var(--text-color);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color var(--transition-speed);
}

.footer-social a:hover,
.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
}

/* Back-to-Top */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--secondary-color);
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  font-size: 1.5rem;
  color: var(--primary-color);
}

#back-to-top.show {
  display: block;
}

/* Responsive rules (mobile/tablet) */
@media (max-width: 768px) {
  .carousel .story-card:not(.center) {
    display: none;
  }

  .carousel .story-card.center {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .sticky-sidebar {
    display: none;
  }

  .contact-container {
    flex-direction: column;
    align-items: center;
  }

  .visa-timeline::before {
    left: 2%;
  }

  .timeline-item {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: left !important;
  }

  .timeline-item:nth-child(even),
  .timeline-item:nth-child(odd) {
    left: 0 !important;
  }

  .step-number {
    left: auto !important;
    right: auto !important;
    top: -50px;
    margin: 0 auto;
  }
}

/* Extra small (below 480px) */
@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.8rem;
  }

  #hero p {
    font-size: 1rem;
  }

  .service-card h3 {
    font-size: 1.2rem;
  }
}