/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Body and Colors */
body {
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Header */
.site-header {
  background: #0a2342;
  color: white;
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #4fc3f7;
}

.dark-mode-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 70vh; /* Make hero section take up 90% of screen height */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode .hero {
  background: url('images/background1.png') center/cover no-repeat;
}

.hero-content h1,
.hero-content p,
.hero-content a {
  color: black;
}

.cta-button {
  background-color: #ffffff;
  color: #000;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}



.hero-content h1 {
  
  font-size: 48px;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 30px;
}

.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background-color: #00b386;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
}

/* Categories */
.categories {
  padding: 3rem 0;
  text-align: center;
}

.categories h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #0a2342;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.category-card, .blog-card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover, .blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.category-card h3, .blog-card h3 {
  margin-bottom: 0.8rem;
  color: #0a2342;
}

/* Featured Blogs */
.featured-blogs {
  padding: 3rem 0;
}

.featured-blogs h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #0a2342;
}

/* Newsletter */
.newsletter {
  background: #e3f2fd;
  text-align: center;
  padding: 3rem 1rem;
  margin-top: 3rem;
  border-radius: 20px;
}

.newsletter h2 {
  margin-bottom: 1rem;
  color: #0a2342;
}

.newsletter-form {
  margin-top: 1rem;
}

.newsletter-form input {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 25px;
  width: 250px;
  margin-right: 0.5rem;
}

.newsletter-form button {
  padding: 0.8rem 1.5rem;
  background: #4fc3f7;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  color: #0a2342;
  transition: background 0.3s;
}

.newsletter-form button:hover {
  background: #29b6f6;
}

/* Footer */
.site-footer {
  background: #0a2342;
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-links {
  margin-top: 1rem;
}

.footer-links a {
  color: #4fc3f7;
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Dark Mode Styles */
.dark-mode .site-header,
.dark-mode .site-footer {
  background: #1c1c1c;
}

.dark-mode .hero {
  background: linear-gradient(120deg, #1c1c1c, #2e2e2e);
}

.dark-mode .category-card,
.dark-mode .blog-card {
  background: #1e1e1e;
  color: #e0e0e0;
  box-shadow: none;
}

.dark-mode .newsletter {
  background: #333;
  color: #e0e0e0;
}

/* Dark Mode Fix for Section Headings & Text */
.dark-mode h2,
.dark-mode h3,
.dark-mode p {
  color: #e0e0e0;
}

.dark-mode .categories,
.dark-mode .featured-blogs {
  background: #121212;
}

.dark-mode .category-card h3,
.dark-mode .blog-card h3 {
  color: #4fc3f7; /* Highlight titles in dark mode */
}

.dark-mode .category-card p,
.dark-mode .blog-card p {
  color: #ccc;
}

/* Responsive Design for Blog Page */

/* General adjustments */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Blog text adjustments */
article {
  line-height: 1.8;
  font-size: 1.05rem;
}

/* FAQ, author, comments - padding on mobile */
.author-box,
.comment-box,
.faq-item {
  font-size: 1rem;
}

/* Scroll button adjustments */
#scrollTopBtn {
  right: 15px;
  bottom: 20px;
  font-size: 0.9rem;
}

/* Mobile Screens */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
    text-align: center;
  }
  .hero p {
    text-align: center;
    font-size: 1rem;
  }
  article h2 {
    font-size: 1.4rem;
  }
  article p,
  article ul,
  article ol {
    font-size: 1rem;
  }
  .faq-item {
    padding: 0.8rem;
  }
  .comment-box textarea {
    height: 80px;
  }
}

/* Extra Small Screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }
  .cta-button {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  #scrollTopBtn {
    font-size: 0.8rem;
    padding: 8px 12px;
  }
}

/* Ensure all text stays visible in light & dark mode */
article p,
article li,
article small,
.faq-answer,
.faq-item strong {
  color: var(--text-color, #222);
}

/* Links remain visible */
article a {
  color: var(--accent-color, #1e88e5);
  text-decoration: underline;
}

/* Dark mode specific */
body.dark-mode article p,
body.dark-mode article li,
body.dark-mode .faq-answer,
body.dark-mode .faq-item strong,
body.dark-mode article small {
  color: #ddd; /* lighter text for dark mode */
}

body.dark-mode article a {
  color: #4dabf7;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Basic styling for search bar */
.search-input {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

/* Button style */
.dark-mode-toggle {
  padding: 6px 12px;
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Optional: Make it stack in small screens */
@media (max-width: 600px) {
  .header-actions {
    flex-direction: column;
    align-items: flex-end;
    margin-top: 10px;
  }

  .search-input {
    width: 100%;
    max-width: 200px;
  }
}

section {
  margin-bottom: 20px; /* Add space between sections */
  padding: 20px; /* Add padding to each section*/}

 .hero .container {
  text-align: center; /* Center the content horizontally */
}

.calculator-section {
  padding: 50px 20px;
  background: #f0f4fa;
  text-align: center;
}

.calculator-section h2 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #222;
}

.calculator-section p {
  font-size: 16px;
  margin-bottom: 20px;
  color: #555;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn-calculator {
  display: inline-block;
  padding: 12px 24px;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.btn-calculator:hover {
  background-color: #0056b3;
}
