/*
File: footer.css - Complete tidied version matching index 3
Purpose: Footer layout, social icons with simple scaling, carousel without highlights
Dependencies: style.css (custom properties)
Load Order: 7th (after content.css)
*/

/* ===== FOOTER CONTAINER ===== */
footer {
  background: linear-gradient(to bottom, rgba(27, 81, 55, 0) 0%, var(--forest-green) 20%, var(--forest-green) 100%);
  display: flex;
  flex-direction: column;
  margin-top: 4rem;
  padding: 2rem 0;
  position: relative;
  text-align: center;
  width: 100vw;
  z-index: var(--z-base);
}

.footer-content {
  display: flex;
  filter: none;
  flex: 1;
  padding: 2rem;
  position: relative;
}

/* ===== FOOTER SECTIONS ===== */
.footer-left {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0 1rem;
  position: relative;
  width: 30%;
}

.footer-center {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 0 1rem;
  text-align: center;
  width: 50%;
}

.footer-right {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1rem;
  width: 20%;
}

/* ===== FOOTER LINKS - NO HIGHLIGHTS ===== */
.footer-left a {
  color: var(--text-color);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: var(--font-weight-normal);
  position: relative;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition-base);
  width: 45%;
  z-index: 1;
  padding: 0.3rem 0;
  border-radius: var(--radius-sm);
  border: none !important;
  outline: none !important;
}

.footer-left a:hover {
  color: var(--text-color);
  font-weight: var(--font-weight-semibold);
  transform: none;
  background: transparent;
}

/* Remove all footer link highlight systems */
.footer-left::before {
  display: none !important;
}

.footer-left.highlight-active::before {
  display: none !important;
}

.footer-left a.clicked {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  transform: none !important;
}

/* ===== FOOTER CENTER - SOCIAL SECTION ===== */
.footer-center h3 {
  color: var(--text-color);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: var(--font-weight-bold);
  margin: 0 0 1.5rem 0;
}

/* ===== SOCIAL ICONS SYSTEM - FIXED TO MATCH INDEX 3 ===== */
.social-icons {
  align-items: center;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
}

.social-account-wrapper {
  position: relative;
}

/* Social icon - simple scaling on hover, NO rotation or glow */
.social-icon {
  position: relative;
  z-index: 1;
  display: block;
  height: 48px;
  transition: transform 0.3s ease;
  width: 48px;
}

.social-icon:hover {
  transform: scale(1.15); /* Simple scaling only */
}

.social-icon svg {
  display: block;
  fill: var(--text-color);
  height: 100%;
  width: 100%;
}

/* Platform-specific scaling to match index 3 */
.social-icon.FaceBook {
  scale: 1.4;
}

.social-icon.X {
  scale: 0.85;
}

.social-icon.YouTube {
  scale: 1.2;
}

.social-icon.TikTok {
  scale: 1.0;
}

.social-icon.Instagram {
  scale: 1.0;
}

.social-icon.LinkedIn {
  scale: 1.0;
}

/* ===== SOCIAL ACCOUNT POPUPS - FIXED ALIGNMENT ===== */
.account-popup {
  backdrop-filter: blur(10px);
  background: rgba(79, 154, 168, 0.95);
  border-radius: var(--radius-md);
  top: 100%;
  left: 50%;
  margin-top: 16px;
  width: auto;
  opacity: 0;
  padding: 12px 0px;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%) translateY(10px);
  transition: all var(--transition-base);
  visibility: hidden;
  z-index: var(--z-tooltip);
  white-space: nowrap;
}

.social-account-wrapper .account-popup {
  display: block !important;
}

.social-account-wrapper:has(.account-badges .account-badge:first-child:last-child) .account-popup {
  display: block !important;
}

.account-popup::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 8px solid rgba(79, 154, 168, 0.95);
  content: '';
  height: 0;
  left: 50%;
  position: absolute;
  bottom: 100%;
  transform: translateX(-50%);
  width: 0;
}

.social-account-wrapper:hover .account-popup {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  transition-delay: 0s;
}

.social-account-wrapper .account-popup {
  transition-delay: 500ms;
}

.social-account-wrapper:hover .account-popup {
  transition-delay: 0s;
}

/* ===== ACCOUNT BADGES ===== */
.account-badges {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
}

.account-badge {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: 0;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  border-radius: var(--radius-md);
  padding: 2px;
  min-width: 70px;
}

.account-badge::before {
  content: '';
  position: absolute;
  background: var(--highlight-color);
  border-radius: var(--radius-md);
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.account-badge:hover::before {
  opacity: 1;
}

.account-badge:hover {
  transform: scale(1.1);
}

.account-badge-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-round);
  display: flex;
  height: 60px;
  justify-content: center;
  margin-bottom: 2px;
  overflow: hidden;
  position: relative;
  width: 60px;
  z-index: 1;
}

