/* ============================================================
   COMPONENTS.CSS — Shared components: navbar, hamburger,
   sidebar, footer, buttons, animations
   Faculty of Peace Organization
   ============================================================ */

/* ============================================
   NAVBAR
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    background-color: #0B2430;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 767px) {
    .main-nav { background-color: #0B2430; }
}

.main-nav.scrolled {
    padding: 10px 0;
    border-radius: 0 0 18px 18px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    width: 50px;
    height: auto;
    display: block;
    object-fit: contain;
    transition: all 0.3s ease;
}

.nav-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.nav-brand img {
    height: 36px;
    width: auto;
    display: block;
}

/* Desktop nav links */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: visible;
}

.nav-links li { flex: 0 0 auto; }

.nav-links a {
    position: relative;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.74rem;
    padding: 7px 7px;
    border-radius: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-links a:hover {
    color: var(--accent-gold);
    background: rgba(232, 168, 56, 0.1);
}

/* Active nav link */
.nav-links li a.active {
    color: var(--accent-gold);
    font-weight: 700;
    position: relative;
}

.nav-links li a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background-color: var(--accent-gold);
    border-radius: 10px;
}

/* Donate button in nav */
.nav-links .btn-donate {
    background: var(--accent-gold);
    color: var(--dark) !important;
    font-weight: 700;
    font-size: 0.74rem;
    padding: 8px 14px;
    border-radius: 50px;
    margin-left: 6px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-links .btn-donate:hover {
    background: var(--accent-gold-light);
    color: var(--dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.4);
}

/* Nav breakpoints */
@media (min-width: 1400px) {
    .nav-links a { font-size: 0.78rem; padding: 8px 8px; }
    .nav-links .btn-donate { font-size: 0.78rem; padding: 9px 16px; }
    .nav-brand img { height: 38px; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .nav-links a { font-size: 0.70rem; padding: 7px 5px; }
    .nav-links .btn-donate { font-size: 0.70rem; padding: 8px 12px; margin-left: 4px; }
    .nav-brand img { height: 34px; }
}

@media (min-width: 1600px) {
    .nav-brand img { height: 42px; }
    .nav-links a { font-size: 0.85rem; padding: 9px 10px; }
    .nav-links .btn-donate { font-size: 0.85rem; padding: 10px 20px; }
}
@media (max-width: 360px) {
    .nav-brand img { height: 30px; }
    .sidebar-nav { max-width: 88vw; }
}

/* ============================================
   HAMBURGER — MOBILE ONLY
   ============================================ */
.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1002;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 10px;
    transform-origin: center;
    transition: transform 0.35s ease, opacity 0.25s ease, width 0.35s ease, background 0.3s ease;
}

.hamburger:hover {
    background: rgba(232, 168, 56, 0.12);
    border-color: var(--accent-gold);
    box-shadow: 0 5px 20px rgba(232, 168, 56, 0.12);
    transform: translateY(-1px);
}

.hamburger:hover span { background: var(--accent-gold); }

/* Active / Close state */
.hamburger.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.2);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--dark); }
.hamburger.active span:nth-child(2) { opacity: 0; width: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--dark); }

/* Switch to hamburger below 1200px */
@media (max-width: 1199.98px) {
    .nav-links { display: none !important; }
    .hamburger { display: flex; }
}

/* ============================================
   SIDEBAR NAV (mobile)
   ============================================ */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.sidebar-backdrop.active { opacity: 1; visibility: visible; }

.sidebar-nav {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    max-width: 85vw;
    height: 100%;
    background: var(--dark);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sidebar-nav.active { transform: translateX(0); }

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.sidebar-brand-text {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1rem;
    color: var(--white);
}
.sidebar-brand-text span { color: var(--accent-gold); }

.sidebar-close {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--white);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 10000;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-close:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--dark);
    transform: rotate(90deg);
}
.sidebar-close:active { transform: rotate(90deg) scale(0.92); }
.sidebar-close i { pointer-events: none; }

.sidebar-body { padding: 12px 0; flex: 1; }

/* Active sidebar link */
.sidebar-body li a.active { color: var(--accent-gold); font-weight: 700; }

.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav ul li {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-nav.active ul li { opacity: 1; transform: translateX(0); }

.sidebar-nav ul a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 24px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}
.sidebar-nav ul a:hover,
.sidebar-nav ul a.active-link {
    color: var(--accent-gold);
    background: rgba(232,168,56,0.06);
    border-left-color: var(--accent-gold);
}
.sidebar-nav ul a i { width: 20px; text-align: center; font-size: 0.85rem; }

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-footer .btn-donate-sb {
    display: block;
    width: 100%;
    background: var(--accent-gold);
    color: var(--dark);
    font-weight: 700;
    padding: 14px;
    border-radius: 50px;
    text-align: center;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.sidebar-footer .btn-donate-sb:hover { background: var(--accent-gold-light); }

.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}
.sidebar-social a {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}
.sidebar-social a:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--dark);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-gold {
    background: var(--accent-gold);
    color: var(--dark);
    font-weight: 700;
    padding: 13px 30px;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-size: 0.92rem;
    white-space: nowrap;
}
.btn-gold:hover {
    background: var(--accent-gold-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(232,168,56,0.35);
    color: var(--dark);
}

.btn-outline-w {
    background: transparent;
    color: var(--white);
    font-weight: 600;
    padding: 13px 30px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.25);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-size: 0.92rem;
    white-space: nowrap;
}
.btn-outline-w:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-3px);
}

