/* css/style.css */

/* --- 1. Global Setup & Variables --- */
:root {
    --bg-color: #1B1B1D;
    --primary-accent: #67EA94; /* Vibrant Cyan */
    --secondary-accent: #35db6e; /* Muted Amber */
    --text-color: #e0e0e0;
    --heading-color: #ebedf0;
    --card-bg: #242526;
    --border-color: #22c55e;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.info-main {
	 min-width: 70% !important;
 
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 1rem;
}

/* --- 2. Animated Background --- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* Puts it behind everything else */
}

/* --- 3. Header & Navigation --- */
header {
    background: rgba(34, 197, 94, 0.1);
    backdrop-filter: blur(10px); /* Frosted glass effect */
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--heading-color);
    text-decoration: none;
    font-weight: 700;
}
.logo:hover {
    color: var(--primary-accent);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
    white-space: nowrap;
}

nav a:hover, nav a.active {
    color: var(--primary-accent);
}

/* --- 4. Main Content Sections --- */
main {
    padding-top: 100px; /* Offset for fixed header */
}

.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    background: linear-gradient(90deg, var(--heading-color), var(--primary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--primary-accent);
    color: var(--bg-color);
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background: var(--secondary-accent);
    transform: translateY(-3px);
}

.cta0-button {

    background: var(--primary-accent);
    color: var(--bg-color);
	 padding-top: 5px;
	 padding-bottom: 9px;
	 padding-left: 9px;
	 padding-right: 9px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 23px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta0-button:hover {
    background: var(--secondary-accent);
    transform: translateY(-3px);
}

/* --- 5. Blog Post Cards --- */
.blog-section {
    padding: 4rem 0;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Find this existing rule */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* <-- ADD THIS LINE */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 245, 212, 0.1);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    color: var(--primary-accent);
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.card p {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.card .read-more {
    display: inline-block;
    padding: 0 1.5rem 1.5rem 1.5rem;
    text-decoration: none;
    color: var(--secondary-accent);
    font-weight: 700;
}

.card .read-more:hover {
    text-decoration: underline;
}

/* --- 6. Footer --- */
footer {
	background: rgba(36, 37, 38, 0.5);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}




/* --- 8. Contact Form Styling --- */
.contact-section {
    padding: 4rem 0;
    text-align: center;
}

.contact-section p {
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
}

.contact-section .cta-button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Status Messages */
.status-msg {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 700;
}
.status-msg.success {
    background-color: rgba(0, 245, 212, 0.1);
    color: var(--primary-accent);
    border: 1px solid var(--primary-accent);
}
.status-msg.error {
    background-color: rgba(235, 30, 60, 0.9);
    color: white;
    border: 1px solid var(--secondary-accent);
}


/* --- 9. Single Post Styling --- */
.single-post-container {
    max-width: 800px;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.post-meta {
    margin-bottom: 2rem;
    color: var(--text-color);
    font-style: italic;
}
.post-meta a {
    color: var(--primary-accent);
    text-decoration: none;
}
.post-meta a:hover { text-decoration: underline; }

.post-content {
    line-height: 1.8;
}
.post-content h2, .post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-accent);
}
.post-content a {
    color: var(--secondary-accent);
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}
.post-content code {
    background: var(--bg-color);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}
.post-content pre {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

.post-tags {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}
.tag-link {
    display: inline-block;
    background: var(--bg-color);
    color: var(--primary-accent);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    text-decoration: none;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.3s;
}
.tag-link:hover {
    background: var(--primary-accent);
    color: var(--bg-color);
}



/* Can be reused from category management */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--card-bg);
}
.data-table th, .data-table td {
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    text-align: left;
}
.data-table th { background-color: var(--bg-color); }
.action-links a {
    color: var(--primary-accent);
    text-decoration: none;
    margin-right: 1rem;
}
.action-links a:hover { text-decoration: underline; }
.action-links a.delete { color: #ff6b6b; }


/* --- 10. Card and Badge Styling --- */

/* Add padding to a new container inside the card */
.card .card-content {
    padding: 1.5rem;
}

/* Remove padding from elements that don't need it anymore */
.card h3, .card p, .card .read-more {
    padding: 0;
}
.card h3 {
    padding-top: 0.5rem; /* Add some space below the badge */
    color: var(--heading-color); /* Make title white for better contrast */
}

/* The Category Badge itself */
.category-badge {
    position: absolute; /* This makes it an overlay */
    top: 15px;          /* Distance from the top of the card */
    right: 15px;         /* Distance from the right of the card */
    z-index: 10;        /* Ensures it's on top of the image */

    /* These styling properties remain the same */
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1b1b1d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- 11. Pagination Styling --- */
.pagination {
    margin: 3rem 0 1rem;
    display: flex;
    justify-content: center;
}

.pagination ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 0.5rem;
}

.pagination li span,
.pagination li a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: var(--text-color);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 700;
}

.pagination li a:hover {
    background-color: var(--primary-accent);
    color: var(--bg-color);
    border-color: var(--primary-accent);
}

/* Style for the current page */
.pagination li.active span {
    background-color: var(--primary-accent);
    color: var(--bg-color);
    border-color: var(--primary-accent);
    cursor: default;
}

