/* ========================================
   Alumni Database System - Main Stylesheet
   Font: Sarabun
   ======================================== */

:root {
    /* Primary Colors - Education Theme */
    --primary-color: #ff5100ff;
    --primary-dark: #ff6123;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    --secondary-light: #fbbf24;

    /* Neutral Colors */
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;

    /* Status Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ff5100ff 0%, #ff6123 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(255, 72, 0, 0.9) 0%, rgba(255, 72, 0, 0.8) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* ========================================
   Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light-gray);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Header & Navigation
   ======================================== */

.main-header {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 600;
    color: var(--white) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.9;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-gray);
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    min-height: calc(100vh - 400px);
    padding: 2rem 0;
}

/* ========================================
   Cards
   ======================================== */

.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    background: var(--white);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-header {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--light-gray);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    font-family: 'Sarabun', sans-serif;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--gradient-primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gradient-secondary);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

/* ========================================
   Forms
   ======================================== */

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-control,
.form-select {
    font-family: 'Sarabun', sans-serif;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-control::placeholder {
    color: var(--gray);
}

.input-group-text {
    background-color: var(--light-gray);
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
}

/* ========================================
   Tables
   ======================================== */

.table {
    font-family: 'Sarabun', sans-serif;
}

.table thead {
    background: var(--gradient-primary);
    color: var(--white);
}

.table thead th {
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: var(--light-gray);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* ========================================
   Badges
   ======================================== */

.badge {
    font-family: 'Sarabun', sans-serif;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    background: var(--gradient-overlay), url('../images/hero-bg.jpg') center/cover;
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(59, 130, 246, 0.85) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ========================================
   Stats Section
   ======================================== */

.stats-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.stats-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--white);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 1.125rem;
    color: var(--gray);
    font-weight: 500;
}

/* ========================================
   News & Events Cards
   ======================================== */

.news-card,
.event-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card img,
.event-card img {
    height: 200px;
    object-fit: cover;
}

.news-card .card-body,
.event-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card .card-title,
.event-card .card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-text,
.event-card .card-text {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--gray);
}

.news-meta,
.event-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 1rem;
}

/* ========================================
   Footer
   ======================================== */

.main-footer {
    background: var(--dark);
    color: var(--white);
    margin-top: 4rem;
}

.footer-top {
    padding: 3rem 0;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    color: var(--secondary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Profile Photo
   ======================================== */

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
}

.profile-photo-sm {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   E-Card Styles
   ======================================== */

.ecard-container {
    max-width: 400px;
    margin: 0 auto;
}

.ecard {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
}

.ecard-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
}

.ecard-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
}

.ecard-body {
    padding: 2rem;
    text-align: center;
}

.ecard-photo {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

.ecard-info {
    margin-bottom: 1.5rem;
}

.ecard-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.ecard-detail {
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.ecard-qr {
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.ecard-footer {
    background: var(--light-gray);
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .stats-card {
        margin-bottom: 1.5rem;
    }

    .footer-top {
        padding: 2rem 0;
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ========================================
   Utility Classes
   ======================================== */

.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;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-secondary {
    background: var(--gradient-secondary) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.shadow-xl {
    box-shadow: var(--shadow-xl) !important;
}

.rounded-sm {
    border-radius: var(--radius-sm) !important;
}

.rounded {
    border-radius: var(--radius) !important;
}

.rounded-md {
    border-radius: var(--radius-md) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.rounded-xl {
    border-radius: var(--radius-xl) !important;
}