/* Custom styles for Remaining84 landing page */

/* Logo specific styles - prevent hover and focus effects */
.logo-link {
  transition: none !important;
  transform: none !important;
}

.logo-link:hover, 
.logo-link:focus, 
.logo-link:active {
  transform: none !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.logo-link:focus img, 
.logo-link:active img, 
.logo-link:hover img {
  transform: none !important;
}

/* Image Preview Modal Styles */
.image-preview-mode #modalContent {
  max-width: 90vw;
  background-color: transparent !important;
  box-shadow: none;
}

/* Back to Top Button Styles */
#backToTopBtn {
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 125, 0, 0.3);
  cursor: pointer;
  z-index: 9999;
}

#backToTopBtn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 125, 0, 0.4);
}

#backToTopBtn:active {
  transform: translateY(-2px) scale(0.95);
  transition: transform 0.1s ease;
}

.image-preview-mode #modalImage {
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(255, 125, 0, 0.1);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.image-preview-mode #prevImageBtn,
.image-preview-mode #nextImageBtn {
  opacity: 0.85;
  transition: all 0.2s ease;
  background-color: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  padding: 12px; /* Larger hit area */
}

.image-preview-mode #prevImageBtn:hover,
.image-preview-mode #nextImageBtn:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  background-color: rgba(255, 125, 0, 0.8); /* Orange brand color */
}

.image-preview-mode #closeModal {
  background-color: rgba(0, 0, 0, 0.7);
  right: 8px;
  top: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 30;
}

/* Logo specific styles - prevent hover and focus effects */
.logo-link {
  transition: none !important;
  transform: none !important;
}

.logo-link:hover, 
.logo-link:focus, 
.logo-link:active {
  transform: none !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.logo-link:focus img, 
.logo-link:active img, 
.logo-link:hover img {
  transform: none !important;
}

/* Remove focus outline on navigation links */
.nav-link:focus,
.nav-link:focus-visible,
.nav-link:active,
.nav-link:focus-within,
header nav a:focus,
header nav a:focus-visible,
header nav a:active,
header nav a:focus-within,
footer a:focus,
footer a:focus-visible,
footer a:active,
footer a:focus-within {
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  border: none !important;
  -webkit-tap-highlight-color: transparent !important;
  /* For Webkit browsers like Chrome/Safari */
}

/* Back to top button styles */
#backToTopBtn {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

#backToTopBtn.flex {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(255, 125, 0, 0.3);
}

@media (max-width: 640px) {
  #backToTopBtn {
    bottom: 16px;
    right: 16px;
    padding: 8px;
  }
}

/* Animation for keyboard navigation hint */
@keyframes fadeInOut {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.image-preview-mode::after {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  animation: fadeInOut 2s infinite;
  pointer-events: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhance clickable area for closing modal */
.image-preview-mode {
  cursor: pointer; 
  backdrop-filter: blur(8px); 
  background-color: rgba(0, 0, 0, 0.75) !important; 
}

.image-preview-mode #modalContent {
  cursor: default; 
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important; 
}

/* Animation for glowing dots */
.glow-dot {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* Modern highlight animation for #Remaining84 */
@keyframes highlightPulse {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 0 0 rgba(255, 125, 0, 0);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 10px rgba(255, 125, 0, 0.4);
  }
  100% {
    background-position: 0% 50%;
    box-shadow: 0 0 0 rgba(255, 125, 0, 0);
  }
}

@keyframes slowPulse {
  0% {
    opacity: 0.2;
    transform: scale(1);
    filter: blur(0px);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.05);
    filter: blur(2px);
  }
  100% {
    opacity: 0.2;
    transform: scale(1);
    filter: blur(0px);
  }
}

.animate-slow-pulse {
  animation: slowPulse 3s ease-in-out infinite;
}

.highlight-text {
  animation: highlightPulse 4s infinite;
  background-size: 200% 200%;
  border-bottom: 2px solid rgba(255, 125, 0, 0.4);
  padding-bottom: 2px;
  background-image: linear-gradient(
    to right,
    #FF7D00,
    #FFB36B,
    #FF7D00,
    #FDBA74,
    #FF7D00
  );
}

/* Custom animations for elements */
.fade-in {
  animation: fadeIn 1.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover effect for buttons and clickable elements */
.hover-grow {
  transition: transform 0.3s ease;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background-color: #FF7D00;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #e67100;
}

:focus {
  outline: 2px solid #FF7D00;
  outline-offset: 2px;
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* Mobile navigation - additional styles */
@media (max-width: 768px) {
  .mobile-menu-open {
    display: block;
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Card hover effects */
.info-card {
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Custom styles for form elements */
input:focus, textarea:focus {
  border-color: #FF7D00;
  box-shadow: 0 0 0 3px rgba(255, 125, 0, 0.2);
}

#mobile-menu.mobile-menu-open {
  opacity: 1;
  transform: translateY(0);
}

/* Additional accessibility features */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Advanced animation for statistics counter */
.counter-animation {
  display: inline-block;
  position: relative;
}

.counter-animation::after {
  content: '+';
  position: relative;
  margin-left: 2px;
}

/* Vision Section Styles */
#vision .flex-col {
  min-height: 100%;
}

#vision .grid {
  min-height: 520px;
}

/* Additional custom styles for video player */
#play-button {
    transition: opacity 0.3s ease;
}
#play-button.opacity-0 {
    opacity: 0;
}
#play-button.hidden {
    display: none;
}

/* Ensure the approach box and globe image align at the bottom */
@media (min-width: 768px) {
  #vision .grid {
    align-items: stretch;
  }
}

/* Responsive adjustments for vision section */
@media (max-width: 767px) {
  #vision .grid > div {
    min-height: auto;
  }
  
  #vision .flex-col {
    gap: 2rem;
  }
  
  #vision .flex-col > div:last-child {
    margin-top: 2rem;
  }
}

/* Globe image styles - no transform animation */

/* Ensure globe image doesn't overflow on larger screens */
@media (min-width: 1280px) {
  #vision .flex-col img.max-w-md {
    max-width: 90%;
  }
}