.account-badge-icon img {
  border-radius: var(--radius-round);
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.account-badge-label {
  color: var(--text-color);
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: var(--font-weight-normal);
  margin-top: 2px;
  opacity: 0.9;
  position: relative;
  text-align: center;
  z-index: 1;
}

.account-badge:hover .account-badge-label {
  opacity: 1;
}

/* Force highlight for SOEC when main icon is hovered */
.account-badge.force-highlight::before {
  opacity: 1;
}

.account-badge.force-highlight {
  transform: scale(1.1);
}

/* Dynamic width adjustments based on number of badges */
.account-popup:has(.account-badges .account-badge:nth-child(1):last-child) {
  min-width: 80px;
}

.account-popup:has(.account-badges .account-badge:nth-child(2):last-child) {
  min-width: 140px;
}

.account-popup:has(.account-badges .account-badge:nth-child(3):last-child) {
  min-width: 200px;
}

.account-popup:has(.account-badges .account-badge:nth-child(4)) {
  min-width: 260px;
}

/* ===== SUPPORT BUTTON ===== */
.support-button {
  background: var(--rust-red);
  border-radius: 10px;
  color: var(--text-color);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  padding: 1rem 2rem;
  text-decoration: none;
  transition: all var(--transition-smooth);
  transform: scale(1);
  filter: brightness(1);
  box-shadow: var(--shadow-sm);
  display: inline-block;
}

.support-button:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
  box-shadow: var(--shadow-lg);
  background: var(--rust-red);
}

/* ===== COPYRIGHT ===== */
.copyright {
  color: var(--text-color);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* ===== CONVEYOR BELT SYSTEM - MATCHING INDEX 3 ===== */
.banner {
  align-items: center;
  background-color: rgba(79, 154, 168, 0.6);
  display: flex;
  flex-direction: column;
  height: 170px;
  overflow: hidden;
  position: relative;
}

.ticker-container {
  align-items: flex-start;
  display: flex;
  height: 170px;
  overflow: hidden;
  padding-top: 10px;
  position: relative;
  width: 100%;
}

.ticker-wrapper {
  display: flex;
  white-space: nowrap;
  width: max-content;
  transition: transform 0.5s ease;
}

/* ===== TICKER ITEMS - NO HIGHLIGHTS ===== */
.ticker-item {
  align-items: center;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
  min-width: 175px;
  padding: 0 30px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
  z-index: var(--z-base);
  text-decoration: none;
  border: none !important;
  outline: none !important;
}

.ticker-item img {
  cursor: pointer;
  filter: brightness(1.1);
  height: 100px;
  margin-bottom: 8px;
  max-width: 100px;
  width: auto;
  transition: all var(--transition-base);
}

.ticker-item-title {
  font-size: 12pt;
  line-height: 1.4;
  max-width: 180px;
  text-align: center;
  word-wrap: break-word;
  transition: all var(--transition-base);
}

/* COMPLETELY REMOVE ticker item highlight effects */
.ticker-item::before {
  display: none !important;
}

.ticker-item:hover::before,
.ticker-item.clicked::before {
  display: none !important;
}

.ticker-item.clicked {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  transform: none !important;
}

/* Optional subtle hover effects (no orange borders) */
@media (min-width: 769px) {
  .ticker-item:hover {
    transform: translateY(-2px);
  }
  
  .ticker-item:hover img {
    filter: brightness(1.2);
  }
}

/* ===== TICKER SEPARATORS ===== */
.separator {
  align-self: center;
  background-color: rgba(255, 255, 255, 0.65);
  flex-shrink: 0;
  height: 80%;
  margin: 0 10px;
  width: 1px;
}

/* ===== TICKER CONTROL BUTTONS ===== */
.ticker-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: var(--radius-round);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: var(--z-content);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.banner.show-left-arrow .ticker-control-left,
.banner.show-right-arrow .ticker-control-right {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.ticker-control:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-hover);
}

.ticker-control-left {
  left: 15px;
}

.ticker-control-right {
  right: 25px;
}

/* Arrow cut-out effect using clip-path */
.ticker-control::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(79, 154, 168, 0.8);
  clip-path: polygon(40% 0%, 40% 35%, 100% 35%, 100% 65%, 40% 65%, 40% 100%, 0% 50%);
}

.ticker-control-right::before {
  clip-path: polygon(60% 0%, 60% 35%, 0% 35%, 0% 65%, 60% 65%, 60% 100%, 100% 50%);
}

/* ===== TICKER FADE EFFECTS ===== */
.fade-left,
.fade-right {
  bottom: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 80px;
  z-index: var(--z-content);
}

.fade-left {
  background: linear-gradient(to right, rgba(116,156,152,0.9) 0%, rgba(116,156,152,0) 100%);
  left: 0;
}

