* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #102033;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 64px; /* Space for the fixed header */
}

.site-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
}

.taskbar {
  background: #0f2f4f;
  color: white;
  min-height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.logo {
  color: white;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.home-page {
  background:
    linear-gradient(rgba(245, 250, 255, 0.9), rgba(225, 240, 255, 0.95)),
    #e6f3ff;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}

.hero-content {
  max-width: 1100px;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 20px;
  color: #0f2f4f;
}

.hero-content > p {
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  text-decoration: none;
  color: #102033;
  padding: 32px;
  border-radius: 24px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(15, 47, 79, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(15, 47, 79, 0.25);
}

.card h2 {
  margin-bottom: 14px;
  font-size: 1.8rem;
}

.card p {
  line-height: 1.6;
}

.card-tutor {
  background: #fff3cd;
}

.card-it {
  background: #247db6;
  color: white;
}

.card-it h2 {
  color: #f9c835;
}

.card-elmeri {
  background: #6fb6ee;
}

.subpage {
  background: #eaf6ff;
}

.tutor-theme {
  background:
    linear-gradient(rgba(255, 253, 232, 0.92), rgba(255, 243, 205, 0.95)),
    #fff3cd;
}

.it-theme {
  background: #247db6;
  color: white;
}

.it-theme .site-header .taskbar {
  border-bottom: 4px solid #f9c835;
}

.it-theme .content-box {
  background: rgba(15, 47, 79, 0.85); /* Increased opacity for readability */
  backdrop-filter: blur(8px);
  border: 2px solid rgba(249, 200, 53, 0.3);
  color: white;
  margin-top: 60vh; /* Moved upwards from 70vh */
  margin-bottom: 100px;
  max-width: 780px;
  padding: 48px;
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(15, 47, 79, 0.22);
}

.it-theme .button {
  background: #f9c835;
  color: #0f2f4f;
}

.it-theme .button:hover {
  background: #e5b72e;
}

.it-theme .price-card {
  background: rgba(249, 200, 53, 0.90); /* Significantly increased opacity for readability */
  border: 2px solid #0f2f4f;
}

.it-theme .price-card h3 {
  background: #f9c835;
  color: #0f2f4f; /* Blue color matching the prices */
  font-weight: 800;
  border-color: #0f2f4f;
}

.it-theme .price {
  color: #0f2f4f; /* Darker color for price */
  font-weight: bold;
}

.it-theme .pricing-info {
  color: #f9c835; /* Improved contrast: yellow text on dark blue background */
  border-top: 1px solid rgba(249, 200, 53, 0.3);
}

.it-theme .modal-content {
  background-color: #0f2f4f;
  color: white;
  border: 3px solid #f9c835;
}

.it-theme .modal-content h2 {
  color: #f9c835; /* Yellow for contrast on dark blue background */
}

.it-theme .close-button {
  color: #f9c835;
}

.it-theme .contact-form label {
  color: #f9c835;
}

.it-theme .contact-form input,
.it-theme .contact-form textarea {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(249, 200, 53, 0.5);
  color: white;
}

.elmeri-theme {
  background:
    linear-gradient(rgba(205, 231, 250, 0.92), rgba(111, 182, 238, 0.95)),
    #6fb6ee;
}

.page-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  gap: 24px;
}

.layout-with-sidebar {
  display: flex;
  width: 100%;
  max-width: 1100px;
  gap: 32px;
  align-items: flex-start;
}

.sidebar {
  width: 250px;
  background: rgba(255, 255, 255, 0.86);
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(15, 47, 79, 0.1);
}

.sidebar h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  color: #0f2f4f;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li a {
  text-decoration: none;
  color: #0f2f4f;
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.sidebar ul li a:hover {
  background: rgba(15, 47, 79, 0.05);
}

.it-theme .page-content {
  align-items: flex-start;
  padding-top: 20px; /* Even higher */
}

.it-page-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  position: relative;
  margin-bottom: 50vh; /* Better way to ensure scrolling past */
}

.fixed-ad-container {
  position: absolute; /* Changed to absolute to allow scrolling through the image */
  top: -20px; /* Match the new padding-top of .page-content */
  left: 0;
  width: 100%;
  height: 200vh; /* Increased height to include more of the photo */
  z-index: -1;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Align to top to keep the yellow rectangle alignment */
  overflow: hidden;
}

.fixed-ad-container .ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 0%;
  transform: scale(0.7); /* Increased scale slightly from 0.85 to 0.9 to show more detail/size */
  transform-origin: center top; /* Ensure scaling keeps the top alignment */
  opacity: 1; /* Slightly increased opacity */
  border-radius: 0;
  box-shadow: none;
}

.content-box {
  background: rgba(255, 255, 255, 0.86);
  max-width: 780px;
  padding: 48px;
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(15, 47, 79, 0.22);
}

.it-theme .content-box h1{
  color: #f9c835;
}

.it-theme .content-box h2,
.it-theme .content-box h3 {
  color: #0f2f4f;
}

.content-box h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: #0f2f4f;
  margin-bottom: 20px;
}

.content-box p {
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 20px;
}

.button {
  display: inline-block;
  margin-top: 12px;
  background: #0f2f4f;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: bold;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: #164a78;
  transform: translateY(-2px);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0;
  width: 100%;
}

.price-card {
  position: relative; /* For absolute positioning of product name */
  background: white;
  padding: 40px 24px 24px; /* Increased top padding to accommodate name */
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.price-card:hover {
  transform: translateY(-4px);
  border-color: #0f2f4f;
}

.price-card h3 {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 8px 16px;
  border: 2px solid #0f2f4f;
  border-radius: 12px;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  white-space: nowrap;
  margin-bottom: 0;
  color: #0f2f4f;
}

.price-card .price {
  font-size: 1.8rem;
  font-weight: bold;
  color: #164a78;
}

.pricing-info {
  font-style: italic;
  font-size: 0.95rem;
  color: #555;
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #ddd;
}

/* Product Modal Styles */
.product-modal-content {
  max-width: 800px;
  width: 95%;
  border: 8px solid rgba(15, 47, 79, 0.15); /* Low opacity on borders */
  padding: 50px;
}

.product-modal-content h2 {
  color: #0f2f4f;
  margin-bottom: 20px;
  font-size: 2rem;
}

.product-modal-content p {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.product-modal-content ul {
  margin: 20px 0 25px 25px;
  font-size: 1.1rem;
  line-height: 1.8;
}

.product-modal-content li {
  margin-bottom: 10px;
}

.site-footer {
  text-align: center;
  padding: 20px;
  background: #0f2f4f;
  color: white;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 40px;
  border-radius: 28px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
}

.close-button {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  color: #0f2f4f;
}

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

.contact-form label {
  font-weight: bold;
  color: #0f2f4f;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

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

.contact-form .button {
  margin-top: 10px;
  border: none;
  cursor: pointer;
  width: 100%;
}

.contact-btn-container {
  margin-top: 20px;
}

/* Responsive layout */
@media (max-width: 800px) {
  .taskbar {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .content-box {
    padding: 32px 24px;
  }

  .layout-with-sidebar {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    max-width: 780px;
  }
}
