/** 
 * --------------------------------------------------------------
 *  Font & Color Variables
 * --------------------------------------------------------------
 */

/* Define font families for global use */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Nunito", sans-serif;
  --nav-font: "Inter", sans-serif;
}

/* Define global color variables */
:root {
  --background-color: #ffffff; /* white background */
  --background-color-rgb: 255, 255, 255; /* RGB equivalent for opacity use */
  --default-color: #3d4348; /* Default text color */
  --default-color-rgb: 61, 67, 72; /* RGB for opacity use */
  --heading-color: #3e5055; /* Heading text color */
  --heading-color-rgb: 62, 80, 85; /* RGB for opacity use */
  --accent-color: #e0077b; /* Primary accent (pink) */
  --accent-color-rgb: 56, 141, 168; /* RGB (note: seems more like blue, check usage) */
  --contrast-color: #ffffff; /* white for text on colored backgrounds */
  --contrast-color-rgb: 255, 255, 255;
}

/* Navigation specific colors */
:root {
  --nav-color: #313336; /* Nav text default */
  --nav-hover-color: #fb6852; /* Nav hover text */
  --nav-dropdown-color: #313336; /* Dropdown menu text */
  --nav-dropdown-hover-color: #77b6ca; /* Dropdown hover text */
  --nav-dropdown-background-color: #ffffff; /* Dropdown bg */
}

/* Enable smooth scroll behavior */
:root {
  scroll-behavior: smooth;
}

/** 
 * --------------------------------------------------------------
 * General styles for body and links
 * --------------------------------------------------------------
 */

body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: rgba(var(--accent-color-rgb), 0.75);
  text-decoration: none;
}

/* Heading colors and fonts */
h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* Special style for h1: gradient text */
h1 {
  background: -webkit-gradient(linear, left top, left bottom, from(#f40bba), to(#fb6852));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/**
 * --------------------------------------------------------------
 * Header Styles
 * --------------------------------------------------------------
 */

.header {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 20px 0;
  transition: all 0.5s ease;
  z-index: 997; /* keep header above most elements */
}

.header .logo {
  line-height: 1;
}

.header .logo img {
  max-height: 100px; /* controls logo height */
  margin-right: 8px;
}

.header .logo h1 {
  font-size: 30px;
  margin: 0;
  font-weight: 700;
  color: var(--heading-color);
}

/* Responsive header logo and text sizing for very small devices */
@media (max-width: 480px) {
  .header .logo img {
    max-height: 24px; /* smaller logo on mobiles */
  }

  .header .logo h1 {
    font-size: 24px; /* smaller heading on mobiles */
  }
}

/* Button style for header CTA */
.header .btn-getstarted,
.header .btn-getstarted:focus {
  color: var(--contrast-color);
  background: var(--accent-color);
  font-size: 14px;
  padding: 8px 25px;
  margin-left: 30px;
  border-radius: 50px;
  transition: background-color 0.3s ease;
}

.header .btn-getstarted:hover,
.header .btn-getstarted:focus:hover {
  background: rgba(var(--accent-color-rgb), 0.85);
}

/* Layout order changes for tablets and smaller screens */
@media (max-width: 1200px) {
  .header .logo {
    order: 1;
  }

  .header .btn-getstarted {
    order: 2;
    margin: 0 15px 0 0;
    padding: 6px 15px;
  }

  .header .navmenu {
    order: 3;
  }
}

/* Add box shadow when header is scrolled */
.scrolled .header {
  box-shadow: 0px 0 18px rgba(var(--default-color-rgb), 0.15);
}

/* Specific header background transparency for index page */
.index-page .header {
  --background-color: rgba(255, 255, 255, 0); /* transparent background */
}

.index-page.scrolled .header {
  --background-color: #ffffff; /* solid bg on scroll */
}

/**
 * --------------------------------------------------------------
 * Navigation Menu Styles
 * --------------------------------------------------------------
 */

/* Desktop Navigation Styles - Applies when viewport is 1200px or wider */
@media (min-width: 1200px) {
  .navmenu {
    padding: 0;
  }

  .navmenu ul {
    margin: 0;
    padding: 0;
    display: flex; /* horizontal menu */
    list-style: none;
    align-items: center;
  }

  .navmenu li {
    position: relative;
  }

  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-color);
    padding: 18px 15px;
    font-size: 16px;
    font-family: var(--nav-font);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap; /* prevent line breaks */
    transition: color 0.3s ease;
  }

  .navmenu a i,
  .navmenu a:focus i {
    font-size: 12px;
    line-height: 0;
    margin-left: 5px;
    transition: color 0.3s ease;
  }

  .navmenu li:last-child a {
    padding-right: 0;
  }

  /* Hover and active styles */
  .navmenu li:hover > a,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-hover-color);
  }

  /* Dropdown Menu Styles */
  .navmenu .dropdown ul {
    margin: 0;
    padding: 10px 0;
    background: var(--nav-dropdown-background-color);
    display: block;
    position: absolute;
    visibility: hidden;
    left: 14px;
    top: 130%; /* dropdown appears below parent */
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
    border-radius: 4px;
    z-index: 99;
    box-shadow: 0px 0px 30px rgba(var(--default-color-rgb), 0.15);
  }

  .navmenu .dropdown ul li {
    min-width: 200px;
  }

  .navmenu .dropdown ul a {
    padding: 10px 20px;
    font-size: 15px;
    color: var(--nav-dropdown-color);
  }

  .navmenu .dropdown ul a:hover,
  .navmenu .dropdown ul .active:hover,
  .navmenu .dropdown ul li:hover > a {
    color: var(--nav-dropdown-hover-color);
  }

  /* Show dropdown on hover */
  .navmenu .dropdown:hover > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }

  /* Nested dropdown styles */
  .navmenu .dropdown .dropdown ul {
    top: 0;
    left: -90%;
    visibility: hidden;
  }

  .navmenu .dropdown .dropdown:hover > ul {
    opacity: 1;
    top: 0;
    left: -100%;
    visibility: visible;
  }

  /* Megamenu styles */
  .navmenu .megamenu {
    position: static;
  }

  .navmenu .megamenu ul {
    margin: 0;
    padding: 10px;
    background: var(--nav-dropdown-background-color);
    box-shadow: 0px 0px 20px rgba(var(--default-color-rgb), 0.1);
    position: absolute;
    top: 130%;
    left: 0;
    right: 0;
    visibility: hidden;
    opacity: 0;
    display: flex;
    transition: opacity 0.3s ease, top 0.3s ease;
    border-radius: 4px;
    z-index: 99;
  }

  .navmenu .megamenu ul li {
    flex: 1;
  }

  .navmenu .megamenu ul li a,
  .navmenu .megamenu ul li:hover > a {
    padding: 10px 20px;
    font-size: 15px;
    color: var(--nav-dropdown-color);
  }

  .navmenu .megamenu ul li a:hover,
  .navmenu .megamenu ul li .active,
  .navmenu .megamenu ul li .active:hover {
    color: var(--nav-dropdown-hover-color);
  }

  /* Show megamenu on hover */
  .navmenu .megamenu:hover > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }
}

