/*
 * Heal2Rise Book - Social Welfare Management System
 * Custom Stylesheet
 * Author: CS619 Student Project
 */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #4A90A4;
    --primary-dark: #3A7A8C;
    --primary-light: #6BA8BA;
    --secondary-color: #F5A623;
    --accent-color: #E85D75;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --gray-color: #6C757D;
    --gray-light: #E9ECEF;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    --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 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s ease;
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
    overflow-x: hidden;
}

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

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray-color);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* ===== Navigation ===== */
.navbar {
    padding: 15px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
    padding: 10px 0;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    color: var(--accent-color);
    margin-right: 10px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(74, 144, 164, 0.9) 0%, rgba(58, 122, 140, 0.9) 100%),
                url('../images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title span {
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons .btn {
    margin-right: 15px;
    margin-bottom: 15px;
}

.hero-image {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== Features Section ===== */
.features-section {
    padding: 100px 0;
    background: white;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--gray-light);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

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

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
    line-height: 1.8;
}

/* ===== How It Works Section ===== */
.how-it-works {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.step-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.step-card:hover {
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.step-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* ===== Stats Section ===== */
.stats-section {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: white;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ===== NGOs Section ===== */
.ngos-section {
    padding: 100px 0;
    background: white;
}

.ngo-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

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

.ngo-image {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.ngo-content {
    padding: 25px;
}

.ngo-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.ngo-content p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* ===== Testimonials Section ===== */
.testimonials-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--dark-color);
    margin-bottom: 25px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, #d64570 100%);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 80px 0 30px;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-brand i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.footer-about {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: white;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

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

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
    color: var(--secondary-color);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: 50px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

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

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===== Auth Pages ===== */
.auth-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(74, 144, 164, 0.9) 0%, rgba(58, 122, 140, 0.9) 100%),
                url('../images/auth-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 50px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h2 {
    color: var(--primary-color);
    font-weight: 800;
}

.auth-logo i {
    color: var(--accent-color);
    margin-right: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-control {
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
}

.form-select {
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
}

.input-group-text {
    background: var(--gray-light);
    border: 2px solid var(--gray-light);
    border-right: none;
    padding: 15px 20px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--gray-color);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Dashboard Styles ===== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.sidebar-brand i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.user-details h5 {
    font-size: 1rem;
    margin-bottom: 3px;
}

.user-details span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: var(--secondary-color);
}

.sidebar-menu i {
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    background: #f5f7fa;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.page-title h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.page-title span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-btn {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    transition: var(--transition);
}

.notification-btn:hover {
    background: var(--primary-color);
    color: white;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Dashboard Cards ===== */
.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.primary { background: rgba(74, 144, 164, 0.1); color: var(--primary-color); }
.stat-icon.success { background: rgba(40, 167, 69, 0.1); color: var(--success-color); }
.stat-icon.warning { background: rgba(255, 193, 7, 0.1); color: var(--warning-color); }
.stat-icon.info { background: rgba(23, 162, 184, 0.1); color: var(--info-color); }

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-info span {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* ===== Tables ===== */
.table-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    padding: 25px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.table-responsive {
    padding: 0;
}

.custom-table {
    width: 100%;
    margin: 0;
}

.custom-table th {
    background: #f8f9fa;
    padding: 15px 20px;
    font-weight: 600;
    color: var(--dark-color);
    border: none;
}

.custom-table td {
    padding: 15px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-light);
}

.custom-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: rgba(255, 193, 7, 0.1); color: #856404; }
.status-active { background: rgba(40, 167, 69, 0.1); color: #155724; }
.status-completed { background: rgba(74, 144, 164, 0.1); color: var(--primary-color); }
.status-cancelled { background: rgba(220, 53, 69, 0.1); color: #721c24; }

/* ===== Modal ===== */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--gray-light);
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--gray-light);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

/* ===== Utilities ===== */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }

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

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

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

/* ===== Loading Spinner ===== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.custom-toast {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 25px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.toast-success .toast-icon { background: rgba(40, 167, 69, 0.1); color: var(--success-color); }
.toast-error .toast-icon { background: rgba(220, 53, 69, 0.1); color: var(--danger-color); }
.toast-warning .toast-icon { background: rgba(255, 193, 7, 0.1); color: var(--warning-color); }
.toast-info .toast-icon { background: rgba(23, 162, 184, 0.1); color: var(--info-color); }
