/* Core Variables */
:root {
    --primary: #333;
    --accent: #000;
    --bg-profile: #fffaf0;
    /* --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); */
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --accent-bg: #fffaf0;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
      /* Color variables for the web pages */
    --light-bg: #f9f9f9;
    --text-main: #333333;
    --text-muted: #666666;
    --fnl-green: #009C99; /* Matches your eco-friendly branding */
    --border-color: #e0e0e0;
    --bg-color: #1a1a1a;
    --text-color: #d1d1d1;
    --accent-color: #007bff38; /* Change this to match fnlhub's brand color */
    --primary: #3D52A0;
    --secondary: #7091E6;
    --grey: #8697C4;
    --light-grey: #ADBBDA;
    --off-white: #EDE8F5;
    /* Sizes variables for all elements */
    --company-logo-width: 100px;
    /* font sizes for  */
    --font-size-extra-sm: 0.6rem;
    --font-size-sm: 1rem;
    --font-size-m: 2rem;
    --font-size-l: 2.24rem;
    --font-size-el: clamp(1rem, 0.4rem + 3vw, 4rem);
    /* Font weights */
    --font-weight-extra-light: 100;
    --font-weight-light: 300;
    --font-weight-medium: 400;
    --font-weight-bold: 600;
    --font-weight-exbold: 800;
    /* line heights */
    --line-height-small: 1.2rem;
    --line-height-medium: 1.6rem;
    --line-height-big: 2rem;
    --glass: rgba(255, 255, 255, 0.1);
    --blur: blur(10px);
    --dark:#111;
    --muted:#777;
    --bg:#fafafa;
}

html {   
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
}

 /* Main Scroll Button Container */
#scrollToTopBtn {
  position: fixed;
  bottom: -60px;
  right: 30px;
  width: 40px;
  height: 40px;
  background-color: #009C99;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  transition: bottom 0.5s ease, opacity 0.5s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow: visible;
}

#scrollToTopBtn.show {
  bottom: 30px;
  opacity: 1;
}

/* Pulsing Ring (Kirupa style) */
#scrollToTopBtn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background-color: rgba(77, 255, 246, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: pulse-ring 1.5s infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

#scrollToTopBtn:hover {
  background-color: #009C99;
}

/* Styling the Navigational Bar of the main page*/
nav {
    background-color: rgb(255, 255, 255);
}

nav ul{
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li {
    height: 70px;
}

nav a {
    height: 100%;
    padding: 0 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: black;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: 0.3s ease;
}

nav a.active {
  color: #009C99;
  font-weight: 700;
  border-radius: 5px;
}

nav a:hover {
    background-color: #f0f0f0;
    color: #009C99;
}

nav li:first-child {
    margin-right: auto;
}

/* Update this to match your existing 'nav a' styles precisely */
.nav-label {
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    color: black;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: 0.3s ease;
}

/* Ensure the hover background matches the other links */
.dropdown:hover .nav-label {
    color: #009C99;
}

/* Fix for the icon alignment */
.dropdown-icon {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.4s ease;
    /* This ensures it doesn't change the line-height of the text */
    line-height: 0; 
}

.comp-logo {
    inline-size: 130px;
}

.home-btn {
    color: #009C99;
}

/* Styling the Sidebar of the main page*/
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    background-color: rgba(255, 255, 255, 0.395);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Ensure the sidebar container allows for natural height expansion */
.sidebar li {
    height: auto; /* Changed from 70px to allow content to grow */
    width: 100%;
}

.sidebar li a {
    height: 50px; /* Reduced from 70px for tighter spacing */
    padding: 0 20px;
}

/* Mobile Dropdown specific behavior */
.mobile-dropdown {
    display: flex;
    flex-direction: column; /* Stack header and sub-menu vertically */
    width: 100%;
}

.mobile-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

/* The Sub-Menu: Using 'static' so it pushes content down */
.mobile-sub-menu {
    display: none; 
    position: static; /* Vital: This pushes other links down */
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.03); /* Subtle contrast */
    width: 100%;
}

.mobile-sub-menu li a {
    padding-left: 40px; /* Indent sub-links */
    height: 45px; /* Even tighter spacing for sub-links */
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Toggle state */
.mobile-dropdown.open .mobile-sub-menu {
    display: block;
}

.mobile-dropdown.open .mobile-icon {
    transform: rotate(180deg);
}

.menu-button {
    display: none;
}

/* Dropdown Container */
.dropdown {
    position: relative;
}

/* Hide the menu by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 70px; /* Match your 'nav li' height */
    left: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    list-style: none;
    padding: 0;
    border-radius: 0 0 8px 8px;
    border-top: 2px solid var(--fnl-green);
}

/* Style the dropdown links */
.dropdown-menu li {
    height: auto; /* Allow items to shrink to text size */
    width: 100%;
}

.dropdown-menu li a {
    padding: 12px 20px;
    font-size: 0.9rem;
    display: block;
}

/* Show the menu on hover */
.dropdown:hover .dropdown-menu {
    display: block;
    background-color: #dae3e794;
}

/* Ensure the sidebar (mobile) doesn't break */
.sidebar .dropdown-menu {
    position: static;
    display: block; /* Always show in sidebar or use a toggle */
    box-shadow: none;
    padding-left: 20px;
    background: transparent;
}

/* Starting position: Tip pointing UP */
.dropdown-icon {
    margin-left: 8px;
    font-size: 0.9rem;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth, snappy feel */
    color: inherit;
}

/* Hover position: Rotate 180 degrees to point DOWN */
.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
    color: var(--fnl-green); /* Optional: changes color when active */
}

/* Ensure the dropdown menu appears correctly */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Sits right at the bottom of the nav bar */
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

@media (max-width: 800px) {
    .hideOnMobile{
        display: none;
    }
    .menu-button {
        display: block;
    }
}

@media (max-width: 400px) {
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 100%;
    }
}

/* Article-specific layout */
.article-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 50px;
  margin-top: 60px;
}
.article-content h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}
.article-content img {
  width: 100%;
  border-radius: 16px;
  margin: 30px 0;
}
.article-content p {
  line-height: 1.2;
  margin-bottom: 20px;
  font-size: 1rem;
}
/* Related posts */
.related-section {
  margin-top: 70px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
}
.related-card {
  cursor: pointer;
}
.related-card:hover {
    color: #333333a0;
}
.related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2px;
}
.related-card h4 {
  font-size: 0.95rem;
}
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}


/* Styling the footer */
.footer {
  background-color: var(--bg-color);
  color: var(--text-color);
  /* background-color: var(--light-bg);
  color: var(--text-main); */
  padding: 60px 0 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 0 20px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--accent-color);
}

.footer-section h3 {
    color: #009C99;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

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

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Social Icons */
footer .social-icons {
    margin-top: 20px;
}

footer .social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #333;
    color: #ffffff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: 0.3s;
}

.social-icons a.facebook {
    background-color: #1778F2;
}

.social-icons a.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

footer .social-icons a.twitter {
    background-color: #000000;
}

.social-icons a.whatsapp {
    background-color: #25D366;
}

.social-icons a.linkedin {
    background-color: #17a9ec;
}

.social-icons a.youtube {
    background-color: #FF0000;
}

.social-icons a:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

.social-icons a.whatsapp:hover {
    background-color: #009C99;
    border-color: #009C99;
    color: #fff;
}

/* Bottom Bar */
.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}