.fade-right {
  background: linear-gradient(to left, rgba(76,124,123,0.9) 0%, rgba(76,124,123,0) 100%);
  right: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Desktop hover behaviors */
@media (min-width: 769px) {
  .banner.show-left-arrow .ticker-control-left,
  .banner.show-right-arrow .ticker-control-right {
    opacity: 1;
    visibility: visible;
  }
}

/* Mobile behaviors */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
    position: relative;
  }
  
  .footer-center {
    order: 1;
    margin-bottom: 4rem;
    position: relative;
  }
  
  .footer-left {
    order: 2;
  }
  
  .footer-right {
    order: 3;
    margin-top: 1rem;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    width: 100%;
    padding: 0;
  }
  
  .footer-left {
    gap: 1rem;
    justify-content: center;
  }
  
  .footer-left a {
    width: auto;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
  }
  
  .footer-left {
    margin-bottom: 1rem;
  }
  
  .footer-center {
    margin-bottom: 1rem;
  }
  
  .footer-right {
    margin-bottom: 0;
  }
  
  /* Social popup adjustments */
  .social-account-wrapper .account-popup {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 1rem !important;
    width: auto !important;
    min-width: 280px !important;
    max-width: 90vw !important;
    background: rgba(79, 154, 168, 0.95) !important;
    border-radius: var(--radius-md) !important;
    padding: 15px !important;
    z-index: var(--z-overlay) !important;
    box-shadow: var(--shadow-lg) !important;
  }

  .social-account-wrapper .account-popup::after {
    display: none !important;
  }
  
  /* Ticker controls always visible on mobile */
  .banner.in-viewport .ticker-control {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }
  
  .ticker-control {
    width: 45px;
    height: 45px;
  }
  
  .social-icon:hover {
    transform: scale(1.1);
  }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
  .footer-content {
    padding: 1rem;
  }
  
  .footer-center h3 {
    font-size: 1.2rem;
  }
  
  .social-icons {
    gap: 1rem;
  }
  
  .support-button {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ===== ACCESSIBILITY FEATURES ===== */
/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .ticker-wrapper {
    transition: none;
  }
  
  .ticker-item,
  .ticker-item img,
  .social-icon,
  .account-badge {
    transition: opacity var(--transition-fast);
    transform: none !important;
  }
  
  .ticker-control:hover,
  .support-button:hover,
  .social-icon:hover {
    transform: none !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .banner {
    background-color: rgba(79, 154, 168, 0.9);
  }
  
  .footer-left a {
    border: 1px solid var(--text-color);
  }
}

/* Focus states for keyboard navigation */
.ticker-item:focus-visible,
.social-icon:focus-visible,
.account-badge:focus-visible,
.support-button:focus-visible {
  outline: 3px solid var(--highlight-color);
  outline-offset: 4px;
}

.ticker-control:focus-visible {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  footer {
    background: none;
    color: #000;
  }
  
  .banner,
  .account-popup,
  .ticker-control {
    display: none;
  }
  
  .social-icon {
    filter: none;
  }
  
  .support-button {
    background: #666;
    color: #fff;
    box-shadow: none;
  }
}

/* ===== HOVER-BASED ORANGE HIGHLIGHTING (Replace the previous highlighting CSS) ===== */

/* Remove the permanent .active-link highlighting - now it's hover-based */
.account-badge.active-link {
  /* Remove permanent highlighting - this was causing all badges to be highlighted */
}

.account-badge.active-link::before {
  /* Remove permanent highlighting */
  display: none;
}

/* HOVER-BASED highlighting for individual badges */
.account-badge.hover-highlight::before {
  content: '';
  position: absolute;
  background: #e1a038 !important; /* Orange highlight */
  border: 2px solid #e1a038 !important;
  border-radius: var(--radius-md);
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 1 !important;
  box-shadow: 0 0 8px rgba(225, 160, 56, 0.4) !important;
  z-index: -1;
}

.account-badge.hover-highlight {
  transform: scale(1.1) !important;
}

.account-badge.hover-highlight .account-badge-label {
  opacity: 1;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* PRIMARY ACCOUNT highlighting when main social icon is hovered */
.account-badge.main-icon-highlight::before {
  content: '';
  position: absolute;
  background: #e1a038 !important; /* Orange highlight */
  border: 2px solid #e1a038 !important;
  border-radius: var(--radius-md);
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 1 !important;
  box-shadow: 0 0 12px rgba(225, 160, 56, 0.6) !important;
  z-index: -1;
}

.account-badge.main-icon-highlight {
  transform: scale(1.08) !important;
}

.account-badge.main-icon-highlight .account-badge-label {
  opacity: 1;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Default state - no permanent highlighting */
.account-badge {
  position: relative;
}

.account-badge::before {
  content: '';
  position: absolute;
  background: var(--highlight-color);
  border-radius: var(--radius-md);
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0; /* Hidden by default */
  transition: opacity var(--transition-base);
  z-index: -1;
}

/* Regular hover effect (subtle) */
.account-badge:hover::before {
  opacity: 0.3; /* Subtle highlight on regular hover */
}

.account-badge:hover {
  transform: scale(1.05);
}

/* Override regular hover when special highlights are active */
.account-badge.hover-highlight:hover::before,
.account-badge.main-icon-highlight:hover::before {
  opacity: 1 !important;
  background: #e1a038 !important;
  border: 2px solid #e1a038 !important;
  box-shadow: 0 0 12px rgba(225, 160, 56, 0.6) !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .account-badge.hover-highlight,
  .account-badge.main-icon-highlight {
    transform: scale(1.08) !important;
  }
}