/* Main CSS */

/* --- 1. GENERAL SETTINGS --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f9fc;
    color: #1a202c;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* --- 2. NAVBAR --- */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}
.logo span { color: #3b82f6; }

.nav-links a {
    margin-left: 20px;
    font-weight: 500;
    color: #475569;
    font-size: 15px;
}
.nav-links a:hover { color: #3b82f6; }

.hire-btn {
    color: #0f172a !important;
    border: 1px solid #e2e8f0;
    padding: 8px 15px;
    border-radius: 6px;
}
.hire-btn:hover { background-color: #f1f5f9; }

/* --- 3. COMMON LAYOUT --- */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

.section-title {
    margin-bottom: 25px;
    font-size: 22px;
    color: #334155;
    font-weight: 700;
}

/* --- 4. HERO SECTION --- */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}
.hero h1 { font-size: 36px; margin-bottom: 10px; color: #0f172a; }
.hero p { color: #64748b; margin-bottom: 30px; }

/* --- 5. GOOGLE SEARCH ENGINE (PRO STYLING) --- */
.gsc-control-cse {
    padding: 0 !important;
    border: none !important;
    background-color: transparent !important;
}
.gsc-search-box { margin-bottom: 0 !important; }
table.gsc-search-box td.gsc-input { padding-right: 0 !important; }
.gsc-input-box { border: none !important; background: none !important; height: 100% !important; }

input.gsc-input {
    padding: 15px 20px !important;
    border-radius: 50px 0 0 50px !important;
    border: 2px solid #e2e8f0 !important;
    border-right: none !important;
    font-size: 16px !important;
    background: #ffffff !important;
    height: 55px !important;
    outline: none !important;
    color: #1e293b !important;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.05) !important;
    width: 100% !important;
}
input.gsc-input:focus { border-color: #3b82f6 !important; }

button.gsc-search-button {
    background-color: #3b82f6 !important;
    border: 2px solid #3b82f6 !important;
    border-radius: 0 50px 50px 0 !important;
    margin-left: -2px !important;
    padding: 13px 25px !important;
    height: 55px !important;
    cursor: pointer;
    box-shadow: 5px 5px 15px rgba(59, 130, 246, 0.2) !important;
    transition: background 0.3s ease;
}
button.gsc-search-button:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}
button.gsc-search-button svg {
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
}
.gsc-adBlock, .gsc-above-wrapper-area, .gsc-loading-fade { display: none !important; }
.gsst_b { padding: 0 !important; vertical-align: middle !important; }
.gsst_a { padding: 5px !important; vertical-align: middle !important; }

/* --- 6. HOME PAGE CARDS --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.card {
    background: #ffffff; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex; flex-direction: column; justify-content: space-between;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}
.card-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; }
.badge.react { background: #e0f2fe; color: #0284c7; }
.badge.node { background: #dcfce7; color: #16a34a; }
.badge.aws { background: #ffedd5; color: #ea580c; }
.read-more { font-size: 14px; font-weight: 600; color: #3b82f6; margin-top: 15px; display: inline-block;}

/* --- 7. POST PAGE LAYOUT (NEW & IMPORTANT) --- */
.content-wrapper {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
.main-article { flex: 3; max-width: 100%; min-width: 0; } /* min-width prevents flex overflow */
.sidebar { flex: 1; min-width: 300px; }

/* Post Elements */
.post-header { margin-bottom: 30px; border-bottom: 1px solid #e2e8f0; padding-bottom: 20px; }
.post-title { font-size: 32px; color: #0f172a; margin: 10px 0; }
.post-meta { color: #64748b; font-size: 14px; }
.post-image {
    width: 100%; height: auto; border-radius: 8px;
    border: 1px solid #e2e8f0; margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Breadcrumbs */
.breadcrumbs { font-size: 14px; color: #64748b; margin-bottom: 20px; }
.breadcrumbs a { color: #3b82f6; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Table of Contents */
.toc {
    background: #f8fafc; padding: 20px;
    border-left: 4px solid #3b82f6; margin-bottom: 30px; border-radius: 4px;
}
.toc h3 { margin-top: 0; font-size: 18px; margin-bottom: 10px; }
.toc ul { margin-left: 20px; list-style: disc; }
.toc li { margin-bottom: 5px; color: #334155; }
.toc a { text-decoration: none; color: #3b82f6; }

/* Code Blocks */
pre {
    background: #1e293b; color: #e2e8f0;
    padding: 20px; border-radius: 8px;
    overflow-x: auto; margin-bottom: 25px;
    font-family: "Courier New", Courier, monospace;
}

/* Sidebar Widgets & Ads */
.widget {
    background: white; border: 1px solid #e2e8f0;
    padding: 20px; border-radius: 8px; margin-bottom: 20px;
}
.widget-title { font-size: 18px; font-weight: bold; margin-bottom: 15px; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; }
.widget-links li { margin-bottom: 12px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 8px; }
.widget-links a { color: #475569; font-size: 15px; font-weight: 500; transition: 0.2s; }
.widget-links a:hover { color: #3b82f6; padding-left: 5px; }

.ad-slot {
    background: #f1f5f9; height: 250px;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-weight: bold;
    border: 1px dashed #cbd5e1; margin-bottom: 20px;
    text-transform: uppercase; font-size: 12px; letter-spacing: 1px;
}

/* --- 8. TOPICS PAGE --- */
.topics-hero {
    background: #ffffff; padding: 40px 20px; text-align: center; border-bottom: 1px solid #e2e8f0;
}
.tag-cloud {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 10px; margin-top: 20px; max-width: 800px; margin-left: auto; margin-right: auto;
}
.tag {
    background: white; border: 1px solid #e2e8f0;
    padding: 8px 15px; border-radius: 20px;
    font-size: 14px; font-weight: 500; color: #475569; transition: 0.2s;
}
.tag:hover { border-color: #3b82f6; color: #3b82f6; transform: translateY(-2px); }

/* --- 9. HIRE PAGE --- */
.form-box {
    background: white; padding: 40px;
    border-radius: 12px; border: 1px solid #e2e8f0;
    max-width: 600px; margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #475569; }
.form-control {
    width: 100%; padding: 12px; border: 2px solid #e2e8f0;
    border-radius: 6px; font-size: 16px; outline: none;
}
.form-control:focus { border-color: #3b82f6; }
.btn-submit {
    background: #3b82f6; color: white; border: none;
    padding: 12px 25px; border-radius: 6px; font-size: 16px;
    cursor: pointer; font-weight: 600; width: 100%;
}
.btn-submit:hover { background: #2563eb; }

/* --- 10. FOOTER --- */
footer {
    text-align: center; padding: 40px;
    color: #94a3b8; font-size: 14px;
    margin-top: 50px; border-top: 1px solid #e2e8f0;
    background: white;
}

/* --- 11. RESPONSIVE (MOBILE) --- */
@media (max-width: 900px) {
    .content-wrapper { flex-direction: column; }
    .sidebar { order: 2; width: 100%; }
    .navbar { flex-direction: column; gap: 10px; text-align: center; }
    .nav-links { margin-top: 10px; }
    .nav-links a { margin: 0 10px; }
}