/* ==========================================
   RCoE-EANSI — Main Stylesheet
   ========================================== */

/* ========== GLOBAL RESET & VARIABLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green-primary: #0E9E4B;
  --green-dark: #0b853f;
  --green-darker: #096a33;
  --green-deep: #075528;
  --green-light: #e8f5ec;
  --gold: #FED24F;
  --gold-dark: #d4a017;
  --white: #ffffff;
  --text-dark: #1e2a1e;
  --text-soft: #4a5a4a;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.18);
  --font-serif: 'Bookman Old Style', 'Times New Roman', serif;
  --font-sans: 'Open Sans', 'Segoe UI', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

body {
  font-family: var(--font-sans);
  background: #f0f2f1;
  color: var(--text-dark);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== HEADER ========== */
.iucea-header {
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

/* --- TOP GREEN BAR --- */
.top-green-bar {
  background-color: var(--green-primary);
  padding: 22px 0;
  border-bottom: 5px solid var(--green-dark);
  position: relative;
  min-height: 130px;
}

.top-green-bar .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

.language-switcher {
  position: absolute;
  top: -34px;
  right: -10px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 13px;
  z-index: 10;
}

.language-switcher a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.language-switcher a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.language-switcher .francais-link {
  font-weight: 700;
}

.language-switcher .divider {
  color: #ffffff;
  opacity: 0.4;
}

.language-switcher .globe-icon {
  color: #ffffff;
  font-size: 13px;
  opacity: 0.7;
}

.left-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
  margin-left: 40px;
}

.left-logo img {
  height: auto;
  width: 95px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.left-logo img:hover {
  transform: scale(1.02);
}

.right-section {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-shrink: 0;
}

.right-logo img {
  height: auto;
  width: 95px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.right-logo img:hover {
  transform: scale(1.02);
}

.rcoe-title {
  color: #ffffff;
  font-size: 26px;
  font-family: var(--font-serif);
  font-weight: 700;
  text-align: center;
  padding: 10px 25px;
  letter-spacing: 0.6px;
  flex: 1;
  min-width: 260px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  line-height: 1.4;
}

.rcoe-title i {
  margin-right: 14px;
  opacity: 0.95;
  font-size: 28px;
}

/* ========== MENU BAR ========== */
.header-bar {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(14, 158, 75, 0.15);
  padding: 0 20px;
  position: relative;   /* changed from sticky — flyover JS handles positioning */
  width: 100%;
  z-index: 100;
}

/* Spacer holds the menu's place when flyover activates */
.header-bar-spacer {
  display: none;
  width: 100%;
}

.header-bar-spacer.active {
  display: block;
}

.header-bar > ul {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 0;
}

.header-bar > ul > li {
  position: relative;
}

/* Bridge: invisible padding so mouse can travel to dropdown safely */
.header-bar > ul > li::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 20px;
  background: transparent;
  pointer-events: auto;
  z-index: 150;
}

.header-bar > ul > li:not(.has-dropdown)::after {
  display: none;
}

.header-bar > ul > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: #1e3b1e;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  border-radius: 4px;
  white-space: nowrap;
  position: relative;
  z-index: 160;
}

.header-bar > ul > li > a i {
  color: var(--green-primary);
  font-size: 16px;
  width: 20px;
  text-align: center;
  transition: transform 0.2s;
}

.header-bar > ul > li > a:hover {
  background: rgba(14, 158, 75, 0.06);
  color: var(--green-dark);
}

.header-bar > ul > li > a:hover i {
  transform: scale(1.1);
}

.header-bar > ul > li.has-dropdown > a:after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  margin-left: 6px;
  opacity: 0.5;
  color: var(--green-primary);
  transition: transform 0.2s;
}

.header-bar > ul > li.has-dropdown:hover > a:after {
  transform: rotate(180deg);
}

