/**
 * Custom CSS for Alumni System
 * Version: 1.0.0
 */

 :root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --primary-rgb: 13, 110, 253;
    --secondary-rgb: 108, 117, 125;
    --success-rgb: 25, 135, 84;
    --info-rgb: 13, 202, 240;
    --warning-rgb: 255, 193, 7;
    --danger-rgb: 220, 53, 69;
    --light-rgb: 248, 249, 250;
    --dark-rgb: 33, 37, 41;
}

/* ==========================
   General Styles
========================== */
body {
    font-family: 'Sarabun', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

.font-sarabun {
    font-family: 'Sarabun', sans-serif;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0a58ca;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 0;
}

.section-title.text-center::after {
    left: 25%;
}

/* ==========================
   Layout Components
========================== */

/* Navbar */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: white;
}

.navbar-dark .navbar-nav .nav-link.active::after,
.navbar-dark .navbar-nav .nav-link:hover::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 2px;
    background-color: white;
    bottom: 0;
    left: 15%;
    transition: width 0.3s ease;
}

.navbar-scrolled {
    background-color: rgba(var(--primary-rgb), 0.95) !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hero Slider */
.hero-image {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: initial;
}

.carousel-indicators {
    z-index: 15;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 15;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Stats Cards */
.stats-card {
    border-radius: 1rem;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stats-card .stats-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stats-card .stats-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    font-size: 1rem;
    color: var(--secondary-color);
}

/* Event Date */
.event-date {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
}

.event-day {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.event-month {
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Tabs */
.nav-pills .nav-link {
    color: var(--dark-color);
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
    color: var(--primary-color);
    background-color: transparent;
    border-bottom: 2px solid var(--primary-color);
}

/* Progress bars */
.progress {
    height: 0.5rem;
    border-radius: 1rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 1rem;
}

/* Search */
.search-box {
    border-radius: 50rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.search-box .form-control {
    border: none;
    padding: 1.25rem 1.5rem;
}

.search-box .btn {
    border-radius: 0 50rem 50rem 0;
    padding: 0.5rem 1.5rem;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.7em;
}

/* ==========================
   Footer
========================== */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

.footer .footer-heading {
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer .footer-heading::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ==========================
   Pages Specific Styles
========================== */

/* Profile Page */
.profile-header {
    background-color: var(--primary-color);
    padding: 2rem 0;
    margin-bottom: 2rem;
    color: white;
}

.profile-pic {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 5px solid white;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-tabs .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
}

.profile-tabs .nav-link.active,
.profile-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Login Modal */
.modal-login .modal-body {
    padding: 2rem;
}

.modal-login .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-login .form-control {
    padding: 0.75rem 1rem;
}

.modal-login .form-floating label {
    padding: 0.75rem 1rem;
}

/* Admin Dashboard */
.admin-sidebar {
    min-height: 100vh;
    background-color: var(--dark-color);
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

.admin-content {
    min-height: 100vh;
    padding: 1.5rem;
}

.admin-card {
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Gallery */
.image-gallery {
    column-count: 3;
    column-gap: 10px;
}

@media (max-width: 992px) {
    .image-gallery {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .image-gallery {
        column-count: 1;
    }
}

.gallery-item {
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 0.5rem;
    break-inside: avoid;
}

.gallery-image {
    width: 100%;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Directory */
.alumni-card-img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.alumni-card:hover .alumni-card-img {
    transform: scale(1.05);
}

/* ==========================
   Utilities
========================== */

/* Rounded corners */
.rounded-xl {
    border-radius: 1rem !important;
}

.rounded-xxl {
    border-radius: 2rem !important;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.scroll-top.show {
    opacity: 1;
}

/* Flash messages */
.flash-message {
    z-index: 9999;
    transition: all 0.5s ease;
    opacity: 0;
}

.flash-message.show {
    opacity: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ==========================
   Media Queries
========================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero-image {
        height: 600px;
    }
    
    .profile-header {
        padding: 3rem 0;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .hero-image {
        height: 500px;
    }
    
    .profile-pic {
        width: 180px;
        height: 180px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-image {
        height: 600px;
    }
    
    .profile-header {
        padding: 4rem 0;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}