/* Mobile Navigation Styles - Applies when viewport is below 1200px */
@media (max-width: 1199px) {
  /* Hamburger menu icon styles */
  .mobile-nav-toggle {
    color: var(--nav-color);
    font-size: 28px;
    line-height: 0;
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .navmenu {
    padding: 0;
    z-index: 9997;
  }

  /* Hide menu initially */
  .navmenu ul {
    display: none;
    position: absolute;
    inset: 60px 20px 20px 20px; /* top, right, bottom, left */
    padding: 10px 0;
    margin: 0;
    border-radius: 6px;
    background-color: var(--nav-dropdown-background-color);
    overflow-y: auto;
    transition: opacity 0.3s ease;
    z-index: 9998;
    box-shadow: 0px 0px 30px rgba(var(--default-color-rgb), 0.1);
  }

  /* Menu link styles */
  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-dropdown-color);
    padding: 10px 20px;
    font-family: var(--nav-font);
    font-size: 17px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: color 0.3s ease;
  }

  /* Icon inside links */
  .navmenu a i,
  .navmenu a:focus i {
    font-size: 12px;
    line-height: 0;
    margin-left: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    background-color: rgba(var(--accent-color-rgb), 0.1);
  }

  .navmenu a i:hover,
  .navmenu a:focus i:hover {
    background-color: var(--accent-color);
    color: var(--contrast-color);
  }

  /* Hover and active link styles */
  .navmenu a:hover,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-dropdown-hover-color);
  }

  /* Active arrow icon rotation */
  .navmenu .active i,
  .navmenu .active:focus i {
    background-color: var(--accent-color);
    color: var(--contrast-color);
    transform: rotate(180deg);
  }

  /* Dropdown menu styles for mobile */
  .navmenu .dropdown ul {
    position: static;
    display: none;
    z-index: 99;
    padding: 10px 0;
    margin: 10px 20px;
    background-color: var(--nav-dropdown-background-color);
    border: 1px solid rgba(var(--default-color-rgb), 0.1);
    transition: all 0.5s ease-in-out;
    box-shadow: none;
  }

  .navmenu .dropdown ul ul {
    background-color: rgba(33, 37, 41, 0.1);
  }

  /* Show dropdown menu when active */
  .navmenu .dropdown > .dropdown-active {
    display: block;
    background-color: rgba(33, 37, 41, 0.03);
  }

  /* Prevent body scrolling when mobile menu is open */
  .mobile-nav-active {
    overflow: hidden;
  }

  /* Style the hamburger toggle when menu active */
  .mobile-nav-active .mobile-nav-toggle {
    color: #fff;
    position: absolute;
    font-size: 32px;
    top: 15px;
    right: 15px;
    margin-right: 0;
    z-index: 9999;
  }

  /* Full screen overlay for mobile menu */
  .mobile-nav-active .navmenu {
    position: fixed;
    overflow: hidden;
    inset: 0; /* top/right/bottom/left 0 */
    background: rgba(33, 37, 41, 0.8);
    transition: opacity 0.3s ease;
  }

  /* Show menu links */
  .mobile-nav-active .navmenu > ul {
    display: block;
  }
}

