/* ==========================================
   1. GLOBAL STYLES (The Foundation)
   ========================================== */
body {
    font-family: 'Georgia', serif;
    background-color: #f4f1ea;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* ==========================================
   2. HEADER & NAVIGATION (The Structure)
   ========================================== */
.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 3px solid #8a2be2; /* Alice Purple */
    margin-bottom: 30px;
}

.header-container img {
    height: 80px;
    margin-right: 20px;
}

h1 { color: #8a2be2; margin: 0; }

/* ==========================================
   3. BUTTONS & DROPDOWNS (Interactive)
   ========================================== */
.control-panel {
    display: flex;
    flex-direction: row;    /* Put items side-by-side */
    justify-content: center; /* Center them horizontally */
    align-items: center;    /* Align them vertically */
    gap: 20px;              /* Space between the two buttons */
    margin: 30px 0;         /* Space above and below the button row */
}

/* Essay list aligned to the left */
#latest-essays {
    text-align: left;       /* Keeps the heading and list on the left */
    max-width: 800px;       /* Optional: keeps the text from stretching too far */
    margin: 20px 0;         /* Space above the section */
}

/* 1. Fix the Essay List (Force them to be a vertical list) */
#latest-essays ul {
    list-style-type: disc;
    padding-left: 20px;
    text-align: left;
}

#latest-essays li {
    display: list-item; /* Forces them to stay on their own line */
    margin-bottom: 10px;
}

#latest-essays a {
    text-decoration: none;
    color: #007bff; /* Standard link blue, or your theme color */
}

/* This tells the browser: "Apply these styles to BOTH the link and the button" */
/* 1. Unified Button Style for both Links and Buttons */
.btn, .dropdown-btn {
    background-color: #8a2be2; /* Keeping your Purple color! */
    color: white !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;    /* Removes underline from link */
    border: none;             /* Removes 3D border from button */
    cursor: pointer;
    display: inline-block;    /* Makes the link act like a box */
    line-height: normal;
    vertical-align: middle;
    transition: 0.3s;
}
 
    /* --- ADD THESE to fix the 'link vs button' look --- */
    display: inline-flex;    /* This aligns text and arrows perfectly */
    align-items: center;     /* Centers text vertically inside the button */
    text-decoration: none;   /* Removes the blue underline from the link */
    border: none;            /* Removes the default button border */
    cursor: pointer;         /* Makes the link and button both show a 'hand' cursor */
    font-family: inherit;    /* Makes the button use the site's font */
}

/* Makes sure the link doesn't turn purple/blue after clicking */
.btn:visited {
    color: white !important;
}


/* Hover state for both */
.btn:hover, .dropdown-btn:hover {
    background-color: #6a1bbd; /* A slightly darker purple on hover */
    color: white !important;
}

/* Dropdown Logic */
.dropdown { position: relative; display: inline-block; }

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 100;
    border-radius: 4px;
    text-align: left; 
    text-align: left;
}

.dropdown:hover .dropdown-content { 
    display: block; 
}

.dropdown-content a {
    padding: 12px 16px;
    display: block;
    color: black;
    text-decoration: none;
}
.dropdown-content a:hover { 
    background: #f1f1f1; 
}

/* ==========================================
   4. ESSAY LISTS & LINKS (Content)
   ========================================== */
.essay-list { list-style: none; padding: 0; }
.essay-list li { padding: 12px 0; border-bottom: 1px solid #eee; }
.essay-list a {
    color: #8a2be2;
    font-size: 1.1em;
    text-decoration: none;
}
.essay-list a:hover { text-decoration: underline; }


/* --- Context Box for Comments --- */
.context-box {
    background: #fdfaf4;
    padding: 15px;
    border-left: 5px solid #8a2be2;
    margin-bottom: 20px;
    border-radius: 4px;
    font-style: italic;
    color: #555;
}


/* Centering the entire form block */
.form-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.form-container {
    max-width: 650px;
    width: 100%;
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #444;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Crucial for keeping padding inside the width */
}

.form-actions {
    text-align: center;
    margin-top: 25px;
}

.btn-cancel {
    margin-left: 15px;
    color: #888;
    text-decoration: none;
}

.btn-cancel:hover {
    text-decoration: underline;
}
