:root {
  --primary-color: #2ab3af; --primary-light: #e6f7f7; --secondary-color: #289e9a;
  --dark-color: #1e1e2d; --text-color: #3a3a3a; --muted-color: #6c757d;
  --light-gray-bg: #f5f7fb; --border-color: rgba(0, 0, 0, 0.08);
  --border-radius: 8px; --shadow-sm: 0 3px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
  --font-family: 'Montserrat', sans-serif;
  --header-height: 65px; /* Consistent header height */
}

/* --- Global Reset & Typography --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-family); background-color: #ffffff; /* Lighter background */
  color: var(--text-color); line-height: 1.7; /* Increased line height */
  margin: 0; display: flex; flex-direction: column;
  min-height: 100vh; /* Ensure footer stays down */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { font-weight: 600; color: var(--dark-color); margin-bottom: 0.75rem; line-height: 1.3; }
h1 { font-size: 2.5rem; letter-spacing: -0.5px;}
h2 { font-size: 1.8rem; margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1rem; color: var(--text-color); }
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--secondary-color); }

/* --- Header --- */
.page-header {
  position: sticky; top: 0; z-index: 1000; width: 100%;
  background-color: #fff; /* White header */
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 3rem; /* Adjust padding */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); /* Lighter shadow */
  flex-shrink: 0; height: var(--header-height); border-bottom: 1px solid var(--border-color);
}
.header-logo { font-weight: 700; font-size: 1.6rem; color: var(--primary-color); }
.header-logo img {
  display: inline-block;
  vertical-align: middle;
  height: 40px; /* Base height */
  width: auto;
}
.header-nav ul { list-style: none; display: flex; gap: 2rem; margin-bottom: 0;}
.header-nav a { color: var(--text-color); font-weight: 500; font-size: 0.95rem; transition: color 0.3s ease, border-color 0.3s ease; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.header-nav a:hover, .header-nav a.cta-link:hover { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.header-nav a.cta-link { color: var(--primary-color); font-weight: 600; }
.page-header .login {background-color: teal; color: white; padding: 5px;}
.page-header .login:hover {background-color: teal; color: white; padding: 5px;}
/* --- Hero Section --- */
.hero-section {
  background-image: url("../images/hero-background.jpg"); /* Ensure path is correct */
  background-color: #333; /* Fallback background */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 100px 20px;
  text-align: center;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-section h1 {
  color: #fff;
  font-size: 2.8rem; /* Larger headline */
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero-section p {
  color: #d0d0d0; /* Lighter paragraph text */
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-section .cta-button { /* Apply to all buttons in hero */
  margin: 0.5rem 0.5rem; /* Add vertical margin too */
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius); /* Use theme radius */
  /* Define base style for buttons if needed, e.g., using a .btn class */
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out;
}
.hero-section .btn-primary { /* Specific style for primary */
   background-color: var(--primary-color);
   border-color: var(--primary-color);
   color: white;
}
.hero-section .btn-primary:hover {
   background-color: var(--secondary-color);
   border-color: var(--secondary-color);
}
.hero-section .btn-outline-light { /* Specific style for outline */
   border-width: 2px;
   border-color: #fff;
   color: #fff;
   background-color: transparent;
}
.hero-section .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* --- Main Container --- */
.main-container {
  width: 95%; max-width: 1600px; margin: 2rem auto; /* Consistent margin */
  display: flex; flex-wrap: nowrap; gap: 2.5rem; /* Increased gap */
  flex-grow: 1; overflow: hidden; min-height: 0; /* Important for flex children */
}

/* --- Left Column (Pricing & Blog) --- */
.left-column {
  flex: 6; /* Give more space to content */
  min-width: 0; display: flex; flex-direction: column; gap: 2.5rem;
  /* Remove overflow and scrollbar styling, let main container handle scroll when stacked */
  /* overflow-y: visible; */
  height: auto;
  /* padding-right: 1rem; */
}
/* Remove scrollbar styles for left column */
/* .left-column::-webkit-scrollbar { ... } */

section { padding: 2rem 0; } /* Add vertical padding to sections */

/* --- Pricing Section --- */
.pricing-section { background-color: transparent; padding: 0; box-shadow: none; border: none; }
.pricing-section h2 { text-align: left; margin-bottom: 0.5rem; }
.section-subtitle { text-align: left; color: var(--muted-color); margin-bottom: 2rem; font-size: 1rem; }
.pricing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
.pricing-card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1.75rem 1.5rem; text-align: center; transition: all 0.3s ease; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--primary-color); }
.pricing-card.popular { border-color: var(--primary-color); border-width: 2px; }
.pricing-card .badge { position: absolute; top: 0; right: 0; background-color: var(--primary-color); color: white; font-size: 0.7rem; padding: 0.2rem 0.8rem; border-bottom-left-radius: var(--border-radius); font-weight: 600; }
.pricing-card .icon { font-size: 2.2rem; margin-bottom: 1rem; color: var(--primary-color); }
.pricing-card h3 { margin-bottom: 0.5rem; font-size: 1.15rem; font-weight: 600; }
.pricing-card .price { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.25rem; color: var(--primary-color); }
.pricing-card .features { list-style: none; text-align: left; padding: 0; font-size: 0.875rem; line-height: 1.7; color: var(--text-color); margin-top: auto; flex-grow: 1; }
.pricing-card .features li { position: relative; padding-left: 1.75rem; margin-bottom: 0.6rem; }
.pricing-card .features li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary-color); position: absolute; left: 0; top: 3px; font-size: 0.85rem; }
/* Base button styles (if using .btn class) */
.btn { display: inline-block; font-weight: 500; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; border: 1px solid transparent; padding: 0.6rem 1.2rem; font-size: 0.9rem; line-height: 1.5; border-radius: 6px; transition: all 0.15s ease-in-out; cursor: pointer; }
.btn-primary { color: #fff; background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background-color: var(--secondary-color); border-color: var(--secondary-color); }
.pricing-section .cta-button { /* Example if pricing button needs different size */ font-size: 1rem; padding: 0.8rem 1.8rem; margin-top: 1.5rem;}


/* --- Blog Section --- */
.blog-section { background-color: transparent; padding: 0; box-shadow: none; border: none; }
.blog-section h2 { text-align: left; margin-bottom: 1.5rem; font-size: 1.5rem; }
#blog-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.blog-card { background-color: #fff; border: 1px solid var(--border-color); border-radius: var(--border-radius); overflow: hidden; display: flex; flex-direction: column; transition: var(--transition); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; cursor: pointer; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-card-img { width: 100%; height: 160px; object-fit: cover; border-bottom: 1px solid var(--border-color); }
.blog-card-content { padding: 1rem 1.25rem; flex-grow: 1; display: flex; flex-direction: column; }
.blog-card-content h3 { font-size: 1rem; margin-bottom: 0.5rem; line-height: 1.3; }
.blog-card-content .blog-author { font-size: 0.8rem; margin-bottom: 0.75rem; color: var(--primary-color); font-weight: 500; }
.blog-card-content .blog-excerpt { font-size: 0.875rem; color: var(--text-color); line-height: 1.5; flex-grow: 1; margin-bottom: 0; }
.view-all-link { margin-top: 1.5rem; text-align: center; } /* Adjusted margin */
.view-all-link .btn { font-size: 0.85rem; padding: 0.4rem 1rem; border: 1px solid var(--border-color); color: var(--muted-color); background: transparent; }
.view-all-link .btn:hover { background-color: var(--primary-light); color: var(--primary-color); border-color: var(--primary-light); }


/* --- Right Column (Registration Toggle) --- */
.right-column {
  flex: 2; /* Slightly narrower */
  min-width: 300px; max-width: 420px; /* Adjusted widths */
  /* overflow-y: visible; // Removed - not needed */
  height: fit-content; /* Allow height adjustment */
  position: sticky; /* Make it sticky */
  top: calc(var(--header-height) + 2rem); /* Sticky below header + margin */
  align-self: flex-start; /* Prevent stretching */
  /* Remove scrollbar styles - not needed if content fits */
}
/* Remove scrollbar styles for right column */
/* .right-column::-webkit-scrollbar { ... } */

/* No need for placeholder logic or visibility toggle */
.register-container { /* Actual form container */
  padding: 1.75rem; background-color: #fff; border-radius: var(--border-radius);
  border: 1px solid var(--border-color); box-shadow: var(--shadow-md);
  /* Removed height/flex - let content determine size */
}
/* Remove close button if not needed */
/* .close-register-btn { ... } */

.register-container h2 { margin-bottom: 1.5rem; font-size: 1.5rem; text-align: center; }
.register-container form .form-group { margin-bottom: 1rem; }
.register-container form label { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; font-weight: 500; }
.register-container form input[type="text"], .register-container form input[type="email"], .register-container form input[type="password"], .register-container form select { width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.9rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.register-container form input:focus, .register-container form select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); outline: none; }
#amountDue[readonly] { background-color: #e9ecef; cursor: not-allowed; }
.form-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.form-row .form-group { flex: 1 1 calc(50% - 0.5rem); min-width: 120px; }
.payment-section { background-color: var(--light-gray-bg); padding: 1rem; border-radius: 6px; margin: 1.25rem 0; border: 1px solid var(--border-color); }
.payment-section h3 { margin-bottom: 1rem; font-size: 1.05rem; text-align: left;}
#card-element { padding: 10px; border: 1px solid var(--border-color); border-radius: 6px; background-color: #fff; }
#registerSubmit { width: 100%; padding: 0.75rem; background-color: var(--primary-color); border: none; color: #fff; font-size: 1rem; font-weight: 600; border-radius: 6px; cursor: pointer; margin-top: 1.5rem; transition: background-color 0.3s ease, transform 0.1s ease; }
#registerSubmit:hover { background-color: var(--secondary-color); }
#registerSubmit:active { transform: scale(0.98); }
.login-link { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted-color); padding-bottom: 0; /* Remove extra padding */ }
.login-link a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.login-link a:hover { text-decoration: underline; color: var(--secondary-color); }


