/* /public_html/css/style.css */

/* --- Core Variables and Theming --- */
:root {
    /* Light Theme (Default) */
    --primary-color: #007bff; /* Example blue */
    --secondary-color: #6c757d; /* Example gray */
    --background-color: #ffffff;
    --text-color: #212529; /* Dark gray */
    --card-background: #f8f9fa;
    --border-color: #dee2e6;
    --link-color: var(--primary-color);
    --header-bg: #f8f9fa;
    --footer-bg: #e9ecef;
    --button-bg: var(--primary-color);
    --button-text: #ffffff;
    --button-hover-bg: #0056b3;

    /* Spacing & Font Sizes */
    --base-font-size: 16px;
    --spacing-unit: 1rem; /* Approx 16px */
    --container-max-width: 1200px; /* Max width for larger screens */
    --container-padding: 15px;

    /* Font Family */
    --font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary-color: #0d6efd; /* Slightly different blue for dark */
    --secondary-color: #adb5bd; /* Lighter gray */
    --background-color: #121212; /* Very dark gray */
    --text-color: #e9ecef; /* Light gray */
    --card-background: #1e1e1e; /* Darker card */
    --border-color: #495057; /* Darker border */
    --link-color: #6ea8fe; /* Lighter blue link */
    --header-bg: #1e1e1e;
    --footer-bg: #212529;
    --button-bg: var(--primary-color);
    --button-text: #ffffff;
    --button-hover-bg: #0a58ca;
}

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

html {
    font-size: var(--base-font-size);
    line-height: 1.6;
    scroll-behavior: smooth;
    /* Apply theme background and text color */
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth theme transition */
}

body {
    font-family: var(--font-family-sans-serif);
    display: flex; /* For sticky footer pattern */
    flex-direction: column;
    min-height: 100vh;
    background-color: inherit; /* Inherit from html for transition */
    color: inherit; /* Inherit from html for transition */
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--primary-color); /* Adjust hover color if needed */
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents bottom space */
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75em;
    line-height: 1.3;
    font-weight: 600;
}

/* --- Layout Containers --- */
.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    margin-left: auto;
    margin-right: auto;
}

/* Limit container width on larger screens */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}
@media (min-width: 1200px) {
    .container {
        max-width: var(--container-max-width);
    }
}

/* --- Header --- */
.site-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: calc(var(--spacing-unit) * 0.75) 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.site-header .logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}
.site-header .logo a {
    color: inherit; /* Use body text color */
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-unit); /* Space between nav items */
    margin: 0; /* Reset margin */
    padding: 0; /* Reset padding */
}

.main-nav a {
    text-decoration: none;
    font-weight: 500;
}

.header-actions button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.header-actions button:hover {
    background-color: var(--button-hover-bg);
}

/* Mobile Header adjustments (Example) */
@media (max-width: 767px) {
    .main-nav {
        /* Basic: hide for now, implement hamburger menu later */
        /* display: none; */
        /* Or stack items */
        order: 3; /* Move nav below logo/actions */
        width: 100%;
        justify-content: center;
        margin-top: var(--spacing-unit);
    }
     .site-header .container {
        justify-content: space-between; /* Keep logo and actions apart */
     }
}


/* --- Main Content Area --- */
.site-content {
    flex-grow: 1; /* Makes content area fill space for sticky footer */
    padding-top: var(--spacing-unit);
    padding-bottom: var(--spacing-unit);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-unit) 0;
    margin-top: auto; /* Pushes footer to bottom */
    font-size: 0.9rem;
    color: var(--secondary-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-unit);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-unit);
    padding: 0;
    margin: 0;
}

.footer-nav a {
    color: var(--secondary-color);
}
.footer-nav a:hover {
    color: var(--link-color);
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--spacing-unit); }
.mb-1 { margin-bottom: var(--spacing-unit); }
/* Add more as needed */

/* === Comment Section Styles === */
.comments-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color); /* Add separator */
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color); /* Ensure heading color fits theme */
    font-size: 1.4rem;
}

.comment {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-wrap: break-word; /* Prevent long words breaking layout */
}

.comment-header {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9em;
    color: var(--secondary-color);
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 0.5rem;
}

.comment-author {
    font-weight: bold;
    color: var(--link-color); /* Use link color for author */
    margin-right: 10px; /* Space between author and date */
}
.comment-author a { color: inherit; text-decoration: none;}
.comment-author a:hover { text-decoration: underline; }


.comment-date {
    font-style: italic;
    white-space: nowrap; /* Prevent date wrapping */
}

.comment-body {
    margin-top: 0.5rem;
    line-height: 1.5; /* Improve readability */
}

.comment-actions {
    margin-top: 0.75rem;
    font-size: 0.9em;
}

.comment-actions button { /* Basic button style */
     background: none;
     border: none;
     color: var(--secondary-color);
     cursor: pointer;
     padding: 2px 5px;
     margin-right: 10px;
     vertical-align: middle; /* Align button text/icons better */
}
 .comment-actions button:hover {
     color: var(--primary-color);
 }

/* Styling for comment form */
.add-comment-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--card-background);
}

.add-comment-form h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
     color: var(--text-color); /* Theme color */
}

.add-comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    background-color: var(--background-color); /* Match theme */
    color: var(--text-color); /* Match theme */
}
.add-comment-form textarea:focus {
     border-color: var(--primary-color);
     outline: none;
}


.add-comment-form button {
    padding: 0.5rem 1rem;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}
.add-comment-form button:hover {
    background-color: var(--button-hover-bg);
}

/* Login prompt for comments */
.login-prompt {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 5px;
}
.login-prompt p { margin: 0; color: var(--secondary-color); }

/* No comments message */
.no-comments {
    text-align: center;
    color: var(--secondary-color);
    margin-top: 1rem;
    padding: 1rem;
}

/* Add this to style.css */
.comment-actions button.active {
    font-weight: bold;
    color: var(--primary-color); /* Or another highlight color */
}