/* ============================================
   Dhaanyaganga KVK - Custom Styles
   ============================================ */

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

/* Custom Properties */
:root {
    --green-primary: #2E7D32;
    --green-secondary: #4CAF50;
    --green-light: #E8F5E9;
    --green-dark: #1B5E20;
    --green-accent: #66BB6A;
    --text-dark: #1a1a2e;
    --text-body: #4a4a68;
    --text-muted: #7c7c96;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-body);
    background-color: var(--bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.font-heading {
    font-family: 'Poppins', sans-serif;
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider {
    position: relative;
    height: 85vh;
    min-height: 550px;
    overflow: hidden;
    border-bottom-left-radius: 48px;
    border-bottom-right-radius: 48px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-primary));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
    background: white;
    transform: scale(1.2);
}

/* ============================================
   Section Styles
   ============================================ */
.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--green-primary), var(--green-accent));
    margin: 0.75rem auto 1rem;
    border-radius: 2px;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-12px) !important;
    border-color: var(--green-secondary);
}

/* ============================================
   Stats Counter
   ============================================ */
.stats-section {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 100%);
    position: relative;
    overflow: hidden;
    border-radius: 48px;
    margin: 2rem 1rem;
}

@media (min-width: 1024px) {
    .stats-section {
        margin: 4rem 2rem;
    }
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    color: white;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--green-accent);
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
}

/* ============================================
   Notice Board
   ============================================ */
.notice-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
    .notice-item {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
    }

    .notice-date {
        margin-bottom: 0;
        margin-right: 0;
        flex-shrink: 0;
    }
    
    .notice-item > div:last-child {
        width: 100%;
        min-width: 0;
    }
}

.notice-item:hover {
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.08);
    transform: translateX(4px) scale(1.01) !important;
    border-color: var(--green-secondary);
}

.notice-date {
    background: var(--green-light);
    color: var(--green-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    text-align: center;
    min-width: 60px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.notice-date .day {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.notice-date .month {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================
   Operational Blocks
   ============================================ */
.block-card {
    background: linear-gradient(135deg, rgba(232, 245, 233, 0.4) 0%, white 100%);
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(46, 125, 50, 0.1);
}

.block-card:hover {
    box-shadow: 0 16px 35px rgba(46, 125, 50, 0.08);
    transform: translateY(-10px) !important;
    border-color: var(--green-secondary);
}

.block-card h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--green-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.block-tag {
    display: inline-block;
    background: white;
    color: var(--green-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    margin: 0.2rem 0.15rem;
    border: 1px solid rgba(46, 125, 50, 0.15);
    transition: var(--transition);
}

.block-tag:hover {
    background: var(--green-primary);
    color: white;
}

/* ============================================
   Staff Cards
   ============================================ */
.staff-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

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

.staff-photo {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center 20%;
    background: linear-gradient(135deg, var(--green-light), #f0f0f0);
    will-change: transform;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.staff-info {
    padding: 1.25rem;
}

.staff-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.staff-designation {
    color: var(--green-primary);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

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

/* ============================================
   Activity Cards
   ============================================ */
.activity-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

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

.activity-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--green-light), #e0e0e0);
    will-change: transform;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.activity-badge {
    display: inline-block;
    background: var(--green-light);
    color: var(--green-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   Filter Buttons
   ============================================ */
.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid #e5e7eb;
    background: white;
    color: var(--text-body);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--green-primary);
    color: white;
    border-color: var(--green-primary);
}

/* ============================================
   Page Hero (Inner Pages)
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 50%, var(--green-secondary) 100%);
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: -1px; /* Overlaps seam to hide sub-pixel rendering artifact */
}

.page-hero>* {
    position: relative;
    z-index: 10;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-light);
    clip-path: ellipse(55% 100% at 50% 100%);
    z-index: 1;
}

.page-hero h1 {
    font-family: 'Poppins', sans-serif;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
}

.page-hero .breadcrumb {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.page-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

/* ============================================
   District Profile Cards
   ============================================ */
.district-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

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

.district-card .icon-wrap {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--green-light), rgba(76, 175, 80, 0.15));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.district-card .icon-wrap i {
    font-size: 1.5rem;
    color: var(--green-primary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--green-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-primary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero-slider {
        height: 75vh;
        min-height: 450px;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }
}

/* ============================================
   Admin Panel Styles
   ============================================ */
.admin-sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    transition: var(--transition);
}

.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.admin-sidebar .nav-item:hover,
.admin-sidebar .nav-item.active {
    background: rgba(76, 175, 80, 0.15);
    color: var(--green-accent);
    border-left-color: var(--green-accent);
}

.admin-sidebar .nav-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
}

.admin-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    background: #f0f2f5;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.admin-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s ease-in-out;
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

.admin-stat-card .stat-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-primary), var(--green-secondary));
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.35);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.82rem;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-edit {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.82rem;
}

.btn-edit:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
    vertical-align: middle;
}

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

/* Login page (Disabled heavy gradient for modern UI) */
/*
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 50%, #1a1a2e 100%);
}
*/

.login-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
    font-family: 'Inter', sans-serif;
    background: white;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Admin mobile responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 600px;
    }
}