/* =================================
   Global & Layout Styles
   ================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* =================================
   Header & Navigation
   ================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007aff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.nav-links li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links li a:hover {
    color: #007aff;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    display: none; /* Hidden on desktop */
}

/* =================================
   Ad Placeholder Styles
   ================================= */
.ad-placeholder {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: monospace;
    color: #999;
    margin: 2rem auto;
    border: 1px dashed #ccc;
    text-align: center;
    box-sizing: border-box;
    padding: 1rem;
}

/* =================================
   Generator Container (index.html)
   ================================= */
.container {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 600px;
    box-sizing: border-box;
}

.container h1 {
    text-align: center;
    color: #4a4a4a;
    margin-top: 0;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.control-group.full-width {
    grid-column: 1 / -1;
}
.control-group {
    display: flex;
    flex-direction: column;
}
.control-group label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.control-group input,
.control-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box; 
}
.options {
    display: flex;
    flex-direction: column; 
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.option-group {
    display: flex;
    align-items: center;
}
.option-group input {
    margin-right: 0.5rem;
}
.option-group label {
    transition: opacity 0.2s;
}
.option-group input:disabled + label {
    opacity: 0.5; 
}
.buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.buttons button {
    flex-grow: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
#generateBtn {
    background-color: #007aff;
    color: white;
}
#copyBtn {
    background-color: #e5e5e5;
    color: #333;
}
#outputText {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    width: 100%;
    min-height: 200px;
    box-sizing: border-box; 
    font-family: "Courier New", Courier, monospace;
    white-space: pre-wrap; 
    resize: vertical;
}
#stats {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    color: #555;
    margin-top: 1rem;
    text-align: right;
}

/* =================================
   Static Page (About, Contact, etc.)
   ================================= */
.static-container {
    background-color: #ffffff;
    padding: 2rem 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 800px;
    box-sizing: border-box;
}
.static-container h1 {
    margin-top: 0;
}
.static-container p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.static-container h2 {
    margin-top: 2rem;
}

/* =================================
   Blog List Page (blog.html)
   ================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    width: 100%;
}
.blog-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s;
}
.blog-card:hover {
    transform: translateY(-5px);
}
.blog-card-img {
    width: 100%;
    height: 200px;
    background-color: #e0e0e0;
    object-fit: cover;
}
.blog-card-content {
    padding: 1.5rem;
}
.blog-card-content h3 {
    margin-top: 0;
}
.blog-card-content .read-more {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: #007aff;
    font-weight: bold;
}

/* =================================
   Single Blog Post (blog-post-1.html)
   ================================= */
.blog-post {
    background-color: #ffffff;
    padding: 2rem 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 800px;
    box-sizing: border-box;
}
.blog-post .blog-header {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.blog-post .blog-header h1 {
    margin-bottom: 0.5rem;
}
.blog-post .blog-header .meta {
    font-style: italic;
    color: #777;
}
.blog-post .blog-content {
    line-height: 1.8;
}
.blog-post .blog-content p {
    margin-bottom: 1.5rem;
}
.blog-post .blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}

/* =================================
   Footer
   ================================= */
footer {
    background-color: #333;
    color: #f4f4f4;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto; 
    padding: 1rem 0;
}
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    text-align: center;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 1rem;
    display: flex;
    gap: 1.5rem;
}
.footer-links li a {
    color: #fff;
    text-decoration: none;
}
.footer-links li a:hover {
    text-decoration: underline;
}

/* =================================
   Mobile Responsive Styles
   ================================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show hamburger */
    }

    .nav-links {
        display: none; /* Hide desktop nav links */
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 65px; /* Height of header */
        left: 0;
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    /* This class is toggled by JavaScript */
    .nav-links.nav-active {
        display: flex;
    }
    
    .footer-content {
        flex-direction: column;
    }
    .footer-links {
        margin-top: 1rem;
    }
    
    .blog-post, .static-container {
        padding: 1.5rem;
    }
}
/* =================================
   Contact Page (contact.html)
   ================================= */
.contact-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-form {
    flex: 2; /* Form takes 2/3 of the space */
    min-width: 300px;
}

.contact-details {
    flex: 1; /* Details take 1/3 of the space */
    min-width: 250px;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content; /* Makes it not stretch */
}

.contact-details h3 {
    margin-top: 0;
}

.contact-details p {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    line-height: 1.6;
}

.contact-details p strong {
    font-size: 1.2rem; /* Icon size */
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box; /* Important */
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #007aff;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-button:hover {
    background-color: #005bb5;
}