/* Root variables */
:root {
    --primary: #0d6efd;
    --bg-light: #f9f9f9;
    --text-muted: #6c757d;
    --card-radius: 12px;
}

/* Base styles */
html {
    overflow-y: scroll;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #fff;
    color: #333;
}

.container {
    max-width: 1140px;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

.nav-link {
    color: #555;
    font-weight: 500;
}

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

/* Hero section (Home) */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: linear-gradient(to right, #f0f2fa, #f9f9f9);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 600;
}

.hero p {
    max-width: 600px;
    margin: 1rem auto 0;
    color: var(--text-muted);
}

/* Small hero (Articles) */
.hero-small {
    padding: 3rem 0;
    text-align: center;
    background: none;
}

.hero-small h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hero-small p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-muted);
}

/* Tabs */
.nav-tabs .nav-link {
    color: #555;
    border: none;
    margin: 0 5px;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 500;
    border-bottom: 2px solid var(--primary);
}

/* Template Cards */
.template-item {
    transition: transform 0.2s ease;
}

.template-item:hover {
    transform: translateY(-4px);
}

.template-card {
    border: 1px solid #eee;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.04);
}

.template-img {
    max-height: 340px;
    width: 100%;
    object-fit: contain;
    background-color: #f8f9fa;
    display: block;
    padding: 8px;
    transition: transform 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.template-img:hover {
    transform: scale(1.04);
}

.card-body {
    padding: 1.5rem;
    text-align: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.card-body p {
    font-size: 0.95rem;
    color: #555;
}

.badge-tag {
    background: #0d6efd;
    color: #fff;
    font-size: 0.7rem;
    border-radius: 20px;
    padding: 0.3rem 0.6rem;
}

/* Buttons */
.btn-outline-primary {
    font-weight: 500;
    border-radius: 6px;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-browse {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-browse:hover {
    background-color: #0b5ed7;
    text-decoration: none;
}

/* Why Section */
.why-section {
    padding-top: 4rem;
    padding-bottom: 2rem;
    /* reduce padding below */
    background-color: var(--bg-light);
    text-align: center;
    margin-bottom: 0 !important;
}

.why-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* Blog Page */
.blog-title {
    text-align: center;
    margin: 3rem 0 2rem;
}

.blog-post {
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 2rem; /* <-- this is the issue */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.blog-post h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.blog-post p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Grid layout for guide cards */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 0 auto 4rem;
    max-width: 1140px;
}

/* Article content */
.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.article h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
    font-weight: 600;
}

.article p {
    margin-bottom: 1rem;
    color: #444;
}

/* Ensure gap between strong and button */
.article p strong+br+.btn-browse {
    margin-top: 0.75rem;
    display: inline-block;
}

/* CV Template Preview Page */
.template-title {
    text-align: center;
    margin: 3rem 0 1.5rem;
}

.template-title h1 {
    font-size: 2rem;
    font-weight: 600;
}

.template-title p {
    color: var(--text-muted);
}

.template-preview img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.download-box {
    text-align: center;
    margin-bottom: 2rem;
}

.download-box h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Ads Placeholder (Ezoic) */
.ezoic-ad,
.ezoic-ad:empty,
.ezoic-ad * {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* Footer */
footer {
    padding: 1rem 0 1.5rem; /* increased bottom padding */
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #eaeaea;
    text-align: center;
    margin-top: 0 !important;
}

.cover-letters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .cover-letters-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.cover-card {
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    padding: 2rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cover-card h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.cover-text {
    white-space: pre-line;
    font-size: 0.95rem;
    color: #333;
    text-align: left;
    flex-grow: 1;
    line-height: 1.6;
}

.copy-btn {
    margin-top: 1.5rem;
    align-self: flex-end;
}