/**
 * --------------------------------------------------------------
 * Footer Styles
 * --------------------------------------------------------------
 */

.footer {
  --background-color: rgba(var(--accent-color-rgb), 0.03);
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  padding-bottom: 50px;
  position: relative;
}

.footer .footer-top {
  padding-top: 50px;
}

.footer .footer-about .logo {
  line-height: 1;
  margin-bottom: 25px;
}

.footer .footer-about .logo img {
  max-height: 60px;
  margin-right: 6px;
}

.footer .footer-about .logo span {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: var(--heading-font);
  color: var(--heading-color);
}

.footer .footer-about p {
  font-size: 14px;
  font-family: var(--heading-font);
}

.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(var(--default-color-rgb), 0.5);
  font-size: 16px;
  color: rgba(var(--default-color-rgb), 0.7);
  margin-right: 10px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.footer .social-links a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.footer h4 {
  font-size: 16px;
  font-weight: bold;
  position: relative;
  padding-bottom: 12px;
}

.footer .footer-links {
  margin-bottom: 30px;
}

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

.footer .footer-links ul i {
  padding-right: 2px;
  font-size: 12px;
  line-height: 0;
}

.footer .footer-links ul li {
  padding: 10px 0;
  display: flex;
  align-items: center;
}

.footer .footer-links ul li:first-child {
  padding-top: 0;
}

.footer .footer-links ul a {
  color: rgba(var(--default-color-rgb), 0.7);
  display: inline-block;
  line-height: 1;
  transition: color 0.3s ease;
}

.footer .footer-links ul a:hover {
  color: var(--accent-color);
}

.footer .footer-contact p {
  margin-bottom: 5px;
}

.footer .footer-newsletter .newsletter-form {
  margin-top: 30px;
  padding: 6px 8px;
  position: relative;
  border-radius: 50px;
  border: 1px solid rgba(var(--accent-color-rgb), 0.3);
  display: flex;
  background-color: var(--contrast-color);
  transition: border-color 0.3s ease;
}

.footer .footer-newsletter .newsletter-form:focus-within {
  border-color: var(--accent-color);
}

.footer .footer-newsletter .newsletter-form input[type=email] {
  border: 0;
  padding: 4px 10px;
  width: 100%;
  background-color: var(--contrast-color);
  color: var(--default-color);
}

.footer .footer-newsletter .newsletter-form input[type=email]:focus-visible {
  outline: none;
}

.footer .footer-newsletter .newsletter-form input[type=submit] {
  border: 0;
  font-size: 16px;
  padding: 0 20px;
  margin: -7px -9px -7px 0;
  background: var(--accent-color);
  color: var(--contrast-color);
  transition: background-color 0.3s ease;
  border-radius: 50px;
}

.footer .footer-newsletter .newsletter-form input[type=submit]:hover {
  background: rgba(var(--accent-color-rgb), 0.8);
}

.footer .footer-newsletter .error-message {
  display: none;
  background: #df1529;
  color: #ffffff;
  text-align: left;
  padding: 15px;
  margin-top: 10px;
  font-weight: 600;
  border-radius: 4px;
}

.footer .footer-newsletter .sent-message {
  display: none;
  color: #ffffff;
  background: #059652;
  text-align: center;
  padding: 15px;
  margin-top: 10px;
  font-weight: 600;
  border-radius: 4px;
}

.footer .footer-newsletter .loading {
  display: none;
  background: var(--background-color);
  text-align: center;
  padding: 15px;
  margin-top: 10px;
}

.footer .footer-newsletter .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid var(--accent-color);
  border-top-color: var(--background-color);
  animation: subscription-loading 1s linear infinite;
}