/* --- Footer --- */
.page-footer {
  flex-shrink: 0; /* Prevent footer from shrinking */
  text-align: center;
  padding: 1.5rem;
  margin-top: auto; /* Pushes footer down */
  background-color: var(--light-gray-bg);
  border-top: 1px solid var(--border-color);
  color: var(--muted-color);
  font-size: 0.85rem;
}

/* --- Success Modal (Unchanged) --- */
.modal { position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center;} /* Centering */
.modal-content { background-color: #fff; margin: auto; padding: 2rem 2.5rem; border-radius: var(--border-radius); width: 90%; max-width: 450px; text-align: center; box-shadow: var(--shadow-md); position: relative; }
.close-btn { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; cursor: pointer; color: var(--muted-color); line-height: 1; padding: 5px; }
.close-btn:hover { color: var(--dark-color); }
.modal-content h3 { color: var(--success-color); margin-bottom: 1rem; font-size: 1.3rem; }
.modal-content h3 i { margin-right: 0.5rem; }
.modal-content p { font-size: 0.95rem; margin-bottom: 0; }


/* =====================================================
   Responsive Design
   ===================================================== */

/* --- Large Laptops / Small Desktops --- */
@media (max-width: 1200px) {
  .main-container {
    flex-direction: column; /* Stack columns */
    align-items: center; /* Center content horizontally */
    overflow-y: auto; /* Allow main container scroll */
    height: auto;
    gap: 2rem; /* Adjust gap */
  }
  .left-column, .right-column {
    width: 100%;
    max-width: 900px; /* Limit width of stacked columns */
  }
  .right-column {
    position: static; /* Reset sticky */
    height: auto;
    overflow-y: visible;
    margin-top: 0; /* Remove top margin when stacked */
    max-width: 700px; /* Limit form width */
  }
  .pricing-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  /* Removed rules related to #registerFormContainer visibility */
}

/* --- Tablets --- */
@media (max-width: 991.98px) {
   .page-header { padding: 0.75rem 1.5rem; } /* Adjust header padding */
   .header-logo img { height: 35px; }
   .header-nav ul { gap: 1.5rem; }
   .header-nav a { font-size: 0.9rem; }

   .hero-section h1 { font-size: 2.4rem; }
   .hero-section p { font-size: 1rem; }
   .hero-section .cta-button { padding: 0.7rem 1.8rem; font-size: 0.95rem;}

   .main-container { width: 95%; gap: 1.5rem; margin: 1.5rem auto;}
   .left-column, .right-column { max-width: 95%; } /* Use more width */
   .right-column { max-width: 95%; }

   h2 { font-size: 1.6rem; }
   section { padding: 1.5rem 0; }

   .pricing-cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); } /* 2 wide likely */
   .pricing-card { padding: 1.5rem 1.25rem; }
   .pricing-card .price { font-size: 1.4rem; }
   .pricing-card .features { font-size: 0.85rem; }
   .pricing-section .cta-button { font-size: 0.95rem; padding: 0.7rem 1.5rem; }

   #blog-posts { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } /* 2 wide likely */
   .blog-card-img { height: 140px; }
   .blog-card-content { padding: 0.9rem 1rem; }

   .register-container { padding: 1.5rem; }
   .register-container h2 { font-size: 1.4rem; }
   .register-container form label { font-size: 0.8rem; }
   .register-container form input, .register-container form select { font-size: 0.85rem; padding: 0.6rem 0.7rem;}
   #registerSubmit { font-size: 0.95rem; padding: 0.7rem; }
   .login-link { font-size: 0.85rem; }

   .page-footer { padding: 1.2rem; font-size: 0.8rem; }
}

