/* Custom Styles for AI Content Creator's Playbook */

body {
    background-color: #1a1a1a; /* Dark background */
    color: #f8f9fa; /* Light text */
    overflow-x: hidden; /* Prevent horizontal scroll / content being pushed off */
}

/* --- Top Navigation Bar --- */
.main-top-nav {
    background-color: #111 !important; /* Slightly darker header */
    border-bottom: 1px solid #333;
    z-index: 1030; /* Ensure it's above other content */
}

.main-top-nav .navbar-brand img {
    max-height: 40px;
}

.main-top-nav .nav-link {
    color: #f8f9fa !important;
    transition: color 0.3s ease;
    display: flex; 
    align-items: center;
}

.main-top-nav .nav-link img {
    max-height: 20px; 
    margin-right: 8px;
}

.main-top-nav .nav-link:hover,
.main-top-nav .nav-link:focus {
    color: #ffc107 !important; /* Highlight color on hover */
}

/* --- Mobile Hamburger Menu --- */
.mobile-nav-menu-container {
    background-color: #111; 
    position: fixed;
    top: 56px; /* Height of the .main-top-nav, adjust if needed */
    left: 0;
    right: 0;
    z-index: 1020; /* Below top nav, above content */
    max-height: calc(100vh - 56px); /* Full height minus top nav */
    overflow-y: auto; /* Scrollable */
    border-bottom: 1px solid #333;
}

.mobile-nav-scrollable {
    padding: 1rem;
}

.mobile-nav-scrollable .nav-link {
    color: #f8f9fa !important;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #2a2a2a;
}

.mobile-nav-scrollable .nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-scrollable .nav-link:hover,
.mobile-nav-scrollable .nav-link:focus {
    color: #ffc107 !important;
    background-color: #2a2a2a;
}

/* --- Page Wrapper & Desktop Sidebar --- */
.page-wrapper {
    display: flex;
    padding-top: 56px; /* Height of fixed top navbar */
}

.sidebar-nav {
    width: 250px; /* Width of the sidebar */
    position: fixed;
    top: 56px; /* Height of fixed top navbar */
    left: 0;
    bottom: 0;
    background-color: #111; /* Match top nav */
    padding-top: 1rem;
    overflow-y: auto; /* Scrollable if content exceeds height */
    border-right: 1px solid #333;
    z-index: 1000;
}

.sidebar-nav .nav-link {
    color: #f8f9fa !important;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #2a2a2a;
}
.sidebar-nav .nav-link:last-child {
    border-bottom: none;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
    color: #ffc107 !important;
    background-color: #2a2a2a;
}

/* --- Main Content Area --- */
.main-content {
    flex-grow: 1;
    padding: 1.5rem;
    /* padding-top is handled by .page-wrapper */
}

@media (min-width: 992px) { /* lg and up */
    .main-content {
        margin-left: 250px; /* Same as sidebar width */
    }
}

/* --- General Content Styling (headings, prompts, etc.) --- */
main h1, main h2, main h3 {
    color: #ffc107; /* Accent color for headings */
    margin-top: 2rem;
    margin-bottom: 1rem;
}

main h1 {
    border-bottom: 2px solid #ffc107;
    padding-bottom: 0.5rem;
}

main hr {
    border-top: 1px solid #444;
    margin: 2rem 0;
}

.prompt-section {
    background-color: #2b2b2b; 
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.prompt-section h2, .prompt-section h3 {
    margin-top: 0;
    color: #ffc107;
}

.prompt-section pre {
    background-color: #111;
    color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #444;
    white-space: pre-wrap; 
    word-wrap: break-word;
    position: relative; 
}

.prompt-section .interactive-prompt-area {
    margin-top: 1rem;
}

.prompt-section .prompt-input-group {
    margin-bottom: 0.5rem;
}

.prompt-section .prompt-input-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: #ccc;
}

.prompt-section .prompt-input-group input[type="text"],
.prompt-section .prompt-input-group textarea {
    width: 100%;
    padding: 0.5rem;
    background-color: #444;
    border: 1px solid #666;
    color: #f8f9fa;
    border-radius: 4px;
}

.prompt-section .prompt-input-group input[type="text"]::placeholder,
.prompt-section .prompt-input-group textarea::placeholder {
    color: #a0a0a0; 
    opacity: 1; 
}

.prompt-section .copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffc107;
    color: #111;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.prompt-section .copy-button:hover {
    background-color: #e0a800;
}

.cta-button {
    background-color: #ffc107;
    color: #111;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #e0a800;
    color: #111;
    transform: translateY(-2px);
}

/* --- About Authors Image --- */
#about-authors img {
    max-width: 100%; /* Ensures image is responsive and doesn't overflow its container */
    height: auto; /* Maintains aspect ratio */
    display: block; /* Removes extra space below image */
    margin-left: auto;
    margin-right: auto;
}

/* --- Footer --- */
.site-footer {
    background-color: #111 !important;
    border-top: 1px solid #333;
    padding: 1.5rem 0;
    /* Ensure footer is below sidebar if content is short */
    position: relative; 
    z-index: 1; /* To ensure it's not overlapped by absolutely positioned elements if any */
}

@media (min-width: 992px) {
    .site-footer {
        margin-left: 250px; /* Match sidebar width */
    }
    #about-authors img {
        max-width: 600px; /* Specific max-width for larger screens */
    }
}


/* --- Responsive Adjustments for Navigation --- */
@media (max-width: 991.98px) { /* Below lg */
    .sidebar-nav {
        display: none; /* Hide desktop sidebar */
    }
    .main-content {
        margin-left: 0; /* Full width on mobile */
    }
    .site-footer {
        margin-left: 0; /* Full width on mobile */
    }
}

@media (max-width: 576px) {
    main h1 {
        font-size: 1.8rem;
    }
    main h2 {
        font-size: 1.5rem;
    }
    .prompt-section {
        padding: 1rem;
    }
    .main-top-nav .navbar-brand img {
        max-height: 30px; /* Smaller logo on very small screens */
    }
    .main-top-nav .nav-link img {
        max-height: 18px;
    }
    #about-authors img {
        max-width: 90%; /* Slightly smaller than full width on very small screens for padding */
    }
}

/* Scrollspy active state for sidebar/mobile menu */
.sidebar-nav .nav-link.active,
.mobile-nav-scrollable .nav-link.active {
    font-weight: bold;
    border-left: 3px solid #ffc107; /* Example active indicator */
    padding-left: calc(1rem - 3px);
}

/* Ensure content sections have IDs for scrollspy */
#guide-content > section {
    padding-top: 70px; /* Offset for fixed navbar */
    margin-top: -70px; /* Negative margin to counteract padding for scrollspy */
}

