/* ============================================
   CUSTOM STYLES – CTU Barili Alumni System
   ============================================ */

:root {
    --gold: #D4AF37;
    --gold-dark: #B8860B;
    --black-primary: #1A1A1A;
    --black-secondary: #4A4A4A;
    --dark-bg: #121212;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: scroll;
}

body {
    overflow-x: hidden;
    background-color: var(--white);
}

/* ============================================
   HERO BACKGROUND & OVERLAY
   ============================================ */

.hero-bg {
    position: relative;
    min-height: 100vh;
    background-image: url(../images/alumniBg.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-bottom: 4rem;
    display: flex;
    align-items: center;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    z-index: 1;
}

.hero-bg .container {
    position: relative;
    z-index: 2;
}

/* ============================================
   NAVBAR – GLASSMORPHISM + CENTERED CONTENT
   ============================================ */

.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
    left: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(12px);
    z-index: 1030;
    padding: 0.5rem 1rem;
}

/* Desktop: center all items */
@media (min-width: 992px) {
    .navbar .container-fluid {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .navbar-brand {
        margin-right: 0 !important;
    }

    .navbar-collapse {
        flex-grow: 0 !important;
        justify-content: center;
    }

    .navbar-nav {
        flex-direction: row;
        gap: 1rem;
    }

    .navbar .d-none.d-md-block {
        margin-left: 0 !important;
    }
}

/* Navbar links */
.navbar .nav-link {
    color: var(--black-primary) !important;
    font-weight: 500;
    position: relative;
    padding-bottom: 6px;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--gold);
    transition: width 0.3s ease-in-out;
}

.navbar .nav-link:hover::after {
    width: 100%;
}

.navbar .navbar-brand {
    color: var(--black-primary) !important;
    text-shadow: none;
}

.navbar-brand .fw-bold {
    color: var(--black-primary) !important;
}

.custom-alumni-text {
    color: var(--black-secondary) !important;
}

.navbar .btn-primary {
    background-color: var(--gold) !important;
    border: none !important;
    color: var(--black-primary) !important;
}

.navbar .btn-primary:hover {
    background-color: var(--gold-dark) !important;
    color: var(--white) !important;
}

/* Mobile: brand left, toggler right */
@media (max-width: 991.98px) {
    .navbar .container-fluid {
        justify-content: space-between !important;
    }
    .navbar-brand {
        margin-right: auto !important;
    }
    .navbar .d-md-none.ms-auto {
        display: none !important;
    }
    .navbar-collapse {
        text-align: center;
    }
    .navbar-nav {
        margin: 0 auto;
    }
}

/* ============================================
   HERO CONTENT
   ============================================ */

.hero-content {
    padding-top: 18vh;
    padding-bottom: 2rem;
    color: var(--black-primary);
    text-shadow: none;
}

.hero-content .lead{
    color:#666666 !important;
    font-size: clamp(0.85rem, 2.2vw, 1.3rem) !important;
    
}


.hero-content .text-primary {
    color: var(--gold) !important;
    text-shadow: none;
    font-size: clamp(0.65rem, 2vw, 1.2rem);
    letter-spacing: 2px;
}