.btn-sage {
    background: var(--sage);
    color: var(--white);
    font-weight: 700;
    padding: 13px 30px;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-size: 0.92rem;
    white-space: nowrap;
}
.btn-sage:hover {
    background: var(--sage-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(123,174,127,0.35);
    color: var(--white);
}

.btn-sage-sm {
    background: var(--sage);
    color: var(--white);
    font-weight: 600;
    padding: 8px 22px;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 0.85rem;
    white-space: nowrap;
}
.btn-sage-sm:hover { background: var(--sage-dark); color: var(--white); transform: translateY(-2px); }

/* ============================================
   FOOTER
   ============================================ */
.site-ft {
    background: var(--dark);
    color: rgba(255,255,255,0.55);
}
.site-ft h5 {
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ft-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.ft-brand-logo {
    width: 60px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}
.ft-about-text {
    font-size: 0.88rem;
    line-height: 1.7;
    max-width: 320px;
}
.site-ft a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.3s;
}
.site-ft a:hover { color: var(--accent-gold); }

.ft-links { list-style: none; padding: 0; margin: 0; }
.ft-links li { margin-bottom: 8px; }
.ft-links li a {
    position: relative;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.88rem;
    display: inline-block;
    transition: all 0.3s ease;
}
.ft-links li a:hover { color: var(--accent-gold); }
.ft-links li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}
.ft-links li a:hover::after { width: 100%; }

/* Active footer link */
.ft-links li a.active {
    color: var(--accent-gold) !important;
    font-weight: 700;
}
.ft-links li a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background-color: var(--accent-gold);
    border-radius: 10px;
}

.ft-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.55);
    margin-right: 6px;
    transition: all 0.3s;
}
.ft-social a:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--dark);
    transform: translateY(-2px);
}

.ft-contact { list-style: none; padding: 0; margin: 0; }
.ft-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.88rem;
}
.ft-contact li i { color: var(--accent-gold); margin-top: 3px; flex-shrink: 0; }

.ft-newsletter-wrapper {
    display: flex;
    max-width: 320px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.ft-newsletter input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: none;
    padding: 10px 14px;
    color: var(--white);
    font-size: 0.85rem;
    outline: none;
}
.ft-newsletter input::placeholder { color: rgba(255,255,255,0.3); }
.ft-newsletter input:focus { background: rgba(255,255,255,0.08); }
.ft-newsletter button {
    background: var(--accent-gold);
    color: var(--dark);
    border: none;
    padding: 0 16px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.3s;
}
.ft-newsletter button:hover { opacity: 0.85; }

.ft-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 20px 0;
    margin-top: 48px;
    font-size: 0.82rem;
}
.ft-legal-links a { margin-left: 16px; color: rgba(255,255,255,0.4); }
.ft-legal-links a:first-child { margin-left: 0; }
.ft-legal-links a:hover { color: var(--accent-gold); }
.ft-back-to-top i { margin-right: 4px; font-size: 0.7rem; }

/* ============================================
   ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal.vis { opacity: 1; transform: translateY(0); }

.reveal-l {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal-l.vis { opacity: 1; transform: translateX(0); }

.reveal-r {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal-r.vis { opacity: 1; transform: translateX(0); }

.reveal-s {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal-s.vis { opacity: 1; transform: scale(1); }

/* Stagger delays */
.st1 { transition-delay: 0.06s; }
.st2 { transition-delay: 0.12s; }
.st3 { transition-delay: 0.18s; }
.st4 { transition-delay: 0.24s; }
.st5 { transition-delay: 0.30s; }
.st6 { transition-delay: 0.36s; }
.st7 { transition-delay: 0.42s; }
.st8 { transition-delay: 0.48s; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.float-a { animation: float 4s ease-in-out infinite; }

@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.h-anim { animation: slideUp 0.8s cubic-bezier(0.4,0,0.2,1) forwards; opacity: 0; }
.h-d1 { animation-delay: 0.3s; }
.h-d2 { animation-delay: 0.5s; }
.h-d3 { animation-delay: 0.7s; }
.h-d4 { animation-delay: 0.9s; }

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.shimmer-text {
    background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-gold-light) 25%, var(--accent-gold) 50%, var(--accent-gold-light) 75%, var(--accent-gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ============================================
   LIGHTBOX & MODAL SYSTEM
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox.active img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(0,0,0,0.4);
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100000;
}
.lightbox-close:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--dark);
    transform: rotate(90deg);
}

/* ============================================
   SPA MODAL SYSTEM
   ============================================ */
.spa-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.spa-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.spa-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 94%;
    max-width: 620px;
    max-height: 88vh;
    background: var(--white);
    border-radius: 20px;
    z-index: 9001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}
.spa-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.spa-modal-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}
.spa-modal-header {
    padding: 22px 28px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.spa-modal-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.1);
    background: transparent;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.spa-modal-close:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--dark);
}
.spa-modal-body {
    padding: 20px 28px 28px;
    overflow-y: auto;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.spa-toast {
    background: var(--dark);
    color: var(--white);
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
    max-width: 380px;
}
.spa-toast.show {
    transform: translateX(0);
    opacity: 1;
}
.spa-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}
.spa-toast i {
    color: var(--accent-gold);
    font-size: 1.05rem;
    flex-shrink: 0;
}
.spa-toast.success i {
    color: var(--sage);
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    .spa-toast {
        max-width: 100%;
    }
}

/* ============================================
   SHARED COMPONENT RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 575.98px) {
    .ft-bottom { text-align: center; }
    .ft-social a { width: 34px; height: 34px; }
}

@media (max-height: 500px) and (max-width: 920px) {
    .hero-stats { padding: 12px 0; }
}
