/* ==========================================================================
   1. GLOBAL VARIABLES & RESET (Applies to ALL pages)
   ========================================================================== */
:root {
  --bg-theme: #dfc8db;
  --primary-maroon: #3b0a2a;
  --primary-hover: #210513;
  --maroon-accent: #7b1e3a;
  --border-color: #e6d5de;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-theme);
  color: var(--primary-maroon);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Base Link Styles */
a, .link-primary {
  color: var(--primary-maroon);
}

a:hover {
  color: var(--maroon-accent);
}


/* ==========================================================================
   2. GLOBAL BOOTSTRAP OVERRIDES (Fixes blue elements site-wide)
   ========================================================================== */

/* Standard Buttons */
.btn-primary, 
body .btn-primary {
  background-color: var(--maroon-accent) !important;
  border-color: var(--maroon-accent) !important;
  color: #ffffff !important;
}

.btn-primary:hover, 
.btn-primary:focus, 
.btn-primary:active {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

/* Custom Outlined Buttons */
.btn-outline-primary {
  color: #d667af !important;
  border-color: #c35b9f !important;
}

.btn-outline-primary:hover {
  background-color: #3b0a2a !important;
  border-color: #c35b9f !important;
  color: #fd007e !important;
}

/* Primary Utility Classes */
.bg-primary {
  background-color: var(--primary-maroon) !important;
}

.text-primary, 
a.text-primary,
body .text-primary {
  color: var(--primary-maroon) !important;
}

/* Sidebar Links & Active Nav Items */
.nav-pills .nav-link.active,
.list-group-item.active,
.badge.bg-primary,
.active > .page-link {
  background-color: var(--primary-maroon) !important;
  border-color: var(--primary-maroon) !important;
  color: #ffffff !important;
}

/* Inactive Sidebar Links (Fixes blue text in sidebar sub-menus) */
.nav-pills .nav-link:not(.active),
.list-group-item:not(.active) {
  color: var(--primary-maroon) !important;
}

.nav-pills .nav-link:not(.active):hover,
.list-group-item:not(.active):hover {
  color: var(--maroon-accent) !important;
}


/* ==========================================================================
   3. HEADER & NAVIGATION (Applies to top bar on all public pages)
   ========================================================================== */

/* Top Header with Logos */
body .site-header,
header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

body .site-header img,
header img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* Dedicated Maroon Navigation Bar */
body .navbar {
  background-color: var(--primary-maroon) !important;
  padding: 8px 0;
}

body .navbar .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 18px !important;
  border-radius: 50px;
  transition: all 0.2s ease;
}

body .navbar-nav .nav-link.active {
  background-color: #ffffff !important;
  color: var(--primary-maroon) !important;
  font-weight: 700;
}

body .navbar-nav .nav-link:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

/* Register Button inside Navbar */
body .navbar .btn-register {
  background-color: #ffffff;
  color: var(--primary-maroon) !important;
  border-radius: 50px;
  font-weight: 600;
  padding: 6px 20px;
  text-decoration: none;
}


/* ==========================================================================
   4. USER AUTH PAGES (register.html, login.php)
   ========================================================================== */

/* Outer Full-Screen Centered Container */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-theme);
  padding: 24px;
}

/* White Form Card Box */
.auth-card {
  background: #ffffff;
  padding: 36px 32px;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(59, 10, 42, 0.08);
  width: 100%;
  max-width: 440px;
  position: relative;
  border: 1px solid rgba(230, 213, 222, 0.6);
}

/* Top Left Circular Back Arrow Button */
.auth-back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f7eff5;
  color: #3b0a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.auth-back-btn:hover {
  background-color: #3b0a2a;
  color: #ffffff;
  transform: translateX(-2px);
}

/* Form Headings */
.auth-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #3b0a2a;
  text-align: center;
  margin-top: 12px;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 24px;
}

/* Form Controls (Inputs & Dropdowns) */
.form-group {
  margin-bottom: 16px;
  position: relative;
}

.custom-input,
.custom-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid #e6d5de;
  background-color: #fdfafc;
  color: #3b0a2a;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.custom-input::placeholder {
  color: #a0909c;
}

.custom-input:focus,
.custom-select:focus {
  border-color: #7b1e3a;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(123, 30, 58, 0.12);
}

/* Password Eye Icon Toggle */
.password-wrapper {
  position: relative;
}