/* --- Phones --- */
@media (max-width: 767.98px) {
  .page-header {
      padding: 0.75rem 1rem;
      height: calc(var(--header-height) - 5px); /* Slightly shorter header */
  }
  .page-header .login {background-color: teal; color: white; padding: 5px;}
  .page-header .login:hover {background-color: teal; color: white; padding: 5px;}
  .header-logo img { height: 30px; }

  .main-container {
      width: 100%;
      margin: 1rem 0;
      gap: 1.5rem;
      padding: 0 1rem; /* Add horizontal padding */
      overflow: visible; /* Ensure no hidden overflow */
  }
  .left-column, .right-column {
      max-width: 100%; /* Ensure full width */
  }
  .right-column { margin-top: 0; /* Remove margin when fully stacked */ }

  .hero-section {
      padding: 3rem 1rem;
      min-height: calc(90vh - calc(var(--header-height) - 5px)); /* Adjust height */
  }
  .hero-section h1 { font-size: 1.8rem; } /* Adjusted size */
  .hero-section p { font-size: 0.95rem; margin-bottom: 1.5rem; } /* Adjusted size */
  .hero-section .cta-button { display: block; width: 80%; margin: 0.75rem auto; padding: 0.7rem 1.5rem; font-size: 0.9rem;}

  h2 { font-size: 1.4rem; } /* Adjusted size */
  section { padding: 1rem 0; }

  #blog-posts { grid-template-columns: 1fr; } /* Stack blog */
  .pricing-cards { grid-template-columns: 1fr; } /* Stack pricing */
  .pricing-card { padding: 1.25rem 1rem; }
  .pricing-section .cta-button { width: 100%; }

  .blog-card-img { height: 150px; } /* Maybe slightly taller on mobile */

  .register-container {
      padding: 1.25rem 1rem; /* Adjust padding */
      box-shadow: none; /* Remove shadow */
      border: none; /* Remove border */
      background: transparent; /* Remove background */
  }
   .register-container h2 { font-size: 1.3rem; }
   .register-container form label { font-size: 0.8rem; }
   .register-container form input, .register-container form select { font-size: 0.85rem; padding: 0.6rem 0.7rem;}

  .form-row { gap: 0; }
  .form-row .form-group {
      flex-basis: 100%;
      margin-bottom: 0.8rem; /* Adjust margin */
  }
  .form-row .form-group:last-child { margin-bottom: 0; }

  #registerSubmit {
      font-size: 0.9rem;
      padding: 0.65rem;
      width: 100%; /* Ensure full width */
  }
  .login-link { font-size: 0.8rem; margin-top: 1rem;}

  .page-footer { padding: 1rem; font-size: 0.75rem; margin-top: 1rem;}

  .modal-content { padding: 1.5rem; max-width: 90%; }
  .modal-content h3 { font-size: 1.1rem; }
  .modal-content p { font-size: 0.9rem; }
}