/* Style for disabled Prev/Next links */
.pagination li.disabled span {
    color: #666;
    background-color: var(--bg-color);
    cursor: not-allowed;
}

.category-badge-link {
    text-decoration: none;
    display: inline-block; /* Helps with positioning */
}



        
        .log-container {
            font-family: 'Source Code Pro', monospace;
            background-color: #111;
            color: #00FF97;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 1.5rem;
            height: 60vh;
            overflow-y: scroll;
            display: flex;
            flex-direction: column; 
        }
        .log-entry {
            margin-bottom: 0.5rem;
            border-bottom: 1px dashed var(--border-color);
            padding-bottom: 0.5rem;
        }
        .log-meta {
            color: var(--text-color);
            font-size: 0.8em;
        }
        
        
        /*       ScrollBar 1        */
        
        #log-container::-webkit-scrollbar {
    	
            width: 18px;
        }
        
        #log-container::-webkit-scrollbar-track {
            border-top-right-radius: 6px;
            border-top-left-radius: 0px;
            border-bottom-right-radius: 6px;
            border-bottom-left-radius: 0px;
            background-color: #1B1B1D;
            border: 1px solid #22C55E;
        }
        
        #log-container::-webkit-scrollbar-thumb {
            border-radius: 3px;
          	border: 4px solid transparent;
           	background-clip: content-box;
            background-color: #22C55E;
        }
        
        #log-container::-webkit-scrollbar-thumb:hover {
        		border-radius: 3px;
          	border: 4px solid transparent;
          	background-clip: content-box;
            background-color: #00FF97;
}        


/* --- 12. Search Form Styling --- */
.search-form {
    display: flex;
    align-items: center;
}

.search-form input[type="search"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 1rem;
    border-radius: 20px 0 0 20px; /* Rounded on the left */
    font-family: var(--font-body);
    outline: none;
    transition: background 0.3s;
    min-width: 200px;
}

.search-form input[type="search"]:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-accent);
}

.search-form button {
    background: var(--primary-accent);
    border: 1px solid var(--primary-accent);
    color: var(--bg-color);
    padding: 10px 1rem;
    cursor: pointer;
    border-radius: 0 20px 20px 0; /* Rounded on the right */
    font-weight: 700;
    transition: background 0.3s;
}

.search-form button:hover {
    background: var(--secondary-accent);
    border-color: var(--secondary-accent);
}

/* Adjust header layout to accommodate the form */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem; /* Add some space */
}

/* --- Single Post Enhancements --- */
.back-link {
    display: inline-block;
    margin-bottom: 2rem; /* Add some space between the link and the content */
    text-decoration: none;
    color: var(--primary-accent);
    font-weight: 700;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-accent);
    text-decoration: underline;
}



/* A. Desktop Header Layout */
.header-container {
    display: flex;
    justify-content: space-between; /* This puts one item on the far left, and the other on the far right */
    align-items: center; /* This aligns them vertically in the middle */
    gap: 1.5rem;
}

header .logo {
    font-size: 1.8rem; /* Make logo slightly bigger */
    flex-shrink: 0; /* Prevent the logo from shrinking */
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* B. Hamburger Menu Button (Hidden on Desktop) */
#mobile-menu-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101; /* Ensure it's on top */
    width: 24px;
    height: 18px;
    position: relative;
}

#mobile-menu-toggle .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--heading-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

#mobile-menu-toggle .bar:not(:last-child) {
    margin-bottom: 5px;
}

/* C. Media Query for Mobile and Tablet */
@media (max-width: 1200px) { /* Adjust this breakpoint if needed */

    /* Hide the desktop navigation and search */
    .header-right {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Full screen height */
        background: rgba(26, 26, 46, 0.98); /* Almost solid background */
        backdrop-filter: blur(10px);
        padding: 6rem 2rem 2rem;
        align-items: center;
        justify-content: flex-start;
        gap: 2.5rem; /* More space for vertical layout */
    }

    /* Show the mobile menu when it's active */
    .header-right.nav-active {
        display: flex;
        z-index: 9999;
    }

    /* Show the hamburger button on mobile */
    #mobile-menu-toggle {
        display: block;
    }

    /* Style the nav links for the mobile overlay */
    header nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    header nav a {
        font-size: 1.2rem;
    }
}

/* D. Animation for Hamburger to "X" */
header.mobile-menu-open #mobile-menu-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
header.mobile-menu-open #mobile-menu-toggle .bar:nth-child(2) {
    opacity: 0;
}
header.mobile-menu-open #mobile-menu-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {

    /* Reduce the font size of the main hero heading on smaller screens */
    .hero h1 {
        font-size: 2.8rem; /* Drastically smaller than the desktop 3.5rem */
        line-height: 1.2;  /* Improve line spacing for wrapped text */
    }

    /* We can also slightly reduce the paragraph font size */
    .hero p {
        font-size: 1.1rem;
    }

    /* Adjust the padding on sections for better mobile spacing */
    .hero, .blog-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* A general "safety net" rule for the whole site to prevent overflow */
body {
    overflow-x: hidden; /* This hides any horizontal scrollbar */
    word-wrap: break-word; /* This will force long unbreakable words to wrap */
}