/* --- CSS Variables for Easy Theming --- */
:root {
    --primary-color: #00A3FF; /* Vibrant Blue */
    --background-color: #0d1117; /* Dark Navy/Charcoal */
    --card-background: #161b22; /* Slightly lighter dark */
    --text-color: #c9d1d9; /* Light Grey */
    --heading-color: #ffffff; /* White */
    --border-color: #30363d;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    line-height: 1.2;
}

h1 { font-size: 3.5rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 3rem; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; }
blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    color: var(--text-color);
    margin: 1rem 0;
    font-style: italic;
    font-weight: bold;
}

/* --- Header & Navigation --- */
.admin-nav {
    background-color: var(--card-background);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-nav .container {
    display: flex;
    gap: 20px;
    align-items: center;
}

.admin-nav a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.admin-nav a:hover {
    color: var(--primary-color);
}

header {
    background-color: rgba(13, 17, 23, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--heading-color);
}

.logo img {
    margin-right: 0.75rem;
    border-radius: 5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hamburger Menu Button - Hidden on Desktop */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--heading-color);
}

/* --- Hero Section --- */
#hero {
    background-color: #0d1117;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

#hero h1 {
    background: linear-gradient(90deg, #ffffff, #a7dfff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.8;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--heading-color);
    padding: 1rem 2rem;
    border-radius: 5px;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #007fcc;
    transform: translateY(-3px);
}

/* --- Services Section --- */
#resources, #about {
    padding: 6rem 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 163, 255, 0.1);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 1px solid var(--primary-color);
}

.card p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* --- Back to Top --- */
.back-to-top {
    text-align: right;
    margin-bottom: 1rem;
}

.back-to-top a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.back-to-top a:hover {
    color: var(--primary-color);
}

/* --- Back Link --- */
.back-link {
    margin-top: 2.5rem;
    text-align: center;
    display: block;
    font-size: 0.9rem;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Page Layout (Sidebar) --- */
.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
/*--- responsive image --- */

.author-photo-responsive {
    max-width: 90%;
    height: auto;
    border-radius: 90%;
    margin: 1rem 0;
    margin-right: 1rem;
    float: left;
}
@media (min-width: 768px) {
    .page-layout {
        grid-template-columns: 3fr 1fr;
    }
}

.sidebar {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.sidebar ul {
    list-style: none;
    margin-bottom: 2rem;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: var(--text-color);
    transition: color 0.2s;
}

.sidebar a:hover {
    color: var(--primary-color);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-msg {
    color: #ff4d4d;
    background-color: rgba(255, 77, 77, 0.1);
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.success-msg {
    color: #2ea043;
    background-color: rgba(46, 160, 67, 0.1);
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* --- Dashboard Table --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--heading-color);
}

/* --- Responsive Design & Mobile Nav --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    /* Show Hamburger Button */
    .hamburger-btn {
        display: block;
    }
    
    /* Mobile Navigation Styling */
    nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 70%;
        height: 100vh;
        background-color: var(--card-background);
        transition: right 0.4s ease-in-out;
        padding-top: 5rem;
    }
    
    /* Active state for the nav (toggled by JS) */
    nav.nav-active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    nav a {
        font-size: 1.2rem;
    }
    
    /* Animate Hamburger to an "X" when nav is active */
    .nav-active .hamburger-btn .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-active .hamburger-btn .bar:nth-child(2) {
        opacity: 0;
    }
    .nav-active .hamburger-btn .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}