/* ========== SUBMENU (GREEN) ========== */
.header-bar .sub-nav {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--green-primary);
  min-width: 290px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 10px 0;
  display: none;
  flex-direction: column;
  z-index: 200;
  border-top: 4px solid var(--gold);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-bar li:hover > .sub-nav {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.header-bar .sub-nav li {
  position: relative;
  list-style: none;
}

.header-bar .sub-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-weight: 500;
  font-size: 13.5px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: normal;
  line-height: 1.4;
  border-left: 3px solid transparent;
}

.header-bar .sub-nav li a i {
  font-size: 14px;
  width: 20px;
  text-align: center;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.header-bar .sub-nav li a:hover {
  background: var(--green-dark);
  color: var(--gold);
  border-left-color: var(--gold);
  padding-left: 24px;
}

.header-bar .sub-nav li a:hover i {
  transform: scale(1.15);
  color: var(--gold);
}

.header-bar .sub-nav .sub-nav {
  top: -10px;
  left: 100%;
  margin-left: 6px;
  border-top-color: var(--gold);
  background: var(--green-dark);
  min-width: 310px;
  max-width: 380px;
}

.header-bar .sub-nav .sub-nav li a {
  padding: 9px 20px;
  font-size: 13px;
}

.header-bar .sub-nav .sub-nav li a:hover {
  background: var(--green-darker);
}

.header-bar .sub-nav li.has-dropdown > a {
  position: relative;
}

.header-bar .sub-nav li.has-dropdown::after {
  content: '';
  position: absolute;
  top: 0;
  left: 100%;
  width: 10px;
  height: 100%;
  background: transparent;
  pointer-events: auto;
  z-index: 250;
}

.header-bar .sub-nav li.has-dropdown > a:after {
  content: '\f054';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  margin-left: auto;
  opacity: 0.7;
  color: var(--gold);
}

.header-bar > ul > li:nth-last-child(-n+2) .sub-nav {
  left: auto;
  right: 0;
}

.header-bar > ul > li:nth-last-child(-n+2) .sub-nav .sub-nav {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 6px;
}

.sub-nav .sub-nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 6px 16px;
}

/* ========== FLYOVER MENU (appears on scroll up) ========== */
.header-bar.flyover {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  background: var(--white);
  border-bottom: 3px solid var(--green-primary);
  padding: 0 20px;
}

.header-bar.flyover.visible {
  transform: translateY(0);
}

.header-bar.flyover > ul > li > a {
  padding: 14px 16px;
  font-size: 13.5px;
}

.header-bar.flyover::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: var(--scroll-progress, 0%);
  background: var(--gold);
  transition: width 0.1s linear;
}

/* Keep tall submenus scrollable in flyover mode 
.header-bar.flyover .sub-nav {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}*/

/* ========== MAIN CONTENT ========== */
#main {
  flex: 1;
  background: var(--white);
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 30px;
  text-align: center;
}

.main-content h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--green-primary);
  letter-spacing: -0.5px;
  margin-bottom: 30px;
  border-bottom: 4px solid var(--gold);
  display: inline-block;
  padding-bottom: 12px;
}

.main-content p {
  font-size: 1.2rem;
  color: #2a3e2a;
  max-width: 800px;
  margin: 0 auto 40px;
}

.demo-blocks {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 50px;
}

.demo-block {
  background: #f4faf6;
  border-radius: 20px;
  padding: 40px 25px;
  flex: 1 1 220px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e0efe2;
  transition: transform 0.3s, box-shadow 0.3s;
}

.demo-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.demo-block i {
  font-size: 2.8rem;
  color: var(--green-primary);
  margin-bottom: 20px;
}

.demo-block h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--green-dark);
  margin-bottom: 10px;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--green-primary);
  color: #ffffff;
  padding: 60px 0 20px;
  border-top: 6px solid var(--gold);
}

.footer .wf-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px 50px;
  margin-bottom: 50px;
}

.footer h5 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
  color: #fff;
}

.footer h5:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 3px;
  background: var(--gold);
}

.footer .icon-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.footer .icon-box i {
  font-size: 22px;
  color: var(--gold);
  width: 28px;
  margin-top: 3px;
}

.footer .icon-box .box-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.footer .icon-box .box-content p {
  font-size: 0.85rem;
  opacity: 0.8;
  color: #e0f0e0;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 12px;
}

