:root {
  --primary-color: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.4);

  --bg-color: #ffffff;
  --bg-darker: #ffffff;
  --bg-lighter: #ffffff;
  --bg-card: #ffffff;

  --text-main: #000000;
  --text-muted: #333333;

  --border-color: #e5e7eb;

  --transition-speed: 0.3s;
  --border-radius: 12px;
  --border-radius-sm: 8px;

  --gradient-accent: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

/* Global Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed) ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.text-center {
  text-align: center;
}

.text-accent {
  color: var(--primary-color);
}

.bg-darker {
  background-color: var(--bg-darker);
}

.d-inline-block {
  display: inline-block;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 42, 42, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  background: rgba(255, 42, 42, 0.1);
  color: var(--primary-color);
}

.btn-secondary {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}

.btn-secondary:hover {
  background: #333333;
  border-color: #333333;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 15px 32px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.2s;
}

/* Pulse animation for CTA */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(255, 42, 42, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 42, 42, 0);
  }
}

.pulse-btn {
  animation: pulseGlow 2s infinite;
}

/* Glassmorphism */
.glassmorphism {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: all 0.3s ease;
  background: transparent;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  z-index: 1001;
}

.logo-icon {
  color: var(--primary-color);
}

.nav-list {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.mobile-toggle {
  display: none;
  color: var(--text-main);
  z-index: 1001;
}

/* Dropdown styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--bg-lighter);
  min-width: 220px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
  z-index: 1002;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  top: 100%;
  padding: 8px 0;
}

.dropdown-content a {
  color: var(--text-main);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.dropdown-content a:hover {
  background-color: var(--bg-darker);
  color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  overflow: hidden;
}

.particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

.hero-container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 42, 42, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(255, 42, 42, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Section Header */
.section-header {
  margin-bottom: 50px;
}

/* Calculator specific styles */
.calculator-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.calc-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
}

.tab-btn {
  padding: 10px 20px;
  background: var(--bg-lighter);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s;
}

.tab-btn:hover {
  background: #f3f4f6;
}

.tab-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.calculator-card {
  padding: 30px;
}

.calc-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.col-subject {
  flex: 2;
}

.col-grade {
  flex: 1.5;
  text-align: center;
}

.col-credit {
  flex: 1;
  text-align: center;
}

.col-action {
  flex: 0.5;
  text-align: right;
}

.subject-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.subject-row input,
.subject-row select {
  width: 100%;
  padding: 12px;
  background: var(--bg-lighter);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.3s;
}

.subject-row input:focus,
.subject-row select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 42, 42, 0.1);
}

.subject-row select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px;
}

.subject-row select option {
  background: var(--bg-lighter);
  color: var(--text-main);
}

.btn-remove {
  color: var(--text-muted);
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-remove:hover {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
}

.calc-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.calc-footer {
  margin-top: 25px;
}

/* Results Display */
.results-container {
  margin-top: 30px;
  animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-box {
  background: #ffffff;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-accent);
}

.cgpa-score {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin: 15px 0;
  text-shadow: 0 0 20px var(--primary-glow);
}

.result-details {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-item .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-item .val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.result-message {
  color: var(--text-main);
  font-weight: 500;
  margin: 0;
}

/* Informational Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 50px;
}

.formula-box {
  background: var(--bg-lighter);
  padding: 20px;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
}

.formula-box h4 {
  margin-bottom: 5px;
}

.formula-box p {
  margin: 0;
  font-family: monospace;
  font-size: 1.1rem;
  color: #000000;
  background-color: rgba(16, 185, 129, 0.15);
  padding: 8px 12px;
  border-radius: 4px;
  display: inline-block;
}

.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
}

.benefit-list i {
  flex-shrink: 0;
  margin-top: 3px;
}

/* FAQ Accordion */
.faq-accordion .accordion-item {
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  text-align: left;
  padding: 15px 20px;
  background: var(--bg-lighter);
  color: var(--text-main);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.accordion-header:hover {
  background: #f3f4f6;
}

.accordion-header i {
  transition: transform 0.3s;
}

.accordion-header.active i {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.accordion-content {
  background: var(--bg-color);
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.open .accordion-content {
  padding: 15px 20px;
  max-height: 200px;
  border-top: 1px solid var(--border-color);
}

/* Page specific styles */
.page-header {
  padding: 150px 0 80px;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-lighter) 0%, var(--bg-color) 100%);
  border-bottom: 1px solid var(--border-color);
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-content h2 {
  margin-top: 2rem;
}

.page-content ul {
  margin: 15px 0 25px 20px;
  list-style-type: disc;
  color: var(--text-muted);
}

.page-content li {
  margin-bottom: 8px;
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info {
  background: var(--bg-lighter);
  padding: 30px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 42, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  background: var(--bg-lighter);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 42, 42, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-color);
}

.footer-desc {
  line-height: 1.8;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-lighter);
  border-radius: 50%;
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.3s, padding-left 0.3s;
}

.footer-links a:hover,
.footer-links a.active {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-links a.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.badge-sm {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--bg-lighter);
  border-radius: 10px;
  margin-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding: 25px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 99;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--bg-darker);
    border-left: 1px solid var(--border-color);
    padding: 80px 30px;
    transition: right 0.4s ease;
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .col-subject {
    flex: 1.5;
  }

  .subject-row {
    flex-wrap: wrap;
  }

  .calc-controls {
    flex-direction: column;
    gap: 15px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .calculator-wrapper {
    max-width: 500px;
    margin: 0 auto;
  }

  .calculator-card {
    padding: 20px 15px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .calc-header {
    display: none;
  }

  .subject-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
  }

  .col-subject, 
  .col-grade, 
  .col-credit, 
  .col-action {
    width: 100%;
    flex: none;
  }

  .subject-row input,
  .subject-row select {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    margin-bottom: 0;
  }

  .btn-remove {
    position: static;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
  }

  .btn-remove i {
    width: 20px;
    height: 20px;
  }

  .btn-remove:hover {
    background: #ff4d4d;
    color: #fff;
  }

  .calc-controls .btn {
    width: 100%;
    height: 48px;
    font-size: 16px;
  }

  .calc-footer .btn {
    height: 52px;
    font-size: 18px;
    width: 100%;
  }
}