/*=============== UNIVERSAL HEDGE5 HEADER & FOOTER CSS ===============*/
/* 
    This CSS file provides conflict-free header and footer styles for 100+ pages.
    Based on the perfect index.html implementation with exact same functionality.
    All classes are prefixed with 'hedge5-' to prevent conflicts.
    
    USAGE:
    1. Include this CSS file in your page
    2. Use the universal template
    3. Add 'inner-page' class to body tag
*/

/*=============== CSS VARIABLES ===============*/
:root {
  --hedge5-header-height: 3.5rem;
  --hedge5-first-color: hsl(220, 68%, 54%);
  --hedge5-first-color-lighten: hsl(220, 68%, 97%);
  --hedge5-title-color: hsl(210, 25%, 97%);
  --hedge5-text-color: hsl(0, 0%, 99%);
  --hedge5-body-font: "Poppins", sans-serif;
  --hedge5-normal-font-size: .938rem;
  --hedge5-small-font-size: .813rem;
  --hedge5-smaller-font-size: .75rem;
  --hedge5-font-medium: 500;
  --hedge5-font-semi-bold: 600;
}

/*=============== COMPATIBILITY WITH ORIGINAL HEADER.CSS ===============*/
/* Ensure exact same height calculation as index.html */
:root {
  --header-height: 3.5rem; /* Original variable for compatibility */
}

/*=============== FIX FOR HERO SECTIONS WITH MIN-H-SCREEN ===============*/
/* Add padding-top to account for fixed header when using min-h-screen */
.hero-section.min-h-screen,
.min-h-screen.hero-section {
  padding-top: calc(var(--header-height) + 2rem);
  min-height: calc(100vh - calc(var(--header-height) + 2rem));
}

/* Alternative: Add padding-top to any element with min-h-screen that comes after header */
body.inner-page .min-h-screen:first-of-type {
  padding-top: calc(var(--header-height) + 2rem);
}

/* Specific fix for actional.html hero section */
.hero-section.relative.min-h-screen {
  padding-top: calc(var(--header-height) + 2rem);
  min-height: calc(100vh - calc(var(--header-height) + 2rem));
}

/*=============== UNIVERSAL HEADER ===============*/
.hedge5-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: background-color 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

