/* ================================
HEADER
================================ */

header{

position:fixed;
top:0;
left:0;
width:100%;
z-index:1000;
height:var(--header-height);
background:rgba(243, 245, 249, 0.9);
backdrop-filter:blur(12px);
border-bottom:1px solid var(--border);
}

.nav-container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
}

.nav-links{
  display:flex;
  align-items:center;
  justify-content:center;
  max-width:900px;
  margin:auto;
  gap:25px;
  flex:1;
}

.nav-item {
    font-weight:500;
    font-size:0.95rem;
    transition:0.2s;
}

.nav-item:hover{

color:var(--primary);
}

.brand{
  flex-shrink:0;
}

/* =========================
   HEADER SEARCH
========================= */
.nav-search input {
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  outline: none;
  min-width: 160px;
  transition: 0.2s ease;
}

.nav-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.nav-search{
  flex-shrink:0;
}

/* =========================
   NAV DROPDOWN (ABOUT)
========================= */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: -40px;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  min-width: 180px;
  display: none;
  flex-direction: column;
  padding: 8px 0;
  z-index: 1000;
}

.dropdown-menu a {
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: #f1f5f9;
  color: var(--primary);
}

/* Show on hover */
.dropdown:hover .dropdown-menu {
   position: absolute;
  display: flex;
}


/* =============
Home PAGE HERO
================ */
.home-icon{
  width:22px;
  height:22px;
  cursor:pointer;
  vertical-align:middle;
  transition:transform 0.2s ease;
}

.home-icon:hover{
  transform:scale(1.15);
}

/* ================================
AUTOMATIC HERO SLIDESHOW
================================ */

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;       /* full viewport height */
  display: flex;
  flex-direction: column;
  justify-content: center;  /* vertically center slides */
  overflow: hidden;
}

/* Slides container */
.hero-slideshow {
  position: absolute;   /* absolute inside hero */
  background: rgb(9, 5, 146); /* or your dominant color */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;         /* fills entire hero section */
  overflow: hidden;
  z-index: 1;
}

/* Individual slides */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;

  opacity: 0;
  transition: opacity 0.6s ease; /* opacity 1.2s ease-in-out */
  transform: none; /* remove vertical shift */
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide.prev {
  opacity: 0;
  z-index: 2; /* stays on top while fading out */
}

/* Images inside slides */
.hero-image {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;/* ensures image covers area without distortion */
  object-position: center top; /* prevents top from being cut */
  transition: opacity 1.2s ease, transform 6s ease-out; /* fade in + zoom */
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;    
  opacity: 0;
  transition: opacity 1.2s ease, transform 6s ease-out; 
}

.hero-image,
.hero-video {
  transform: scale(1.05);   /* starting zoom */
  transition: opacity 0.6s ease,
    transform var(--duration, 5s) ease-out;
}

.slide.active .hero-image,
.slide.active .hero-video {
  transform: scale(1);      /* zoom OUT smoothly */
  opacity: 1;
}

.slide .hero-video {
  transition: transform 6s ease-out;
}

.slide img[src*="RareEventComputerVisionAnalyticsPlatform"] {
  object-position: top center;
}

.slide.active .hero-video {
  transform: scale(1);
}

/* Hero content: text + button */
.hero-content {
  position: absolute;
  bottom: 40px;        /* space from bottom */
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;          /* above images */
}

/* Hero text animation */
.hero-text {
  font-size: 1.5rem;
  color: rgba(22, 240, 237, 0.721); /* can adjust color */
  margin-bottom: 15px;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.hero-text-white-bg {
  font-size: 1.5rem;
  color: rgb(7, 14, 116); /* can adjust color */
  margin-bottom: 15px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.hero-text.show {
  opacity: 1;
  transform: translateY(0);
}

/* Call-to-action button */
.hero-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.hero-btn:hover {
  background: #1e40af;
  transform: scale(1.05);
}

/* Progress bars at bottom */
.hero-progress {
  position: absolute;
  bottom: 0;          /* pinned at bottom of hero */
  left: 0;
  width: 100%;
  display: flex;
  height: 4px;
  z-index: 4;         /* above slides */
}

.hero-progress span {
  flex: 1;
  background: rgba(255,255,255,0.3);
  margin: 0 2px;
  position: relative;
  overflow: hidden;
}

.hero-progress span::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: white;
}

.hero-progress span.active::after {
  animation: progressAnim var(--duration, 5s) linear forwards;
}

.hero-controls {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}

.hero-controls button:hover {
  background: rgba(0,0,0,0.8);
}

@keyframes progressAnim {
  from { width: 0%; }
  to { width: 100%; }
}

/* =================================
GITHUB STYLE ICONS
================================ */
.github-icon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: middle;
  transition: transform 0.2s ease;
 
}
.github-icon:hover {
  transform: scale(1.1);
}

/* =========================
   HEADER ROWS
========================= */

.nav-row {
  width: 100%;
  display: flex;
  align-items: center;
}

/* ROW 1 */
.nav-top{
  display:flex;
  align-items:center;
  width:100%;
}


/* Ensure nav-links align right */
.nav-bottom .nav-links {
  width: auto;
  justify-content: flex-end;
}

/* SEARCH sizing */
.nav-top .nav-search {
  min-width: 220px;
}

/* Always show icon, hide input by default on small screens */
.nav-search {
  position: relative;
}
.nav-search-container {
  position: relative; /* anchor for absolute input */
  display: flex;
  align-items: center;
  gap: 8px; /* space between input and icon */
  width: 40px; /* only space for icon */
  flex-shrink: 0;
  margin-left: 16px;
}

#siteSearch {
  position: absolute;
  right: 0px; /* anchor to right edge */
  top: 50%;
  transform: translateY(-50%);

  width: 0;
  opacity: 0;

  padding: 6px 10px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: white;

  transition: all 0.25s ease;
  pointer-events: none; /* prevent interaction when hidden */
}

#siteSearch.show {
  width: 180px;
  opacity: 1;
  pointer-events: auto;
}


/* Always keep search icon visible */
.search-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2; /* stays above input */
}

@media(min-width: 768px) {

#siteSearch{
  width:0;
  opacity:0;
  overflow:hidden;
  white-space: nowrap;
  transition:all .25s ease;
}

#siteSearch.show{
  width:180px;
  opacity:1;
  pointer-events: auto;
}

}

/* ================================
FOOTER
================================ */

footer{
margin-top:40px;
border-top:2px solid var(--bg-footerline);
color:var(--text-muted);
background:var(--bg-body);

}

footer .container{
padding:30px 20px;
text-align:center;
font-size:.9rem;
}

footer p{
    margin:0;
}
      
/*footer powered by*/
.footer-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.footer-role {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 10px;
}

.footer-contact {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-contact a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* Links */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.7;
}
/* Tablet and Mobile Adjustments */
@media (max-width: 768px) {
  footer {
    /* Reduced from 80px to 40px */
    margin-top: 40px; 
  }

  footer .container {
    /* Reduced top/bottom to 30px; kept sides at 20px */
    padding: 30px 20px;
    /* Optional: boost font size slightly for readability on small screens */
    font-size: 1rem; 
  }
  footer p{
    margin:0;
  }
  .footer-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

  .footer-role {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 10px;
  }

  .footer-contact {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .footer-contact a {
    color: var(--text-muted);
    text-decoration: none;
  }

  .footer-contact a:hover {
    text-decoration: underline;
  }

/* Links */
  .footer-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
  }

  .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: opacity 0.2s ease;
  }

  .footer-links a:hover {
    opacity: 0.7;
  }  
}
