/* /css/style.css */
/* Main Stylesheet for TheDocs.io */

/* --- Variables and Global Resets --- */
:root {
    --primary-color: #2980b9;
    --primary-hover: #3498db;
    --dark-color: #2c3e50;
    --light-bg-color: #f5f7fa;
    --white-color: #ffffff;
    --text-color: #363636;
    --border-color: #e0e0e0;
    --max-width: 1200px;
    --base-font-size: 16px;
    --radius: 8px; /* Slightly larger radius from original */
}

/* A better box-sizing model */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Global styles */
html {
    font-size: var(--base-font-size);
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--light-bg-color);
    color: var(--text-color);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Poppins", "Inter", sans-serif; /* New distinct font for headings */
    color: var(--dark-color);
    line-height: 1.3;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 0;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--primary-color);
}

.site-header .logo a {
    color: var(--white-color);
    font-size: 1.5rem; /* Slightly larger logo text */
    font-weight: 700;
    text-decoration: none;
}

.site-header .main-nav a {
    color: var(--white-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.site-header .main-nav a:hover,
.site-header .main-nav a.active {
    opacity: 1;
    border-bottom-color: var(--primary-hover);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-color);
    color: #bdc3c7;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
    margin-top: auto; /* Pushes footer to the bottom */
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #ecf0f1;
    font-weight: 500;
}

.footer-nav {
    margin-bottom: 1rem;
}
.footer-nav a {
    margin: 0 0.75rem;
}

/* --- Homepage Specific --- */
.hero {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    color: var(--white-color);
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 3.2rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--white-color);
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    opacity: 0.9;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius); /* Updated radius */
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-container input:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background-color: var(--white-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.latest-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: block;
    background-color: var(--white-color);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border-color: var(--primary-color);
    text-decoration: none;
}

.project-card h4 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.cta-section {
    text-align: center;
    padding: 3rem 1rem;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin: 3rem 0;
}

.button-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.9rem 2rem;
    text-decoration: none;
    border-radius: var(--radius); /* Updated radius */
    font-weight: 700;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 1.1rem;
    border: none;
}

.button-primary:hover {
    background-color: var(--primary-hover);
    color: var(--white-color);
    transform: translateY(-2px);
    text-decoration: none;
}


/* --- Content Pages (About, Contact, Legal) --- */
.content-page {
    background-color: var(--white-color);
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.content-page h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.content-page ul {
    list-style-type: disc;
    padding-left: 2rem;
}

.content-page li {
    margin-bottom: 0.75rem;
}

/* --- Contact Form --- */
.contact-form {
    display: grid;
    gap: 1.5rem;
    max-width: 700px;
    margin-top: 2rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.3);
}

.contact-form button {
    justify-self: start;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.9rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.contact-form button:hover {
    background-color: var(--primary-hover);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .site-header .main-nav a {
        margin: 0 0.75rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .content-page {
        padding: 1.5rem;
    }
}


/* --- Projects Page Specific --- */
.projects-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.projects-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.project-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* --- Alpha Navigation --- */
.alpha-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.alpha-nav li a,
.alpha-nav li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s ease-in-out;
}

.alpha-nav li a {
    background-color: var(--white-color);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.alpha-nav li a:hover {
    color: var(--white-color);
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    text-decoration: none;
}

.alpha-nav li a.active {
    color: var(--white-color);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(41, 128, 185, 0.4);
    cursor: default;
    transform: translateY(0);
}

.alpha-nav li a.active:hover {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(41, 128, 185, 0.4);
}

.alpha-nav li span.disabled {
    color: #bdc3c7;
    background-color: #f0f0f0;
    border: 1px dashed var(--border-color);
    cursor: not-allowed;
}

/* --- Search Results Page --- */
.search-results-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.search-results-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.search-results-header h1 .query-term {
    color: var(--primary-color);
}

.search-results-header p {
    font-size: 1.1rem;
    color: #555;
    margin: 0;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-item {
    background-color: var(--white-color);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-result-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.search-result-item .result-title a {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}

.search-result-item .result-url {
    display: block;
    font-size: 0.9rem;
    color: #008000; /* Dark green for URL */
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    word-break: break-all;
}

.search-result-item .result-snippet {
    color: #444;
    line-height: 1.6;
}

/* Style for highlighted search term in snippets */
.search-result-item .result-snippet strong.highlight {
    background-color: #f1c40f; /* Yellow highlight */
    color: var(--dark-color);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.no-results {
    text-align: center;
    padding: 3rem;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}