/* Loading spinner animation */
@keyframes subscription-loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.footer .copyright {
  padding-top: 25px;
  padding-bottom: 25px;
  border-top: 1px solid rgba(var(--default-color-rgb), 0.1);
}

.footer .copyright p {
  margin-bottom: 0;
}

.footer .credits {
  margin-top: 6px;
  font-size: 13px;
}

/**
 * --------------------------------------------------------------
 * Preloader styles for loading spinner on page load
 * --------------------------------------------------------------
 */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background-color: var(--background-color);
  transition: all 0.6s ease-out;
  width: 100%;
  height: 100vh;
}

#preloader:before,
#preloader:after {
  content: "";
  position: absolute;
  border: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: animate-preloader 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

#preloader:after {
  animation-delay: -0.5s;
}

/* Preloader animation for expanding circles */
@keyframes animate-preloader {
  0% {
    width: 10px;
    height: 10px;
    top: calc(50% - 5px);
    left: calc(50% - 5px);
    opacity: 1;
  }
  100% {
    width: 72px;
    height: 72px;
    top: calc(50% - 36px);
    left: calc(50% - 36px);
    opacity: 0;
  }
}

/**
 * --------------------------------------------------------------
 * Mobile-specific fix to disable AOS animation delays for better UX
 * --------------------------------------------------------------
 */
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

/**
 * --------------------------------------------------------------
 * Global Page Titles & Breadcrumbs
 * --------------------------------------------------------------
 */
.page-title {
  --background-color: rgba(var(--default-color-rgb), 0.04);
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 25px 0;
  position: relative;
}

.page-title h1 {
  font-size: 24px;
  font-weight: 700;
}

.page-title .breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.page-title .breadcrumbs ol li + li {
  padding-left: 10px;
}

.page-title .breadcrumbs ol li + li::before {
  content: "/";
  display: inline-block;
  padding-right: 10px;
  color: rgba(var(--default-color-rgb), 0.3);
}

/**
 * --------------------------------------------------------------
 * Global Sections Style
 * --------------------------------------------------------------
 */
section,
.section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  scroll-margin-top: 100px;
  overflow: clip;
}

/* Scroll margin adjustment for smaller screens */
@media (max-width: 1199px) {
  section,
  .section {
    scroll-margin-top: 66px;
  }
}

/**
 * --------------------------------------------------------------
 * Global Section Titles
 * --------------------------------------------------------------
 */
.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
}

/* Accent underline below section titles */
.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.section-title p {
  margin-bottom: 0;
}

/**
 * --------------------------------------------------------------
 * Hero Section Styles
 * --------------------------------------------------------------
 */
.hero {
  width: 100%;
  min-height: 70vh;
  position: relative;
  padding: 180px 0 40px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background image styling */
.hero .hero-bg img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Dark overlay on hero background */
.hero .hero-bg::before {
  content: "";
  background: rgba(var(--background-color-rgb), 0.85);
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
}

.hero h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
}

.hero h1 span {
  color: var(--accent-color);
}

.hero p {
  color: rgba(var(--default-color-rgb), 0.7);
  margin: 5px 0 30px 0;
  font-size: 20px;
  font-weight: 400;
}

/* Responsive max width for hero images on tablets and above */
@media (min-width: 768px) {
  .hero .hero-img {
    max-width: 900px;
  }
}

/* Hero section call to action buttons */
.hero .btn-get-started {
  color: var(--contrast-color);
  background: var(--accent-color);
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 1px;
  display: inline-block;
  padding: 10px 28px;
  border-radius: 50px;
  transition: background-color 0.5s ease;
  box-shadow: 0 8px 28px rgba(var(--accent-color-rgb), 0.2);
}

.hero .btn-get-started:hover {
  background: rgba(var(--accent-color-rgb), 0.85);
  box-shadow: 0 8px 28px rgba(var(--accent-color-rgb), 0.45);
  color: var(--contrast-color);
}

.hero .btn-watch-video {
  font-size: 16px;
  transition: color 0.5s ease;
  margin-left: 25px;
  color: var(--default-color);
  font-weight: 600;
}

.hero .btn-watch-video i {
  color: var(--accent-color);
  font-size: 32px;
  transition: color 0.3s ease;
  line-height: 0;
  margin-right: 8px;
}

.hero .btn-watch-video:hover {
  color: var(--accent-color);
}

.hero .btn-watch-video:hover i {
  color: rgba(var(--accent-color-rgb), 0.85);
}

/* Responsive hero heading and text on small screens */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 28px;
    line-height: 36px;
  }

  .hero p {
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 30px;
  }

  .hero .btn-get-started,
  .hero .btn-watch-video {
    font-size: 13px;
  }
}
