/* ──────────────────────────────────────────────────────────────
   styles.css – Custom Styles for Company Focus Homepage
   Author: Company Focus
   Description: Modern, light‐green–themed customizations on top of Bootstrap
────────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────────
   0. VARIABLES & RESET
────────────────────────────────────────────────────────────── */
:root {
  --primary-green: #2e7d32;
  --primary-dark:  #2a3e2f;
  --primary-light-bg: #e8f5e9;
  --card-bg-light:  #f1f8e9;
  --text-dark:      #333333;
  --text-light:     #ffffff;
  --white:          #ffffff;
  --gray-light:     #f9f9f9;
  --gray-medium:    #dddddd;
}

/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--gray-light);
  color: var(--text-dark);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;     /* Remove default margin */
  min-height: 100vh;
}

/* Remove underlines on all links by default, but allow hover/focus */
a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover,
a:focus {
  color: var(--primary-dark);
  text-decoration: underline;
  outline: none; /* Accessibility: remove browser default */
}

/* Responsive images and iframes */
img,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ──────────────────────────────────────────────────────────────
   1. ANCHOR SCROLL OFFSET for Sticky Navbar
────────────────────────────────────────────────────────────── */
/* Modern fix: ensure anchor links aren't hidden under sticky navbar */
section[id],
[id^="quick-"],
[id^="how-"],
[id^="services"],
[id^="trust"],
[id^="testimonials"],
[id^="articles"],
[id^="videos"],
[id^="contact"] {
  scroll-margin-top: 90px; /* Adjust as needed (matches navbar height inc. padding) */
}
@media (max-width: 767.98px) {
  section[id],
  [id^="quick-"],
  [id^="how-"],
  [id^="services"],
  [id^="trust"],
  [id^="testimonials"],
  [id^="articles"],
  [id^="videos"],
  [id^="contact"] {
    scroll-margin-top: 70px;
  }
}

/* ──────────────────────────────────────────────────────────────
   2. NAVBAR CUSTOMISATION
────────────────────────────────────────────────────────────── */
.navbar {
  background-color: var(--white) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border-bottom: 1px solid var(--gray-medium);
  z-index: 1030; /* Ensure always above page content */
}

.navbar .navbar-brand {
  color: var(--primary-green) !important;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.navbar .navbar-nav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  outline: none;
}

.navbar .navbar-nav .nav-link:focus {
  background: var(--primary-light-bg);
  border-radius: 0.25rem;
}

.navbar .navbar-nav .nav-link:hover {
  color: var(--primary-green) !important;
}

.navbar-toggler {
  border-color: var(--gray-medium);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* ──────────────────────────────────────────────────────────────
   3. HERO SECTION
────────────────────────────────────────────────────────────── */
#hero {
  background-color: var(--primary-green);
  /*background-image: url('hero-bg.jpg');*/
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: 5rem 1rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

#hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

#hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

#hero .btn {
  background-color: var(--primary-green);
  color: var(--text-light);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s, transform 0.2s;
  outline: none;
}

#hero .btn:hover,
#hero .btn:focus {
  background-color: var(--primary-dark);
  color: var(--text-light);
  transform: translateY(-2px) scale(1.02);
}

/* ──────────────────────────────────────────────────────────────
   4. TRUST & STATISTICS SECTION
────────────────────────────────────────────────────────────── */
#trust {
  background-color: var(--white);
  padding: 4rem 0;
}

#trust .border {
  border-color: var(--gray-medium) !important;
}

#trust h2, #trust p {
  color: var(--primary-dark);
}

#trust h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

#trust p {
  font-size: 1rem;
}

#trust .col-md-4 .border {
  background-color: var(--primary-light-bg);
  border-radius: 0.5rem;
}

#trust .col-md-4 h2 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

#trust img {
  margin-right: 1rem;
  transition: transform 0.3s;
}

#trust img:last-child {
  margin-right: 0;
}

#trust img:hover {
  transform: scale(1.05);
}

/* ──────────────────────────────────────────────────────────────
   5. HOW IT WORKS SECTION
────────────────────────────────────────────────────────────── */
#how-it-works {
  background-color: var(--gray-light);
  padding: 4rem 0;
}

#how-it-works h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 2rem;
}

#how-it-works .card {
  background-color: var(--white);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

#how-it-works .card:hover,
#how-it-works .card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

#how-it-works .card-title {
  color: var(--primary-green);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

#how-it-works .card-text {
  color: var(--text-dark);
  font-size: 0.95rem;
}

/* ──────────────────────────────────────────────────────────────
   6. CORE SERVICES SECTION
────────────────────────────────────────────────────────────── */
#services {
  background-color: var(--white);
  padding: 4rem 0;
}