.password-toggle-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c7886;
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.password-toggle-icon:hover {
  color: #3b0a2a;
}

/* Form Main Action Button */
.btn-maroon-primary {
  width: 100%;
  background-color: #7b1e3a;
  color: #ffffff;
  padding: 13px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(123, 30, 58, 0.2);
}

.btn-maroon-primary:hover {
  background-color: #3b0a2a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 10, 42, 0.3);
}

/* Form Bottom Links */
.auth-footer-text {
  text-align: center;
  font-size: 0.88rem;
  color: #6c757d;
  margin-top: 6px;
}

.auth-link {
  color: #7b1e3a;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
  color: #3b0a2a;
}


/* ==========================================================================
   5. ADMIN PANEL & DASHBOARDS (admin login.html, admin dashboard.html, etc.)
   ========================================================================== */

.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-theme);
  padding: 20px;
}

.login-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 460px;
  position: relative;
  margin: auto;
}

.btn-maroon {
  background-color: var(--maroon-accent);
  color: #ffffff;
  padding: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  width: 100%;
}

.btn-maroon:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}


/* ==========================================================================
   6. CARDS & FOOTER (General Components)
   ========================================================================== */

body .card {
  background-color: #ffffff;
  color: var(--primary-maroon);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.footer-bottom {
  background-color: #210513;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

/* Story Cards Styling */

.hero-spotlight {
    background: linear-gradient(135deg, #3b0a2a 0%, #701c45 100%);
}

.story-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

.story-img-wrapper {
    position: relative;
    height: 220px;
    background-color: #f4f4f4;
    overflow: hidden;
}

.story-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-batch-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-title-color {
    color: var(--dark-purple, #3b0a2a);
}

.modal-header-custom {
    background-color: var(--primary-burgundy, #3b0a2a);
}

/* Updated Sidebar & Cards Styling */
.sticky-sidebar-nav {
    top: 100px;
    z-index: 1020;
}

.sidebar-title {
    color: var(--primary-maroon, #701c45);
}

.promo-card {
    background-color: var(--primary-burgundy, #701c45);
}

.sticky-sidebar {
    position: -webkit-sticky; /* For Safari support */
    position: sticky;
    
    /* 1. Increase top distance so it clears the entire fixed navbar height */
    top: 110px; 
    
    /* 2. CRITICAL: Prevents the sidebar box from stretching to full row height */
    height: fit-content !important;
    
    /* 3. CRITICAL: Stops Bootstrap flexbox from expanding the column height */
    align-self: flex-start !important;
    
    z-index: 10;
}
:root {
            --text-dark: #480d2a;
            --primary-burgundy: #701c45;
        }

        /* Override default text elements */
        body {
            color: var(--text-dark);
        }

        .text-dark-custom {
            color: var(--text-dark) !important;
        }

        /* Full Hero Banner - Adjusted height & center positioning to show entire photo */
        .hero-banner-full {
            position: relative;
            width: 100%;
            height: 510px; 
            background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45)), 
                        url("ilovepsp.jpg") center 65% / cover no-repeat !important;
            display: flex;
            align-items: flex-end; 
        }

        /* Floating Graduation Hats Base Styling */
        .bg-hat {
            position: absolute;
            color: var(--primary-maroon, #3b0a2a);
            pointer-events: none;
            z-index: 0;
        }

        /* Decorative Top Border for Main Dashboard Cards */
.card-accent-top {
  border-top: 4px solid var(--primary-maroon) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-accent-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Sidebar CMS Buttons Styling */
.cms-list-group .list-group-item {
  border: 1px solid var(--border-color) !important;
  color: var(--primary-maroon);
  font-weight: 500;
  transition: all 0.2s ease;
  background-color: #faf6f8;
}

.cms-list-group .list-group-item:hover {
  background-color: var(--primary-maroon) !important;
  color: #ffffff !important;
  transform: translateX(5px);
}

.cms-list-group .list-group-item:hover i {
  color: #ffffff !important;
}

/* Table Styling Polish */
.table thead th {
  background-color: #f3ebf1 !important;
  color: var(--primary-maroon) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-maroon);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table tbody tr:hover {
  background-color: #fdf8fb !important;
}

/* Stat Cards Counter Styling */
.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: #f3ebf1;
  color: var(--primary-maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Styling for background floating hats restricted inside <main> */
    .bg-hat {
      position: absolute;
      color: #6B1D38;
      pointer-events: none;
      z-index: 0;
    }

/* Digital ID profile photo size */
.alumni-card .photo-frame {
    width: 110px;
    height: 130px;
    flex-shrink: 0;
    overflow: hidden;
}

.alumni-card .photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* FIX DIGITAL CARD PROFILE PHOTO */
.alumni-card .card-body-section .photo-frame {
    width: 120px !important;
    height: 150px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    min-height: 150px !important;
    max-height: 150px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.alumni-card .card-body-section .photo-frame img#cardProfilePhoto {
    width: 120px !important;
    height: 150px !important;
    max-width: 120px !important;
    max-height: 150px !important;
    object-fit: cover !important;
    display: block !important;
}

/* ==========================================
   DIGITAL ALUMNI MEMBERSHIP CARD
   ========================================== */

.alumni-card {
    width: 650px;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: #701c45;
}

/* ---------- LOGO ---------- */

.alumni-card .card-top-section {
    width: 100%;
    height: 120px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    border-bottom: 3px solid #f5eff7;
}

.alumni-card .card-logo {
    width: 460px;
    height: 100px;
    max-width: 100%;
    object-fit: contain;
}


/* ---------- PROFILE + DETAILS ---------- */

.alumni-card .card-body-section {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: #ffffff;
}


/* ---------- PROFILE PHOTO ---------- */

.alumni-card .photo-frame {
    width: 125px !important;
    height: 155px !important;

    min-width: 125px !important;
    max-width: 125px !important;

    min-height: 155px !important;
    max-height: 155px !important;

    flex: 0 0 125px !important;

    overflow: hidden !important;

    border: 3px solid #701c45;
    border-radius: 10px;

    background: #f5eff7;
}

.alumni-card .photo-frame img {
    width: 125px !important;
    height: 155px !important;

    min-width: 125px !important;
    max-width: 125px !important;

    min-height: 155px !important;
    max-height: 155px !important;

    object-fit: cover !important;

    display: block !important;
}


/* ---------- MEMBER INFORMATION ---------- */

.alumni-card .member-details {
    flex: 1;
    min-width: 0;
}

.alumni-card .detail-group {
    margin-bottom: 8px;
    line-height: 1.35;
}

.alumni-card .detail-group .label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #777777;
    margin-bottom: 2px;
}

.alumni-card .detail-group .value {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #701c45;
}


/* ---------- BADGES ---------- */

.alumni-card .badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.alumni-card .status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
}

.alumni-card .status-badge.gold {
    background: #f4c542;
    color: #4d3800;
}

.alumni-card .status-badge.dark {
    background: #701c45;
    color: #ffffff;
}


/* ---------- FOOTER ---------- */

.alumni-card .card-footer-section {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 25px;

    background: #701c45;
    color: #ffffff;
}


/* Barcode */

.alumni-card .barcode-box {
    background: #ffffff;
    padding: 5px 8px;
    border-radius: 5px;
}

.alumni-card .barcode-box svg {
    max-width: 180px;
    height: auto;
}


/* Authentication text */

.alumni-card .auth-text {
    text-align: right;
    font-size: 11px;
}

.alumni-card .auth-text .small {
    font-size: 9px;
}


/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 600px) {

    .alumni-card {
        width: 100%;
        border-radius: 10px;
    }

    .alumni-card .card-top-section {
        height: 90px;
        padding: 8px 15px;
    }

    .alumni-card .card-logo {
        width: 350px;
        height: 75px;
    }

    .alumni-card .card-body-section {
        gap: 15px;
        padding: 15px;
    }

    .alumni-card .photo-frame {
        width: 90px !important;
        height: 115px !important;

        min-width: 90px !important;
        max-width: 90px !important;

        min-height: 115px !important;
        max-height: 115px !important;

        flex-basis: 90px !important;
    }

    .alumni-card .photo-frame img {
        width: 90px !important;
        height: 115px !important;
    }

    .alumni-card .detail-group .label {
        font-size: 8px;
    }

    .alumni-card .detail-group .value {
        font-size: 10px;
    }

    .alumni-card .card-footer-section {
        padding: 10px 15px;
    }

    .alumni-card .barcode-box svg {
        max-width: 130px;
    }

    .alumni-card .auth-text {
        font-size: 9px;
    }

    .alumni-card .auth-text .small {
        font-size: 7px;
    }
}