html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    
    overflow: auto;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

body::-webkit-scrollbar {
    display: none;  
}

/*BRAND VARIABLES*/
:root {
    --brand-primary: rgb(1, 184, 170);
    --brand-secondary: rgb(1, 106, 184);
    --brand-dark: #0f172a;
    --brand-light: #f8fafc;
    --brand-gray: #9ca3af; /*subtle gray*/
}

/*NAVBAR*/
.main-navbar {
    background: linear-gradient(to right, var(--brand-primary), var(--brand-secondary));
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.school-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    flex-shrink: 0;
}

.system-name {
    color: white;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
    font-size: 30px;
}

/* Navbar links */
.navbar-nav .nav-link {
    color: white !important;
    text-decoration: none;
}

.navbar-nav .nav-link:hover {
    color: white !important; /* text color remains */
    text-decoration: underline; /* underline appears */
    text-decoration-thickness: 2px; /* thickness */
    text-underline-offset: 5px; /* distance from text */
}

/* Active link */
.navbar-nav .nav-link.active {
    color: cyan !important;
}

/* Dropdown arrow animation */
.navbar-nav .dropdown-toggle::after {
    margin-left: 5px; /* space between text and arrow */
    transition: transform 0.3s ease;
}

.navbar-nav .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Dropdown hover */
.dropdown-menu .dropdown-item:hover {
    background-color: rgb(145, 145, 146) !important;
    color: white !important;
    border-radius: 5px;
}

/* Navbar toggler */
.navbar-toggler {
    border: none;
}
.navbar-toggler:focus,
.navbar-toggler:active {
    outline: none;
    box-shadow: none;
}

/* Mobile navbar */
@media (max-width: 991px) {
    .navbar-collapse {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .main-navbar {
        background: linear-gradient(to top, var(--brand-primary), var(--brand-secondary));
    }

    .school-logo {
        width: 32px;
        height: 32px;
    }

    .system-name {
        font-size: 20px;
    }
}

 /*HERO SECTION*/
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;

    /* Light background + subtle gridlines */
    background-color: var(--brand-light);
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero-overlay {
    display: none;
    transition: opacity 1s ease, transform 1s ease;
}

/* Hero content card / paper style */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    color: var(--brand-dark);
}

.hero-content h1 {
    font-size: clamp(1.4rem, 2.5vw, 2.4rem);
    line-height: 1.35;
    font-weight: 700;
}

.hero-title {
    max-width: 900px; /* limits line length for readability */
    font-size: clamp(1.5rem, 3vw, 2.5rem); /* responsive font size */
    font-weight: 700;
    text-align: center;
    color: #222; 
    line-height: 1.4;
    /*margin-bottom: 2rem;*/
    position: relative;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 1s ease, transform 1s ease;
}

/* Subtle logo watermark */
.hero::before {
    content: "";
    position: absolute;
    top: 55%;
    left: 50%;
    width: 450px;
    height: 450px;
    transform: translate(-50%, -50%);
    background: url('/uploads/anrvhslogo.jpg') no-repeat center;
    background-size: contain;
    opacity: 0.30;
    z-index: 0;
}

/* Mobile screens */
@media (max-width: 768px), (max-width: 991px){
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .hero::before {
        top: 49%;
        left: 50%;
        width: 321px; 
        height: 321px;
    }
}

/*CLOCK*/
.hero-clock {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 2;
    background-color: white;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--brand-dark);
    opacity: 0;
    transform: translateY(25px) scale(0.97);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1);
}

.clock-box {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    background-color: var(--brand-dark);
    color: white;
    min-width: 45px;
    text-align: center;
}

.clock-box.ampm {
    background-color: var(--brand-secondary);
}

@media (max-width: 768px) {
    .hero-clock {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 90%;
        bottom: 12px;
    }
    .clock-box {
        font-size: 1rem;
        min-width: 40px;
    }
}

/* --- Smooth fade-in and slide for landing page content --- */
.fade-slide {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: blur(2px);
    transition: 
        opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.5s ease;
}

.fade-slide.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* --- Staggered animation for child elements --- */
.staggered > * {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    animation: fadeInUp 0.6s forwards;
}

.staggered > *:nth-child(1) { animation-delay: 0.05s; }
.staggered > *:nth-child(2) { animation-delay: 0.1s; }
.staggered > *:nth-child(3) { animation-delay: 0.15s; }
.staggered > *:nth-child(4) { animation-delay: 0.2s; }
.staggered > *:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-clock.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/*ABOUT SECTION*/
.about-section {
    padding: 80px 20px;
    text-align: center;
}

.bg-custom {
    color: white;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

.about-text {
    margin: 0 auto;
    text-align: justify;
}

.login-btn {
    background: var(--brand-secondary);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    transition: 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}

.login-btn:hover {
     color: yellow !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/*TEXT UTILITIES*/
.text-justify {
    text-align: justify;
}
.text-indent {
    text-indent: 50px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/*BIOMETRIC LOGIN*/
@media (min-width: 768px) {
    #fingerprint-login {
        display: none !important;
    }
}

/*====*/
.modal.fade .modal-dialog {
    transform: translateY(30px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

.smooth-collapse {
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    filter: blur(2px);

    transition:
        height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.4s ease;
}

.smooth-collapse.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Stagger children animation */
.smooth-collapse.is-visible .card {
    animation: cardReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.smooth-collapse.is-visible .card:nth-child(1) { animation-delay: 0.05s; }
.smooth-collapse.is-visible .card:nth-child(2) { animation-delay: 0.1s; }
.smooth-collapse.is-visible .card:nth-child(3) { animation-delay: 0.15s; }
.smooth-collapse.is-visible .card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========PWA Update Toast======= */
.update-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 380px;

  display: flex;
  align-items: center;
  gap: 14px;

  background: var(--toast-bg);
  color: var(--toast-text);

  padding: 16px 20px;
  border-radius: 14px;

  box-shadow: var(--toast-shadow);
  z-index: 9999;

  animation: slideInLeft 0.4s ease-out;
}

.update-toast span {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Buttons container */
.update-toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Update Button */
.update-toast button {
  background: var(--brand-secondary);
  color: #fff;

  border: none;
  border-radius: 10px;
  padding: 8px 16px;

  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.update-toast button:hover:not(:disabled) {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.update-toast button:active:not(:disabled) {
  transform: scale(0.96);
}

.update-toast button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Close button */
.update-toast .close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.8;
}

.update-toast .close-btn:hover {
  opacity: 1;
}

/* Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.biometric-icon-only {
    width: 64px;
    height: 64px;
    margin: 14px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px; /* square with rounded corners */
    cursor: pointer;
    background: rgba(13,110,253,0.08); /* light blue glass */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(13,110,253,0.25);
    transition: all 0.25s ease;
}

.biometric-icon-only i {
    font-size: 30px;
    color: #0d6efd; /* Bootstrap primary blue */
}

/* hover lift like banking apps */
.biometric-icon-only:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(13,110,253,0.25);
}