#services h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  text-align: center;
}

#services .card {
  background-color: var(--card-bg-light);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

#services .card:hover,
#services .card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 7px 20px rgba(0,0,0,0.1);
}

#services .card-title {
  color: var(--primary-green);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

#services .card-text {
  color: var(--text-dark);
  font-size: 0.95rem;
}

/* ──────────────────────────────────────────────────────────────
   7. TESTIMONIALS CAROUSEL
────────────────────────────────────────────────────────────── */
#testimonials {
  background-color: var(--gray-light);
  padding: 4rem 0;
}

#testimonials h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  text-align: center;
}

#testimonials .carousel-item {
  padding: 2rem 1rem;
}

#testimonials blockquote {
  margin: 0 auto 1.5rem;
  font-style: italic;
  color: var(--text-dark);
  max-width: 700px;
  position: relative;
  padding-left: 1.5rem;
}

#testimonials blockquote::before {
  content: "“";
  font-size: 3rem;
  color: var(--primary-green);
  position: absolute;
  left: 0;
  top: -0.5rem;
  line-height: 1;
}

#testimonials .blockquote-footer {
  color: var(--primary-light-bg);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

#testimonials a {
  color: var(--text-light);
}

/* Carousel controls (white arrows for dark bg) */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
}

/* ──────────────────────────────────────────────────────────────
   8. INSIGHTS & ARTICLES SECTION
────────────────────────────────────────────────────────────── */
#articles {
  background-color: var(--white);
  padding: 4rem 0;
}

#articles h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  text-align: center;
}

#articles .border-start {
  border-color: var(--primary-green) !important;
}

#articles h3 a {
  color: var(--primary-dark);
  transition: color 0.3s;
}

#articles h3 a:hover,
#articles h3 a:focus {
  color: var(--primary-green);
}

#articles p {
  color: var(--text-dark);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

#articles .more-link {
  color: var(--primary-green);
  font-weight: 600;
  transition: color 0.3s;
}

#articles .more-link:hover,
#articles .more-link:focus {
  color: var(--primary-dark);
}

/* ──────────────────────────────────────────────────────────────
   9. VIDEO GUIDES SECTION
────────────────────────────────────────────────────────────── */
#videos {
  background-color: var(--gray-light);
  padding: 4rem 0;
}

#videos h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  text-align: center;
}

#videos .ratio,
#videos .embed-responsive {
  border: 1px solid var(--gray-medium);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

#videos p {
  color: var(--text-dark);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* ──────────────────────────────────────────────────────────────
   10. CONTACT SECTION
────────────────────────────────────────────────────────────── */
#contact {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: 4rem 0;
}

#contact h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#contact p {
  font-size: 1rem;
  margin-bottom: 2rem;
}

#contact a {
    color: var(--text-light);
}

#contact .btn {
  background-color: var(--primary-green);
  color: var(--text-light);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
  outline: none;
}

#contact .btn:hover,
#contact .btn:focus {
  background-color: var(--white);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────────
   11. FOOTER STYLES
────────────────────────────────────────────────────────────── */
footer {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: 1.5rem 0;
  font-size: 0.96rem;
}

footer p {
  margin: 0;
}

footer .nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer .nav li {
  display: inline-block;
  margin-left: 1rem;
}

footer .nav li:first-child {
  margin-left: 0;
}

footer .nav a {
  color: var(--text-light);
  font-size: 0.9rem;
  transition: color 0.3s;
}

footer .nav a:hover,
footer .nav a:focus {
  color: var(--primary-green);
}

/* ──────────────────────────────────────────────────────────────
   12. RESPONSIVE ADJUSTMENTS & MEDIA QUERIES
────────────────────────────────────────────────────────────── */
/* Smaller hero text & improved spacing for mobile */
@media (max-width: 767.98px) {
  #hero h1 {
    font-size: 2rem;
  }
  #hero p {
    font-size: 1.1rem;
  }
  #trust .col-md-4 h2 {
    font-size: 1.75rem;
  }
  .navbar {
    padding: 0.5rem 0.5rem !important;
  }
}

/* Cards stack nicely on very small screens, avoid odd spacing */
@media (max-width: 576px) {
  #how-it-works .card,
  #services .card {
    margin-bottom: 1.5rem;
  }
  .navbar .navbar-nav .nav-link {
    padding: 0.5rem 0.5rem;
  }
}

/* Ensures that the footer never sits above the bottom of the viewport on short pages */
@media (min-height: 600px) {
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  main {
    flex: 1;
  }
}