/* Custom CSS for Chhatra Dal Organization */
: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;
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 5px;
}

.language-toggle .btn {
    font-size: 12px;
    padding: 5px 10px;
}

.language-toggle .btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffc107 !important;
}

/* Leaders Section */
.leader-card img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
}

/* Resources Section */
.resource-item {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease;
}

.resource-item:hover {
    background-color: var(--light-color);
}
/* Chatbot Styles */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#chatbot {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chatbot-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.chatbot-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.chatbot-info h4 {
    margin: 0;
    font-size: 16px;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.8;
}

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

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

.bot-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: #667eea;
    color: white;
}

.user-message .message-avatar {
    background: #28a745;
    color: white;
    order: 2;
    margin-right: 0;
    margin-left: 10px;
}

.message-content {
    max-width: 70%;
    background: white;
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bot-message .message-content {
    border-bottom-left-radius: 5px;
}

.user-message .message-content {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 5px;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    display: block;
    margin-top: 5px;
}

.chatbot-quick-questions {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.quick-question {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-question:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.chatbot-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chatbot-input {
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
}

#chatbot-input:focus {
    border-color: #007bff;
}

#chatbot-send {
    width: 40px;
    height: 40px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#chatbot-send:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #6c757d;
}

.typing-indicator {
    display: flex;
    gap: 3px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    #chatbot {
        width: calc(100vw - 40px);
        height: 70vh;
        right: -10px;
    }
    
    #chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    #chatbot {
        width: calc(100vw - 20px);
        height: 80vh;
    }
    
    .message-content {
        max-width: 85%;
    }
}
/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.gallery-item img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* News Section */
.news-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.news-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Filter Section */
.filter-section {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-section .form-control,
.filter-section .form-select {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .language-toggle {
        position: static;
        margin-bottom: 1rem;
        justify-content: center;
    }
    
    .leader-card {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Footer */
footer {
    margin-top: 3rem;
}

/* Utilities */
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bangla Font Support */
body[lang="bn"] {
    font-family: 'SolaimanLipi', 'Kalpurush', Arial, sans-serif;
}

/* Print Styles */
@media print {
    .language-toggle,
    .navbar,
    footer {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
}