/*
  Styles for Stock Market Landing Page
  Author: kerdainodev global
*/

/* ===== Root Variables for Theme Consistency ===== */
:root {
  --primary-color: #ffa500;
  /* Main accent color (orange) */
  --hover-color: #e69500;
  /* Button/link hover color */
  --text-color: #1a1a1a;
  /* Default text color */
  --bg-color: #fff;
  /* General background color */
  --section-bg: #f9f9f9;
  /* Background color for sections */
  --cta-bg: #ffe8cc;
  /* Background color for CTA section */
  --font-main: 'Inter', sans-serif;
  /* Main font for body text */
  --font-heading: 'Poppins', sans-serif;
  /* Font for headings */
  --radius-sm: 5px;
  /* Small border radius (buttons, etc.) */
  --radius-lg: 50%;
  /* Large radius (used for circular images) */
}

/* ===== Global Styles ===== */
html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
}

/* Skip link for accessibility (keyboard users) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Container layout helper */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ===== Typography ===== */
h1,
h2,
h3 {
  font-family: var(--font-heading);
}

img {
  max-width: 100%;
  height: auto;
}

/* Rounded image (used for logo) */
.img-rounded {
  border-radius: var(--radius-lg);
}

/* ===== Header Styles ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.logo {
  width: 100px;
  height: auto;
  outline: none;
}

.home:focus img {
  outline: none;
  box-shadow: none;
}

/* Screen reader only (for accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Navigation links */
nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #000;
  font-weight: 600;
}

nav a:focus,
nav a:hover {
  color: var(--primary-color);
  outline: none;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(to bottom right, #1e3a2f, #2f4550);
  color: var(--bg-color);
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Call-to-action button */
.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: #000;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

.cta-button:focus,
.cta-button:hover {
  background-color: var(--hover-color);
  outline: none;
}

/* ===== About and Course Sections ===== */
.about,
.course {
  padding: 3rem 1rem;
  background-color: var(--section-bg);
}

.about h2,
.course h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Feature list styling */
.features {
  list-style: none;
  padding-left: 0;
}

.features li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.features i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

/* Course module layout */
.modules div {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ===== CTA Section ===== */
.cta {
  background-color: var(--cta-bg);
  text-align: center;
  padding: 3rem 1rem;
}

/* ===== Footer Styles ===== */
footer {
  background: linear-gradient(to bottom right, #1e3a2f, #2f4550);
  width: 100%;
}

.footer {
  max-width: 1200px;
  margin: auto;
  padding: 2rem;
  text-align: center;
  color: var(--bg-color);
}

/* Footer links */
.footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer a:focus,
.footer a:hover {
  text-decoration: underline;
  outline: none;
}

/* Footer bottom area */
.footer-bottom {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #ffffffcc;
  text-align: center;
  line-height: 1.6;
  border-top: 1px solid #ffffff22;
  padding-top: 1rem;
}

.footer-bottom p {
  margin: 0.2rem 0;
}

/* Social media icon links */
.social-icons a {
  margin: 0 0.5rem;
  font-size: 1.25rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    text-align: left;
  }

  .logo {
    width: 140px;
  }

  nav a {
    display: block;
    margin: 0.5rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cta-button {
    padding: 0.6rem 1.2rem;
  }

  .footer {
    padding: 2rem;
  }
}

/* ===== Reduced Motion Preferences (Accessibility) ===== */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}

/* ===== Focus Styles for Accessibility ===== */
a:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}