/* Global Reset & Variables */
:root {
    --primary-color: #f38f20;
    /* Saffron */
    --primary-dark: #d3730e;
    --secondary-color: #1a5632;
    /* India Green */
    --accent-color: #004b8d;
    /* Professional Blue */
    --text-dark: #2c3e50;
    --text-light: #596275;
    --bg-light: #f4f6f9;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --font-heading: 'Noto Sans Devanagari', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.main-header {
    background-color: var(--bg-white);
    padding: 10px 0;
    border-bottom: 4px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrapper {
    display: flex;
    align-items: center;
}

.main-logo {
    height: 75px;
    object-fit: contain;
}

/* Navigation */
.nav-list {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-list a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    padding: 5px 0;
    position: relative;
}

.nav-list a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
    position: absolute;
    bottom: 0;
    left: 0;
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--text-dark);
    transition: 0.3s;
    border-radius: 2px;
}

/* Marquee Section */
.marquee-section {
    background: linear-gradient(90deg, var(--secondary-color) 0%, #144528 100%);
    color: #fff;
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.marquee-container {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.marquee-label {
    background-color: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-radius: 4px;
    margin-right: 15px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

marquee {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Main Content Layout */
.main-content {
    padding: 40px 0;
    min-height: 600px;
}

.content-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Info Cards (Home, etc.) */
.info-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.card-header {
    background-color: #fff;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2,
.card-header h3 {
    margin: 0;
    color: var(--accent-color);
    font-family: var(--font-heading);
}

.card-body {
    padding: 25px;
}

.hero-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: flex-start;
}

.feature-image {
    width: 100%;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.text-content {
    flex: 1;
}

.text-content .lead {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 500;
}

.text-content p {
    margin-bottom: 20px;
    color: var(--text-light);
    text-align: justify;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Content Details */
/* Page Content Styling (Detailing) */
.about-content h2,
.text-content h2,
.result-section h2 {
    color: var(--primary-dark);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.about-content p,
.text-content p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.8;
    text-align: justify;
}


/* Sidebar Widgets */
.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    background: linear-gradient(135deg, var(--accent-color), #003366);
    color: #fff;
    padding: 15px 20px;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.widget-links {
    padding: 10px 0;
}

.widget-links li {
    border-bottom: 1px solid #f1f1f1;
}

.widget-links li:last-child {
    border-bottom: none;
}

.widget-links a {
    display: block;
    padding: 12px 20px;
    color: var(--text-light);
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
}

.widget-links a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    padding-left: 25px;
}

/* Inquiry Form */
.inquiry-form {
    padding: 20px;
}

.inquiry-form .form-group {
    margin-bottom: 15px;
}

.inquiry-form input,
.inquiry-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-block {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-block:hover {
    background-color: #144528;
}

/* Footer Styling */
.main-footer {
    background-color: #222;
    color: #eee;
    padding: 60px 0 0;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 15px;
}

.footer-text p {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.6;
}

.links-col ul li {
    margin-bottom: 8px;
}

.links-col a {
    color: #ccc;
    font-size: 0.9rem;
}

.links-col a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-form input,
.footer-form textarea {
    background: #333;
    border: 1px solid #444;
    color: #fff;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
}

.footer-bottom {
    background: #111;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #777;
    border-top: 1px solid #333;
}

/* --- RESULT MARK SHEET STYLES --- */
.result-section button.btn-submit {
    margin-top: 20px;
    background-color: var(--primary-color);
}

.result-card-body {
    padding: 30px;
}

.result-form-container {
    max-width: 600px;
    margin: 0 auto 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.result-search-group {
    display: flex;
    gap: 10px;
}

.result-search-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* Certificate Layout */
.mark-sheet-container {
    border: 10px double var(--secondary-color);
    padding: 40px;
    background: #fff;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.mark-sheet-container::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 2px solid var(--primary-color);
    pointer-events: none;
}

.mark-sheet-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.sheet-logo {
    height: 100px;
    margin-bottom: 10px;
}

.sheet-title {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--secondary-color);
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 5px;
}

.sheet-sub-title {
    font-size: 1.2rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.student-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85rem;
    color: #777;
    text-transform: uppercase;
    font-weight: 600;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 2px;
}

/* Mark Table */
.marks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 2px solid #333;
}

.marks-table th,
.marks-table td {
    border: 1px solid #333;
    padding: 12px;
    text-align: center;
}

.marks-table th {
    background-color: #f0f0f0;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.marks-table td {
    font-size: 1.1rem;
}

.total-row td {
    background-color: #f9f9f9;
    font-weight: bold;
    font-size: 1.2rem;
}

.status-pass {
    color: green;
    font-weight: 800;
}

.status-fail {
    color: red;
    font-weight: 800;
}

.sheet-footer {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.signature-box {
    text-align: center;
    width: 200px;
}

.signature-line {
    border-top: 2px solid #333;
    margin-top: 50px;
    padding-top: 5px;
    font-weight: 600;
}

.print-btn-container {
    margin-top: 30px;
    text-align: center;
}

.result-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 25px;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.result-btn-large:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

@media print {
    body * {
        visibility: hidden;
    }

    .mark-sheet-container,
    .mark-sheet-container * {
        visibility: visible;
    }

    .mark-sheet-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        box-shadow: none;
        border: 5px double var(--secondary-color);
    }

    .print-btn-container {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-card .card-body {
        flex-direction: column;
    }

    .feature-image,
    .text-content {
        width: 100%;
    }

    .feature-image {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        flex-wrap: nowrap;
        /* Prevent wrapping hiding the logo */
    }

    /* Mobile Nav - Side Fly */
    .main-nav {
        width: auto;
        /* reset */
    }

    .nav-list {
        display: flex;
        /* Always display for transition */
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 250px;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        padding-top: 60px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1001;
        margin-top: 0;
        /* Remove previous margin */
        border-top: none;
    }

    .main-nav.active .nav-list {
        right: 0;
        /* Slide in */
    }

    /* Logo Visibility Fix */
    .brand-wrapper {
        flex: 1;
        overflow: hidden;
        /* Prevent spill */
    }

    .main-logo {
        height: 50px;
        /* Smaller on mobile */
        width: auto;
        object-fit: contain;
    }

    /* Menu Toggle Button z-index fix */
    .menu-toggle {
        display: flex;
        z-index: 1002;
        /* Above menu */
        position: relative;
    }

    .nav-list>li>a {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 15px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .mark-sheet-container {
        padding: 20px;
        border-width: 5px;
    }

    .sheet-title {
        font-size: 1.5rem;
    }

    .student-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin Dashboard Styles */
.admin-container {

    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.admin-container h2 {
    color: var(--primary-dark);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    font-size: 1.5rem;
}

.admin-container form {
    margin-bottom: 40px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.admin-container label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.admin-container .form-control,
.admin-container select,
.admin-container input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
}

.admin-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95rem;
}

.admin-container table th,
.admin-container table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.admin-container table th {
    background-color: var(--secondary-color);
    color: #fff;
    font-weight: 600;
}

.admin-container table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.admin-container table tr:hover {
    background-color: #f1f1f1;
}

.admin-container .btn {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
}