/* Header styles for inner pages */
.inner-page .hedge5-header {
  background-color: rgba(9, 24, 37, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  transition: background-color 0.4s, box-shadow 0.4s;
}

/* Header with background on scroll */
.hedge5-header.hedge5-scrolled,
.inner-page .hedge5-header.hedge5-scrolled {
  background-color: rgba(9, 24, 37, 0.98);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: background-color 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

/*=============== NAVIGATION CONTAINER ===============*/
.hedge5-nav {
  height: calc(var(--header-height) + 2rem); /* Exact same calculation as index.html */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hedge5-container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.hedge5-nav__data {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/*=============== LOGO (PERFECT ALIGNMENT FROM INDEX.HTML) ===============*/
.hedge5-nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: 0.25rem;
  color: var(--hedge5-title-color);
  font-weight: var(--hedge5-font-semi-bold);
  transition: color 0.3s;
}

.hedge5-nav__logo:hover {
  color: var(--hedge5-first-color);
}

/* Default logo size - exact same as index.html */
.hedge5-nav__data > a > img {
  width: 120px;
  max-width: 100%;
  height: auto;
  padding: 5px 0;
}

/*=============== MOBILE TOGGLE ===============*/
.hedge5-nav__toggle {
  position: relative;
  width: 32px;
  height: 32px;
  display: none;
}

/*=============== MOBILE NAVIGATION ===============*/
@media screen and (max-width: 1118px) {
  .hedge5-nav__toggle {
    display: block;
  }

  .hedge5-nav__toggle-menu, .hedge5-nav__toggle-close {
    color: #fff;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  /* Hide close button by default */
  .hedge5-nav__toggle-close {
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    z-index: 1002;
    pointer-events: none;
  }

  .hedge5-nav__menu {
    background-color: rgba(9, 24, 37, 0.98);
    position: fixed;
    left: 0;
    top: -100%;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    padding: 5rem 2rem 4rem;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 999;
    backdrop-filter: blur(10px);
    display: block;
  }

  .hedge5-nav__menu.hedge5-show-menu {
    top: 0;
    opacity: 1;
    pointer-events: auto;
  }

  .hedge5-nav__menu::-webkit-scrollbar {
    width: 0.5rem;
  }
  .hedge5-nav__menu::-webkit-scrollbar-thumb {
    background-color: hsl(220, 12%, 70%);
  }

  .hedge5-nav__toggle {
    display: block;
    z-index: 1001;
    position: relative;
  }

  .hedge5-nav__list {
    flex-direction: column;
  }

  /* Mobile menu hover effects */
  .hedge5-nav__link {
    color: #fff !important;
    background-color: transparent;
    border-bottom: 1px solid rgba(114, 161, 222, 0.2);
    transition: all 0.3s ease;
  }

  .hedge5-nav__link:hover {
    background-color: rgba(114, 161, 222, 0.25) !important;
    color: #fff !important;
    transform: translateX(10px);
    border-bottom-color: rgba(114, 161, 222, 0.4);
  }

  /*=============== MOBILE DROPDOWN FIXES ===============*/
  .hedge5-dropdown__container {
    background-color: rgba(9, 24, 37, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(114, 161, 222, 0.2);
    height: 0 !important;
    overflow: hidden !important;
    position: static !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: height 0.4s ease, opacity 0.4s ease;
  }

  /* Show dropdown when .hedge5-show-dropdown class is applied */
  .hedge5-dropdown__item.hedge5-show-dropdown .hedge5-dropdown__container {
    height: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .hedge5-dropdown__content {
    padding: 1rem;
    row-gap: 1rem;
  }

  .hedge5-dropdown__group {
    padding-left: 0;
    margin: 0.5rem 0;
  }

  .hedge5-dropdown__link {
    color: #fff !important;
    padding: 0.75rem 1rem;
    display: block;
    border-radius: 4px;
    transition: all 0.3s ease;
  }

  .hedge5-dropdown__link:hover {
    color: #72a1de !important;
    background-color: rgba(114, 161, 222, 0.1);
  }

  .hedge5-dropdown__title {
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(114, 161, 222, 0.2);
  }

  .hedge5-dropdown__icon {
    background-color: rgba(114, 161, 222, 0.15) !important;
    border: 1px solid rgba(114, 161, 222, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 0.5rem;
  }

  .hedge5-dropdown__arrow {
    transition: transform 0.4s;
  }

  .hedge5-show-dropdown .hedge5-dropdown__arrow {
    transform: rotate(180deg);
  }
}

/*=============== NAVIGATION LINKS ===============*/
.hedge5-nav__link {
  color: var(--hedge5-title-color);
  font-weight: var(--hedge5-font-semi-bold);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

.hedge5-nav__link:hover {
  background-color: rgba(114, 161, 222, 0.15);
  color: var(--hedge5-title-color);
}

/* Show icon */
.hedge5-show-icon .hedge5-nav__toggle-menu {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

.hedge5-show-icon .hedge5-nav__toggle-close {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg);
  pointer-events: auto;
}

/*=============== DROPDOWN ===============*/
.hedge5-dropdown__button {
  cursor: pointer;
}

.hedge5-dropdown__arrow {
  font-size: 1.5rem;
  font-weight: initial;
  transition: transform 0.4s;
}

.hedge5-dropdown__content, .hedge5-dropdown__group, .hedge5-dropdown__list {
  display: grid;
}

.hedge5-dropdown__container {
  background-color: var(--hedge5-first-color-lighten);
  height: 0;
  overflow: hidden;
  transition: height 0.4s;
}

.hedge5-dropdown__content {
  row-gap: 1.75rem;
}

.hedge5-dropdown__group {
  padding-left: 2.5rem;
  row-gap: 0.5rem;
}

.hedge5-dropdown__group:first-child {
  margin-top: 1.25rem;
}

.hedge5-dropdown__group:last-child {
  margin-bottom: 1.25rem;
}

.hedge5-dropdown__icon i {
  font-size: 1.25rem;
  color: var(--hedge5-first-color);
}

.hedge5-dropdown__title {
  font-size: var(--hedge5-small-font-size);
  font-weight: var(--hedge5-font-semi-bold);
  color: var(--hedge5-title-color);
}

.hedge5-dropdown__list {
  row-gap: 0.25rem;
}

.hedge5-dropdown__link {
  font-size: var(--hedge5-smaller-font-size);
  font-weight: var(--hedge5-font-medium);
  color: var(--hedge5-text-color);
  transition: color 0.3s;
}

.hedge5-dropdown__link:hover {
  color: var(--hedge5-title-color);
}

/* Rotate dropdown icon */
.hedge5-show-dropdown .hedge5-dropdown__arrow {
  transform: rotate(180deg);
}

/*=============== DESKTOP DROPDOWN STYLES ===============*/
@media screen and (min-width: 1118px) {
  .hedge5-nav {
    height: calc(var(--header-height) + 2rem); /* Exact same calculation as index.html */
    display: flex;
    justify-content: space-between;
  }
  .hedge5-nav__toggle {
    display: none;
  }
  .hedge5-nav__list {
    display: flex;
    column-gap: 3rem;
    height: 100%;
  }
  .hedge5-nav li {
    display: flex;
  }
  .hedge5-nav__link {
    padding: 0;
  }
  .hedge5-nav__link:hover {
    background-color: initial;
  }

  .hedge5-dropdown__button {
    column-gap: 0.25rem;
    pointer-events: none;
  }
  .hedge5-dropdown__container {
    height: max-content;
    position: absolute;
    left: 0;
    background-color: rgba(9, 24, 37, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(114, 161, 222, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    right: 0;
    top: 6.5rem;
    background-color: var(--hedge5-body-color);
    box-shadow: 0 6px 8px hsla(220, 68%, 12%, 0.05);
    pointer-events: none;
    opacity: 0;
    transition: top 0.4s, opacity 0.3s;
  }
  .hedge5-dropdown__content {
    grid-template-columns: repeat(4, max-content);
    column-gap: 6rem;
    max-width: 1120px;
    margin-inline: auto;
    padding: 1rem 2rem;
  }
  .hedge5-dropdown__group {
    padding: 2rem 0;
    align-content: baseline;
    row-gap: 1.25rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 1.5rem;
    transition: background-color 0.3s ease;
  }
  .hedge5-dropdown__group:first-child, .hedge5-dropdown__group:last-child {
    margin: 0;
  }
  .hedge5-dropdown__list {
    row-gap: 0.75rem;
  }
  .hedge5-dropdown__icon {
    width: 60px;
    height: 60px;
    background-color: var(--hedge5-first-color-lighten);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
  }
  .hedge5-dropdown__icon i {
    font-size: 2rem;
  }
  .hedge5-dropdown__title {
    font-size: var(--hedge5-normal-font-size);
    color: #fff !important;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(114, 161, 222, 0.2);
  }
  .hedge5-dropdown__link {
    font-size: var(--hedge5-small-font-size);
  }
  .hedge5-dropdown__link:hover {
    color: #72a1de !important;
    background-color: rgba(114, 161, 222, 0.1);
    padding: 0.5rem 1rem;
    margin: 0 -1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
  }
  .hedge5-dropdown__item {
    cursor: pointer;
  }
  .hedge5-dropdown__item:hover .hedge5-dropdown__arrow {
    transform: rotate(180deg);
  }
  .hedge5-dropdown__item.hedge5-show-dropdown .hedge5-dropdown__arrow {
    transform: rotate(180deg);
  }
  .hedge5-dropdown__item:hover > .hedge5-dropdown__container {
    top: 5.5rem;
    opacity: 1;
    pointer-events: initial;
    cursor: initial;
  }
  .hedge5-dropdown__item.hedge5-show-dropdown > .hedge5-dropdown__container {
    top: 5.5rem;
    opacity: 1;
    pointer-events: initial;
    cursor: initial;
  }
}

/*=============== LOGO RESPONSIVE STYLES ===============*/
/* Exact same responsive logo sizing as index.html */
@media screen and (max-width: 768px) {
  .hedge5-nav__data > a > img {
    width: 100px;
  }
}

@media screen and (max-width: 480px) {
  .hedge5-nav__data > a > img {
    width: 80px;
  }
}

/*=============== UNIVERSAL FOOTER ===============*/
.hedge5-enhanced-footer {
  background: linear-gradient(135deg, #0B1426 0%, #1A2847 100%);
  color: #e2e8f0;
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.hedge5-enhanced-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(39, 174, 96, 0.1) 0%, transparent 70%);
  z-index: 1;
}

.hedge5-footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.hedge5-footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.hedge5-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hedge5-footer-logo {
  width: 180px;
  height: auto;
  filter: brightness(1.1);
  transition: all 0.3s ease;
}

.hedge5-footer-logo:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.hedge5-footer-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 300px;
}

.hedge5-footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.hedge5-social-link {
  width: 45px;
  height: 45px;
  background: rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4A90E2;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hedge5-social-link:hover {
  background: #4A90E2;
  color: white;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.hedge5-footer-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #4A90E2;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.hedge5-footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(135deg, #27AE60, #2ECC71);
  border-radius: 2px;
}

.hedge5-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hedge5-footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 1rem;
}

.hedge5-footer-links a::before {
  content: '→';
  position: absolute;
  left: 0;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.hedge5-footer-links a:hover {
  color: #4A90E2;
  padding-left: 1.5rem;
}

.hedge5-footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.hedge5-footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hedge5-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.hedge5-contact-item i {
  color: #27AE60;
  font-size: 1.1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* ========== Footer Bottom ========== */
.hedge5-footer-bottom {
  border-top: 1px solid rgba(74, 144, 226, 0.2);
  padding-top: 2rem;
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  color: #94a3b8;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.hedge5-footer-copyright p {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.hedge5-footer-legal {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hedge5-footer-legal a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
  position: relative;
}

.hedge5-footer-legal a:hover {
  color: #4A90E2;
}

.hedge5-footer-legal a:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: -1.2rem;
  color: #4A90E2;
  opacity: 0.5;
}

/*=============== SCROLL TO TOP BUTTON ===============*/
.hedge5-scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #27AE60, #2ECC71);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(39, 174, 96, 0.3);
}

.hedge5-scroll-to-top:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 30px rgba(39, 174, 96, 0.4);
}

.hedge5-scroll-to-top.hedge5-visible {
  opacity: 1;
  visibility: visible;
}

/*=============== RESPONSIVE DESIGN ===============*/
@media (max-width: 1024px) {
  .hedge5-footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .hedge5-footer-container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .hedge5-enhanced-footer {
    padding: 3rem 0 2rem;
  }
  
  .hedge5-footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .hedge5-footer-social {
    justify-content: center;
  }
  
  .hedge5-footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .hedge5-footer-legal {
    justify-content: center;
  }
  
  .hedge5-scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hedge5-footer-container {
    padding: 0 1rem;
  }
  
  .hedge5-footer-logo {
    width: 150px;
  }
  
  .hedge5-footer-social {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hedge5-social-link {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .hedge5-footer-legal {
    flex-direction: column;
    gap: 1rem;
  }
}
