/* CSS Variables for Design System */

/* Dark Theme Variables */
.dark-theme {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-light: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --border-color: #374151;
} /* Mobile navigation styles are handled by header.css */

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

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.logo-text {
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Success States */
.success-message {
  background: var(--gradient-success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hero Section Enhanced */
.modern-hero .hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: fadeInDown 0.8s ease-out;
}

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

.btn-hero-primary {
  background: white !important;
  color: var(--primary-color) !important;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-hero-secondary {
  background: transparent !important;
  color: white !important;
  border: 2px solid white;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
  background: white !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
}

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

@media (max-width: 768px) {
  .hero {
    margin-top: 0;
    min-height: 280px;
  }

  .hero-cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 300px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  transition: transform 0.3s ease;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Test Cards Grid */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.test-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.test-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.test-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.test-card:hover::before {
  transform: scaleX(1);
}

.test-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.test-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.test-icon::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg) translateX(-100%);
  transition: transform 0.6s ease;
}

.test-card:hover .test-icon::after {
  transform: rotate(45deg) translateX(100%);
}

.test-card h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.test-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.test-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.test-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.test-features i {
  color: var(--secondary-color);
  font-size: 0.8rem;
}

.test-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  width: 100%;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Statistics Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

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

.stat-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Section Styles */
.section {
  padding: 5rem 0;
}

.section-title {
  font-family: "Poppins", sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Ad Container Styles */
.ad-container {
  text-align: center;
  margin: 2rem 0;
  padding: 1rem;
}

.ad-container .adsbygoogle {
  display: block;
  text-align: center;
  margin: 0 auto;
}

/* Test Comparison Table */
.comparison-table {
  background: var(--bg-primary);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 3rem 0;
}

.table-header {
  background: var(--gradient-primary);
  color: white;
  padding: 2rem;
  text-align: center;
}

.table-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.table-content {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

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

tr:hover {
  background: var(--bg-secondary);
}

/* Study Tips Section */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.tip-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.tip-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: var(--gradient-secondary);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.tip-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.tip-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA Section */
.cta {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta::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 1000 1000"><path d="M0,300 Q250,200 500,300 T1000,300 L1000,1000 L0,1000 Z" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.5;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: white;
  border: 2px solid white;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-3px) scale(1.05);
}

.cta-buttons .btn:hover {
  transform: translateY(-3px);
}

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

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

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.footer-section p {
  color: var(--text-light);
  line-height: 1.6;
}

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

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

.footer-section ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

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

.footer-links a:hover {
  color: var(--primary-color);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.rounded {
  border-radius: 0.375rem;
}

.shadow {
  box-shadow: var(--shadow-md);
}

.transition {
  transition: all 0.3s ease;
}

/* Dark Theme Support */
body.dark-theme {
  background: #111827;
  color: #e5e7eb;
}

body.dark-theme header {
  background: rgba(31, 41, 55, 0.95);
  border-bottom: 1px solid #374151;
}

body.dark-theme .nav-link {
  color: #e5e7eb;
}

body.dark-theme .control-btn {
  color: #e5e7eb;
}

body.dark-theme .section-title {
  color: #f9fafb;
}

body.dark-theme .test-card {
  background: #1f2937;
  border-color: #374151;
}

body.dark-theme .test-card:hover {
  background: #374151;
  border-color: #2563eb;
}

body.dark-theme .test-card h3 {
  color: #f9fafb;
}

body.dark-theme .btn {
  background: #2563eb;
  color: white;
}

body.dark-theme .btn-secondary {
  background: #374151;
  color: #f9fafb;
  border: 1px solid #4b5563;
}

body.dark-theme .btn-secondary:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

body.dark-theme .comparison-table {
  background: #1f2937;
}

body.dark-theme table {
  background: #1f2937;
}

body.dark-theme th {
  background: #374151;
  color: #f9fafb;
}

body.dark-theme td {
  color: #d1d5db;
  border-bottom-color: #374151;
}

body.dark-theme tr:hover {
  background: #374151;
}

body.dark-theme .tip-card {
  background: #1f2937;
  border-color: #374151;
}

body.dark-theme .tip-card h4 {
  color: #f9fafb;
}

body.dark-theme .tip-card p {
  color: #d1d5db;
}

body.dark-theme .stat-card {
  background: #1f2937;
  border-color: #374151;
}

body.dark-theme .stat-number {
  color: #3b82f6;
}

body.dark-theme .stat-label {
  color: #d1d5db;
}

body.dark-theme footer {
  background: #111827;
  color: #e5e7eb;
}

body.dark-theme footer a {
  color: #2563eb;
}

body.dark-theme .btn-cta-primary {
  background: #2563eb;
  color: white;
}

body.dark-theme .btn-cta-primary:hover {
  background: #1d4ed8;
}

body.dark-theme .btn-cta-secondary {
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark-theme .btn-cta-secondary:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 1000px;
    overflow: visible;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem;
  }

  .dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-item:hover .dropdown {
    max-height: 0;
  }

  .nav-item.active .dropdown {
    max-height: 1000px;
  }

  .dropdown-item {
    padding-left: 2rem;
  }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .test-buttons {
    gap: 0.5rem;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-card {
    padding: 2rem 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .table-content {
    font-size: 0.9rem;
  }

  .cta h2 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .btn-cta-primary,
  .btn-cta-secondary {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .test-card {
    padding: 1.5rem;
  }

  .test-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  .test-card h3 {
    font-size: 1.5rem;
  }

  th,
  td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* Ensure mobile dropdowns work properly */
@media (max-width: 768px) {
  /* FORCE mobile menu to display full width */
  .nav-links,
  #navLinks,
  ul.nav-links {
    display: flex !important;
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: auto !important;
    min-height: calc(100vh - 70px) !important;
  }

  .nav-links.active,
  #navLinks.active,
  ul.nav-links.active {
    display: flex !important;
    max-height: calc(100vh - 70px) !important;
    height: auto !important;
  }

  /* Make sure nav links with dropdowns are clearly tappable */
  .nav-item .nav-link {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(70, 187, 229, 0.2);
    cursor: pointer;
  }

  /* Ensure chevron is visible and clickable */
  .nav-link .fa-chevron-down {
    transition: transform 0.3s ease !important;
    opacity: 1 !important;
    pointer-events: none; /* Let clicks go through to parent link */
  }

  /* Visual feedback when dropdown is open */
  .nav-item.mobile-open > .nav-link,
  .nav-item.mobile-dropdown-open > .nav-link {
    background: rgba(70, 187, 229, 0.15) !important;
    border-color: var(--primary-color, #46bbe5) !important;
  }

  /* Make dropdowns smoother */
  .dropdown {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Ensure dropdown items are visible when parent is open */
  .nav-item.mobile-open .dropdown,
  .nav-item.mobile-dropdown-open .dropdown {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Ensure dropdown items are clickable */
  .dropdown-item,
  .dropdown > a {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none;
    -webkit-user-select: none;
  }
}