.footer-nav a {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  transition: padding-left 0.2s, color 0.2s;
  padding: 4px 0;
  border-radius: 4px;
}

.footer-nav a i {
  color: var(--gold);
  width: 20px;
  font-size: 1rem;
}

.footer-nav a:hover {
  padding-left: 6px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: 0.9rem;
  color: #e0f0e0;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--gold);
  text-decoration: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .header-bar > ul > li > a {
    padding: 14px 12px;
    font-size: 13px;
  }
  .header-bar > ul > li > a i {
    font-size: 14px;
    width: 18px;
  }
}

@media (max-width: 1100px) {
  .top-green-bar .container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
  }
  .left-logo { margin-left: 0; order: 1; }
  .left-logo img { width: 80px; }
  .right-logo img { width: 80px; }
  .rcoe-title {
    font-size: 20px;
    order: 2;
    padding: 8px 10px;
    width: 100%;
  }
  .right-section {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .language-switcher {
    position: relative;
    top: 0;
    right: 0;
    align-self: center;
    margin-bottom: 5px;
  }
  .header-bar > ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-bar .sub-nav {
    position: static;
    box-shadow: none;
    border-top: none;
    border-left: 4px solid var(--gold);
    margin: 0 0 0 20px;
    opacity: 1;
    transform: none;
    display: none;
    width: calc(100% - 40px);
    min-width: auto;
    padding: 0;
    border-radius: 0;
    background: var(--green-dark);
  }
  .header-bar li:hover > .sub-nav {
    display: flex;
  }
  .header-bar .sub-nav .sub-nav {
    position: static;
    margin-left: 20px;
    border-left-color: var(--gold);
    width: calc(100% - 40px);
    background: var(--green-darker);
  }
  .header-bar > ul > li::after,
  .header-bar .sub-nav li.has-dropdown::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-content h1 { font-size: 2.4rem; }
  .main-content { padding: 50px 20px; }
  .top-green-bar { padding: 16px 0; min-height: auto; }
  .rcoe-title { font-size: 16px; }
  .rcoe-title i { font-size: 18px; }
  .left-logo img, .right-logo img { width: 65px; }
  .header-bar > ul > li > a {
    padding: 12px 10px;
    font-size: 12.5px;
  }
  .header-bar > ul > li > a i {
    font-size: 13px;
    width: 16px;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .rcoe-title { font-size: 13px; }
  .left-logo img, .right-logo img { width: 50px; }
  .header-bar > ul > li > a {
    font-size: 11.5px;
    padding: 10px 8px;
  }
  .language-switcher { font-size: 11px; }
  .main-content h1 { font-size: 1.8rem; }
  .demo-block { padding: 25px 15px; }
}



   /* ==========================================
   HERO CAROUSEL
   ========================================== */
.hero-section {
  width: 100%;
  background: #ffffff;
  padding: 0;
}

.hero-section .container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  background: #0E9E4B;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 30px 50px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
  color: #ffffff;
  text-align: left;
}

.carousel-caption h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
  font-size: 1rem;
  max-width: 800px;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #0E9E4B;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.carousel-btn:hover {
  background: #0E9E4B;
  color: #ffffff;
  transform: scale(1.1);
}

.carousel-indicators {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
  background: #FED24F;
  transform: scale(1.3);
  border-color: #FED24F;
}

@media (max-width: 768px) {
  .carousel-container { height: 340px; }
  .carousel-caption { padding: 20px 15px 30px; }
  .carousel-caption h3 { font-size: 1.1rem; }
  .carousel-caption p { font-size: 0.85rem; }
  .carousel-btn { width: 38px; height: 38px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .carousel-container { height: 240px; }
  .carousel-caption h3 { font-size: 0.95rem; }
  .carousel-caption p { font-size: 0.75rem; }
}



.language-switcher .lang-active {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  cursor: default;
}






/*
:root {
  --font-main: "EB Garamond", "Bookman Old Style", "Times New Roman", serif;
}
html, body, body *, button, input, select, textarea {
  font-family: var(--font-main) !important;
}*/
