/**
 * Custom Styles for Alumni Network v2
 * Modern, Professional & Friendly Design
 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #ff9933;
    --text-dark: #333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Global Styles */
html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    margin-top: 0; /* Reset any margin */
    padding-top: 0; /* Reset any padding */
}

/* Navbar Styles */
.navbar {
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border-radius: 0.375rem;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(102, 126, 234, 0.1);
}

/* Navbar Spacer - Must match navbar height exactly */
/* Navbar: 70px logo + 0.75rem top + 0.75rem bottom = ~94px */
.navbar-spacer {
    height: 100px;
    min-height: 100px;
    display: block;
    width: 100%;
}

@media (max-width: 991px) {
    .navbar-spacer {
        height: 90px;
        min-height: 90px;
    }
}

/* Main Container Spacing */
main.container {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Page Titles */
main.container h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    main.container h1 {
        font-size: 1.5rem;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* Spacing between navbar and hero, hero and cards */
.hero-spacing {
    margin-bottom: 40px;
}

.cards-spacing {
    margin-bottom: 40px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 1.05rem;
    opacity: 0.95;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Statistics Cards */
.stat-card {
    transition: var(--transition);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 
                0 -3px 8px rgba(0,0,0,0.1);
    background: white;
    overflow: hidden;
    height: 100%;
    border: 1px solid var(--border-color);
    position: relative;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15), 
                0 -4px 10px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    margin-bottom: 0.85rem;
}

.stat-card .icon img {
    filter: brightness(0) invert(1);
    width: 28px;
    height: 28px;
}

.stat-card p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.stat-card p strong {
    color: var(--primary-color);
}

/* Info Cards */
.info-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    transition: var(--transition);
    background: white;
    overflow: hidden;
}

.info-card:hover {
    box-shadow: var(--shadow-lg);
}

.info-card .card-body {
    padding: 2.5rem;
}

.info-card h5 {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
}

.info-card .card-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-dark);
}

.info-card img {
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    max-width: 100%;
    height: auto;
}

/* Welcome Card */
.welcome-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 30px;
    background: linear-gradient(to bottom, #ffffff 0%, var(--bg-light) 100%);
}

.welcome-card .card-body {
    padding: 2.5rem;
}

.welcome-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
}

/* Announcement Section */
.announcement-section {
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.announcement-section .announcement-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
}

.announcement-section .announcement-header h6 {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

.announcement-section .announcement-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.announcement-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.announcement-item:hover {
    background-color: var(--bg-light);
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.announcement-item .announcement-title {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.announcement-item .announcement-title:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* HTML bodies stored in DB (announcement modals on home) */
.announcement-html-body {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.55;
}
.announcement-html-body img,
.announcement-html-body iframe {
    max-width: 100%;
    height: auto;
}
.announcement-html-body table {
    max-width: 100%;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.btn-register {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: var(--transition);
    color: white;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Privacy Card */
.privacy-card h5 {
    color: var(--accent-color);
}

/* Links */
a {
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Lists */
ul li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.35rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.55rem;
    }
    
    .hero-section p {
        font-size: 0.95rem;
    }
    
    .info-card .card-body {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Search Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}