.hero-content h1 {
    color: var(--black-primary);
    text-shadow: none;
    font-size: clamp(1.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-content .lead {
    color: var(--black-secondary);
    text-shadow: none;
    font-size: clamp(0.85rem, 2.2vw, 1.5rem);
    font-weight: 400;
}

.hero-content .text-muted {
    color: var(--black-secondary) !important;
    text-shadow: none;
    font-size: clamp(0.65rem, 1.5vw, 1rem);
}

.btn-custom-primary,
.btn-custom-outline {
    padding: 0.7rem 2rem;
    font-size: clamp(0.75rem, 1.5vw, 1.2rem);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-custom-primary {
    background-color: var(--gold-dark);
    color: var(--white);
    border-color: var(--gold-dark);
}

.btn-custom-primary:hover {
    background-color: #9a6e0a;
    border-color: #9a6e0a;
    color: var(--white);
    transform: scale(1.05);
}

.btn-custom-outline {
    background: transparent;
    color: var(--black-primary);
    border-color: var(--gold);
}

.btn-custom-outline:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
    transform: scale(1.05);
}

/* ============================================
   SECTION TITLES
   ============================================ */

.section-title h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--black-primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* ============================================
   FEATURED ANNOUNCEMENT
   ============================================ */

.featured-announcement {
    background: linear-gradient(135deg, #0F7BC5 0%, #1A9FDB 100%);
    border-radius: 28px;
    overflow: hidden;
}

.announcement-image {
    min-height: 300px;
}

.announcement-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.announcement-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: white;
    width: fit-content;
}

.announcement-body {
    color: white;
}

.announcement-body h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: white;
}

.announcement-body p {
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   NEWS GALLERY
   ============================================ */

.news-gallery {
    position: relative;
    z-index: 1;
}

.gallery-track {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex: 0 0 85%;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    height: 220px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 5;
    color: white;
    font-size: 2rem;
    line-height: 1;
    opacity: 0.7;
}

.gallery-btn:hover {
    opacity: 1;
}

.gallery-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.gallery-hint {
    font-size: 0.85rem;
}

@media (min-width: 880px) {
    .gallery-item {
        flex: 0 0 60%;
        height: 320px;
    }
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 0.9rem !important;
    }
    .navbar-brand img {
        height: 32px !important;
    }
    .navbar-brand .fw-bold {
        font-size: 1rem !important;
    }
    .navbar-brand .custom-alumni-text {
        font-size: 0.65rem !important;
    }
    .hero-content {
        padding-top: 12vh !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .hero-content .text-primary {
        font-size: 0.9rem !important;
    }
    .hero-content h1 {
        font-size: 1.8rem !important;
    }
    .hero-content .lead {
        font-size: 1rem !important;
    }
    .hero-content .text-muted {
        font-size: 0.7rem !important;
    }
    .btn-custom-primary,
    .btn-custom-outline {
        padding: 0.5rem 1.2rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding-top: 8vh !important;
    }
    .hero-content .text-primary {
        font-size: 0.75rem !important;
    }
    .hero-content h1 {
        font-size: 1.5rem !important;
    }
    .hero-content .lead {
        font-size: 0.85rem !important;
    }
    .hero-content .text-muted {
        font-size: 0.65rem !important;
    }
    .btn-custom-primary,
    .btn-custom-outline {
        padding: 0.4rem 1rem !important;
        font-size: 0.75rem !important;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--dark-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a:hover {
    color: var(--gold) !important;
    text-decoration: underline !important;
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    background: var(--white) !important;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: none;
}

.modal .btn-gold {
    background-color: var(--gold);
    color: var(--black-primary);
    border: none;
}

.modal .btn-gold:hover {
    background-color: var(--gold-dark);
    color: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-text {
    font-size: 0.75rem;
    color: var(--black-secondary);
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 55%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--black-secondary);
    z-index: 10;
    font-size: 1.2rem;
    transition: color 0.2s;
}

#registerModal .position-relative .password-toggle {
    top: 55% !important;
    transform: translateY(-50%) !important;
    right: 18px !important;
}

.password-toggle:hover {
    color: var(--gold);
}

.form-control.password-field {
    padding-right: 45px;
}

.form-control-lg.password-field {
    padding-right: 50px;
}

.modal {
    z-index: 1060 !important;
}
.modal-backdrop {
    z-index: 1050 !important;
}
.navbar {
    z-index: 1030;
}
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}
.modal-open .modal {
    overflow-y: auto;
}

/* ============================================
   PRE-LOADER & ANIMATIONS
   ============================================ */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #E8E8E8;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #B8860B;
    border-top-color: var(--gold, #d4af37);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#mainNav {
    opacity: 0;
    transform: translateY(-25px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-loaded #mainNav {
    opacity: 1;
    transform: translateY(0);
}

body.page-loaded .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.section-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CUSTOM ANIMATED HAMBURGER (MOBILE ONLY)
   ============================================ */

.custom-toggler {
    display: none; /* Hide on Desktop by default */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    padding: 0;
    background: transparent;
    border: none;
}

/* Show ONLY on mobile screens (smaller than 992px) */
@media (max-width: 991.98px) {
    .custom-toggler {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 9999 !important;
    }
}

/* The Lines */
.custom-toggler .hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #1A1A1A; /* Solid black to ensure visibility */
    border-radius: 10px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; 
    transform-origin: center; 
}

/* When the menu is open (turns into an X) */
.custom-toggler[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg) !important;
}

.custom-toggler[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0 !important;
}

.custom-toggler[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg) !important;
}