/* Import Modern Typography */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Premium Light Theme with Clean Professional Blue Palette */
:root {
    --bg-primary: #f8fafc; /* Slate-50 */
    --bg-secondary: #ffffff; /* Pure White */
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0; /* Slate-200 */
    --border-glow: rgba(37, 99, 235, 0.15);
    
    --text-primary: #0f172a; /* Slate-900 */
    --text-secondary: #334155; /* Slate-700 */
    --text-muted: #64748b; /* Slate-500 */
    
    --accent-primary: #2563eb; /* Royal Blue */
    --accent-secondary: #1d4ed8; /* Deep Royal Blue */
    --accent-success: #10b981; /* Emerald */
    --accent-warning: #f59e0b; /* Amber */
    --accent-error: #ef4444; /* Rose */
    
    --brand-dark: #0f172a; /* Slate-900 for dark accents */
    
    --font-en: 'Inter', sans-serif;
    --font-bn: 'Hind Siliguri', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 0 15px rgba(37, 99, 235, 0.15);
    
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-bn), var(--font-en);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-fast);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    text-decoration: none;
}

.logo i {
    color: var(--accent-primary);
    padding: 8px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: var(--radius-sm);
}

.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
}

.btn-primary {
    background: var(--accent-primary);
    color: white !important;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary) !important;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-primary) !important;
}

.btn-danger {
    background: var(--accent-error);
    color: white !important;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.btn-danger:hover {
    filter: brightness(0.9);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0 50px 0;
    text-align: center;
}

.hero-tag {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-primary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--brand-dark);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 750px;
    margin: 0 auto 30px auto;
}

/* School Info Board */
.school-info-board {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 35px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-md);
}

.school-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
}

@media (max-width: 768px) {
    .school-info-grid {
        grid-template-columns: 1fr;
    }
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    background: rgba(37, 99, 235, 0.08);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    color: var(--accent-primary);
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-top: 4px;
}

/* Project Cards Section */
.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    color: var(--brand-dark);
    position: relative;
    padding-bottom: 12px;
}

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow-md);
}

.project-image-wrapper {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-card:hover .project-image {
    transform: scale(1.04);
}

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.project-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--brand-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.project-title:hover {
    color: var(--accent-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
}

.project-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.project-author i {
    color: var(--accent-primary);
}

.project-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: var(--accent-secondary);
    transform: translateX(3px);
}

/* Detail Page Layout */
.project-detail-layout {
    padding: 40px 0 80px 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 30px;
    transition: var(--transition-fast);
    font-weight: 600;
}

.back-btn:hover {
    color: var(--accent-primary);
    transform: translateX(-3px);
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-main {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 35px;
    box-shadow: var(--shadow-md);
}

.detail-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--brand-dark);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.meta-item i {
    color: var(--accent-primary);
}

.detail-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.detail-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-top: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.detail-video-container iframe,
.detail-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.rich-content {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.rich-content p {
    margin-bottom: 20px;
}

.rich-content h2, .rich-content h3 {
    margin: 30px 0 15px 0;
    color: var(--brand-dark);
    font-weight: 700;
}

.rich-content ul, .rich-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.rich-content li {
    margin-bottom: 8px;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.widget-title i {
    color: var(--accent-primary);
}

/* Team List Style */
.team-list {
    list-style: none;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.team-member:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
}

.member-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* QR Code Scan Info Page Widget */
.qr-widget-container {
    text-align: center;
}

.qr-widget-img {
    background: white;
    padding: 15px;
    border-radius: var(--radius-md);
    margin: 15px auto;
    display: inline-block;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    width: 180px;
    height: 180px;
}

.qr-widget-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Footer Section */
footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-dark);
}

.footer-logo i {
    color: var(--accent-primary);
}

.footer-text {
    font-size: 0.95rem;
}

/* Forms & Login UI */
.login-wrapper {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-md);
}

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

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

/* Admin Dashboard Table */
.admin-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.admin-table-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-table-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brand-dark);
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 16px 25px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.actions-cell {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: #f1f5f9;
}

.btn-icon.edit:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-icon.delete:hover {
    color: var(--accent-error);
    border-color: var(--accent-error);
}

.btn-icon.print:hover {
    color: var(--accent-success);
    border-color: var(--accent-success);
}

/* Dashboard Info boxes */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--brand-dark);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-primary);
}

/* Printable QR Code Card Template Layout */
.print-card-outer {
    background: white;
    color: #111827;
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    border: 4px double #111827;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-family: var(--font-bn), sans-serif;
    text-align: center;
}

.print-card-header {
    border-bottom: 3px double #111827;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.print-school {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #4b5563;
}

.print-exhibition {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 5px;
    color: #111827;
}

.print-card-body {
    padding: 10px 0;
}

.print-project-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #000;
}

.print-team {
    font-size: 1.1rem;
    font-weight: 600;
    background: #f3f4f6;
    display: inline-block;
    padding: 4px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.print-qr-holder {
    margin: 15px auto;
    padding: 15px;
    border: 1px solid #e5e7eb;
    display: inline-block;
    background: white;
}

.print-qr-holder img {
    display: block;
    width: 250px;
    height: 250px;
}

.print-instruction {
    font-size: 1rem;
    color: #4b5563;
    margin-top: 15px;
    font-weight: 600;
}

.print-actions-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: flex;
    gap: 10px;
}

/* Mobile responsive menu hamburger */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--brand-dark);
    cursor: pointer;
    background: none;
    border: none;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
}

/* Print CSS */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    header, footer, .print-actions-sticky, .back-btn {
        display: none !important;
    }
    
    .print-card-outer {
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
}
