/* Immigration Buddy - Main Stylesheet - Canada Theme */
:root {
  /* Sober Color Palette */
  --primary-color: #2C3E50;    /* Dark Blue-Gray - Primary */
  --secondary-color: #3498DB;  /* Muted Blue - Secondary */
  --accent-color: #34495E;     /* Slate Gray - Accent */
  --light-color: #FAFAFA;      /* Pure White */
  --dark-color: #2F2F2F;       /* Dark Gray */
  --gray-color: #6c757d;       /* Medium Gray */
  --light-gray: #F5F5F5;       /* Light Gray */
  --warning-color: #dc3545;    /* Warning Red */
  --success-color: #228B22;    /* Forest Green */
  --info-color: #4169E1;       /* Royal Blue */
  
  /* Typography - Canadian Professional */
  --font-main: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

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

body {
  font-family: var(--font-main);
  color: var(--dark-color);
  line-height: 1.6;
  background-color: var(--light-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
  font-weight: 900;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.5rem;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.text-center {
  text-align: center;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2rem 0;
}

/* Header & Navigation - Sober Theme */
header {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
  border-bottom: 3px solid var(--secondary-color);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.logo img {
  height: 45px;
  margin-right: 0.5rem;
  filter: brightness(1.1);
}

.logo-text {
  font-family: var(--font-heading);
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.logo-tagline {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-top: -5px;
}

@media (max-width: 768px) {
  .logo {
    flex-direction: row;
    align-items: center;
  }
  
  .logo-tagline {
    display: none;
  }
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--light-gray);
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
}

/* Hero Section - Sober Theme */
.hero {
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.8)), 
              linear-gradient(45deg, rgba(25, 25, 112, 0.1), rgba(25, 25, 112, 0.05));
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 8rem 0 4rem;
  margin-top: 4rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
  background-size: 50px 50px;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 1.5rem;
  color: white;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.3rem;
  max-width: 900px;
  margin: 0 auto 2rem;
  font-weight: 400;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.trust-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-primary:hover {
  background-color: #2980B9;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Features Section */
.features {
  background-color: white;
}

.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--light-color);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* How It Works Section */
.how-it-works {
  background-color: var(--light-gray);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  counter-reset: step-counter;
}

.step {
  position: relative;
  padding: 2rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  top: -15px;
  left: -15px;
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Form Section */
.form-section {
  background-color: white;
}

.form-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--light-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232c3e50' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

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

/* Testimonials Section */
.testimonials {
  background-color: var(--light-gray);
}

.testimonial-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--secondary-color);
}

/* FAQ Section */
.faq {
  background-color: white;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  overflow: hidden;
}

.faq-question {
  padding: 1rem;
  background-color: var(--light-color);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer-content {
  padding: 0 1rem 1rem;
}

.faq-item.active .faq-answer {
  padding: 1rem;
  max-height: 500px;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 40px;
  margin-right: 0.5rem;
}

.footer-links h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--light-gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 1rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    margin: 0.5rem 0;
    margin-left: 0;
  }
  
  .hamburger {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }
  
  .hero {
    padding: 6rem 0 3rem;
    margin-top: 0;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in forwards;
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-in forwards;
}

.slide-in-right {
  animation: slideInRight 0.5s ease-in forwards;
}

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

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

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

/* Auth Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: modalFadeIn 0.3s ease forwards;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-color);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Chatbot Widget */
.chatbot-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
}

.chatbot-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.chatbot-button:hover {
  transform: scale(1.1);
}

.chatbot-container {
  display: none;
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 450px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  flex-direction: column;
}

.chatbot-container.active {
  display: flex;
}

.chatbot-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  font-weight: 600;
}

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.chatbot-input {
  display: flex;
  padding: 0.8rem;
  border-top: 1px solid var(--light-gray);
}

.chatbot-input input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px 0 0 4px;
}

.chatbot-input button {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
}

.language-switcher select {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.language-switcher select:focus {
  outline: none;
}

/* Form Output Preview */
.output-preview {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
  display: none;
}

.output-preview.active {
  display: block;
}

.case-reference {
  background-color: var(--light-gray);
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  cursor: pointer;
  position: relative;
}

.case-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  background-color: white;
  width: 300px;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.case-reference:hover .case-popup {
  display: block;
}

/* Disclaimer */
.disclaimer {
  background-color: #f0f4f8;
  border-left: 4px solid var(--warning-color);
  padding: 1.2rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.disclaimer h4 {
  color: var(--warning-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Legal Notice Banner */
.legal-notice-banner {
  background-color: #f0f4f8;
  border-bottom: 2px solid var(--warning-color);
  padding: 1rem 1.5rem;
  position: relative;
  top: 64px; /* Adjust based on your header height */
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.legal-notice-banner p {
  margin-bottom: 0;
  font-size: 1rem;
  text-align: center;
  color: var(--dark-color);
  font-weight: 500;
}

.legal-notice-banner .close-banner {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--warning-color);
  cursor: pointer;
  font-size: 1.2rem;
}

/* AI Warning */
.ai-warning {
  background-color: #f0f4f8;
  border: 2px solid var(--warning-color);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--dark-color);
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ai-warning i {
  color: var(--warning-color);
  font-size: 1.3rem;
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: #f0f4f8;
  border-radius: 4px;
  border: 1px solid var(--warning-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.consent-checkbox input {
  margin-top: 0.3rem;
  margin-right: 0.75rem;
}

.consent-checkbox label {
  flex: 1;
  font-size: 0.95rem;
  color: var(--dark-color);
  font-weight: 500;
}

.footer-disclaimer {
  font-size: 0.95rem;
  opacity: 0.9;
  padding-top: 1rem;
  text-align: center;
  font-weight: 500;
}

/* Document Disclaimer */
.document-disclaimer {
  margin: 1.5rem 0;
  padding: 1.2rem;
  background-color: #f0f4f8;
  border: 1px solid var(--warning-color);
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.document-disclaimer p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--dark-color);
  font-weight: 500;
}

.document-disclaimer p:last-child {
  margin-bottom: 0;
}

/* Service Cards */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.service-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.service-header h3 {
  color: white;
  margin-bottom: 0.5rem;
}

.service-price {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-price span {
  font-size: 1rem;
  font-weight: normal;
}

.service-body {
  padding: 1.5rem;
}

.service-features {
  list-style: none;
  margin-bottom: 2rem;
}

.service-features li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.service-features li::before {
  content: "✓";
  color: var(--success-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.service-card .btn {
  display: block;
  width: 100%;
}

/* Pricing Toggle */
.pricing-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.toggle-label {
  font-weight: 600;
  margin: 0 1rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--secondary-color);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.popular-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  transform: rotate(45deg) translate(20%, -70%);
  transform-origin: top right;
}

/* Document types section */
.document-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.document-type {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.document-type:hover {
  transform: translateY(-5px);
}

.document-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.document-type h3 {
  margin-bottom: 1rem;
}

.document-description {
  color: var(--gray-color);
  margin-bottom: 1.5rem;
  min-height: 4.8rem; /* Approximately 3 lines of text */
}

.document-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

/* Tab system for document templates */
.tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--light-gray);
  margin-bottom: 2rem;
}

.tab-link {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-link.active {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Custom checkbox for subscription options */
.custom-checkbox {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 1rem;
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
  border-radius: 4px;
}

.custom-checkbox:hover input ~ .checkmark {
  background-color: #ccc;
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--secondary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.custom-checkbox .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}