/* ==========================================================================
   PDFToolKit - Main Stylesheet
   iLovePDF-inspired design system
   Version: 1.0.0
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
    --primary: #E5322D;
    --primary-hover: #C7271F;
    --primary-light: #FDECEC;
    --bg-main: #FFFFFF;
    --bg-secondary: #F7F7F8;
    --text-primary: #2D3748;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-white: #FFFFFF;
    --border-light: #E5E7EB;
    --border-card: #F0F0F0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
    --shadow-btn: 0 4px 12px rgba(229, 50, 45, 0.3);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* ==========================================================================
   2. Modern CSS Reset
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
    display: block;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

strong, b {
    font-weight: 700;
}

small {
    font-size: 0.875rem;
}

/* ==========================================================================
   4. Layout & Container
   ========================================================================== */

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
}

.container--narrow {
    max-width: 800px;
}

.container--wide {
    max-width: 1400px;
}

/* Site content layout (blog listing) */
.site-content {
    padding: 0 0 60px;
}

.content-area {
    padding: 0;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Post card image placeholder */
.post-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

/* ==========================================================================
   5. Header (.site-header)
   ========================================================================== */

.site-header {
    background: var(--bg-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header .container {
    position: relative;
}

.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Logo */
.site-branding__link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.site-branding__link:hover {
    color: var(--text-primary);
}

.site-branding__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.site-branding__link svg {
    width: 36px;
    height: 36px;
}

.site-branding__text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-branding__text span {
    color: var(--primary);
}

/* Navigation */
.main-navigation {
    display: none;
}

.primary-menu__list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu__list li a {
    display: block;
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.primary-menu__list li a:hover,
.primary-menu__list li.current-menu-item a {
    color: var(--primary);
    background: var(--primary-light);
}

.primary-menu__list li a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

/* Mobile hamburger toggle button */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
    color: var(--text-primary);
}

.mobile-menu-toggle:hover {
    background: var(--bg-secondary);
}

.mobile-menu-toggle__icon {
    width: 24px;
    height: 24px;
}

/* Mobile menu: .main-navigation opens as dropdown on mobile */
.main-navigation.active {
    display: block;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-main);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border-light);
    padding: 12px 0;
    animation: slideDown 0.25s ease-out;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 999;
}

.main-navigation.active .primary-menu__list {
    flex-direction: column;
    gap: 0;
    padding: 0 8px;
}

.main-navigation.active .primary-menu__list li a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

/* Submenu dropdown styles (WordPress .sub-menu) */
.primary-menu__list .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mobile submenu: show when parent has .submenu-open */
.main-navigation.active .menu-item-has-children.submenu-open > .sub-menu {
    display: block;
    padding-left: 16px;
}

.main-navigation.active .sub-menu li a {
    padding: 10px 16px;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.main-navigation.active .sub-menu li a:hover {
    color: var(--primary);
}

/* Submenu toggle arrow (injected by app.js) */
.menu-item-has-children {
    position: relative;
}

.submenu-toggle {
    display: none;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-light);
    transition: transform 0.2s ease;
    align-items: center;
    justify-content: center;
}

.main-navigation.active .submenu-toggle {
    display: flex;
}

.submenu-open > .submenu-toggle {
    transform: rotate(180deg);
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   6. Hero Section (.hero)
   ========================================================================== */

.hero {
    background: var(--bg-main);
    text-align: center;
    padding: 80px 20px 60px;
}

.hero__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 700px;
    margin: 0 auto 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero__title span {
    color: var(--primary);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* ==========================================================================
   7. Tool Category Section (.tool-category)
   ========================================================================== */

.tool-category {
    margin-bottom: 50px;
}

.tool-category__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-left: 4px;
    position: relative;
}

.tool-category__title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    background: var(--primary);
    border-radius: 2px;
    margin-right: 12px;
    vertical-align: middle;
}

/* ==========================================================================
   8. Tool Grid (.tool-grid)
   ========================================================================== */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ==========================================================================
   9. Tool Card (.tool-card)
   ========================================================================== */

.tool-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: none;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

.tool-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.tool-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.tool-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-card__icon {
    transform: scale(1.05);
}

.tool-card__icon img,
.tool-card__icon svg {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.tool-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.tool-card__desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: none;
}

/* Tool card icon color variations */
.tool-card__icon--red { background: #E5322D; }
.tool-card__icon--orange { background: #F97316; }
.tool-card__icon--yellow { background: #EAB308; }
.tool-card__icon--green { background: #22C55E; }
.tool-card__icon--teal { background: #14B8A6; }
.tool-card__icon--blue { background: #3B82F6; }
.tool-card__icon--indigo { background: #6366F1; }
.tool-card__icon--purple { background: #A855F7; }
.tool-card__icon--pink { background: #EC4899; }
.tool-card__icon--gray { background: #6B7280; }

/* ==========================================================================
   10. Tool Cards Section (homepage)
   ========================================================================== */

.tools-section {
    padding: 0 0 60px;
    background: var(--bg-secondary);
}

.tools-section .container {
    padding-top: 40px;
}

/* ==========================================================================
   11. Features Strip (.features-strip)
   ========================================================================== */

.features-strip {
    background: var(--bg-secondary);
    padding: 60px 20px;
}

.features-strip__heading {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 24px 16px;
}

.feature-item__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.feature-item__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-item__desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

/* ==========================================================================
   12. FAQ Section (.faq-section)
   ========================================================================== */

.faq-section {
    padding: 60px 20px;
    background: var(--bg-main);
}

.faq-section__heading {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.faq-accordion {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-item:first-child {
    border-top: 1px solid var(--border-light);
}

.faq-item__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
    gap: 16px;
    background: none;
    border: none;
}

.faq-item__trigger:hover {
    color: var(--primary);
}

.faq-item__trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.faq-item__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--text-secondary);
}

.faq-item.active .faq-item__icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-item__answer {
    max-height: 500px;
    padding-bottom: 20px;
}

.faq-item__answer p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-right: 40px;
}

/* ==========================================================================
   13. Footer (.site-footer)
   ========================================================================== */

.site-footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 20px 30px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.site-footer__heading {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.site-footer__description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 16px;
}

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__links li {
    margin-bottom: 8px;
}

.site-footer__links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
    text-decoration: none;
}

.site-footer__links a:hover {
    color: var(--text-white);
}

/* Social icons */
.site-footer__social {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.site-footer__social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.site-footer__social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.site-footer__social-link svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.8);
}

.site-footer__social-link:hover svg {
    fill: white;
}

/* Copyright bar */
.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.site-footer__copyright {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
}

/* Footer branding */
.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.site-footer__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.site-footer__brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.site-footer__tagline {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   14. Breadcrumbs (.breadcrumbs)
   ========================================================================== */

.breadcrumbs {
    padding: 16px 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumbs__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumbs__separator {
    color: var(--text-light);
    margin: 0 4px;
    font-size: 0.75rem;
    user-select: none;
}

.breadcrumbs__link {
    color: var(--text-light);
    transition: color 0.2s ease;
}

.breadcrumbs__link:hover {
    color: var(--primary);
}

.breadcrumbs__current,
.breadcrumbs__item--current span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   15. Blog Styles
   ========================================================================== */

/* Blog listing */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 0;
}

.post-card {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.post-card__image {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__content {
    padding: 24px;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.post-card__date {
    color: var(--text-light);
}

.post-card__category {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.post-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.35;
}

.post-card__title a {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.post-card__title a:hover {
    color: var(--primary);
}

.post-card__excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-card__read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.post-card__read-more:hover {
    gap: 10px;
}

/* Blog sidebar */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0 60px;
}

.sidebar-widget {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.sidebar-widget__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

/* Single post */
.single-wrapper {
    padding: 0 0 60px;
}

.single-article {
    max-width: 100%;
}

.single-article__header {
    margin-bottom: 32px;
}

.single-article__meta-top {
    margin-bottom: 12px;
}

.single-article__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.single-article__category {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.single-article__category:hover {
    background: var(--primary);
    color: var(--text-white);
}

.single-article__title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 16px;
}

.single-article__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.single-article__author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-article__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.single-article__author-name a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
}

.single-article__author-name a:hover {
    color: var(--primary);
}

.single-article__date {
    color: var(--text-light);
}

.single-article__reading-time {
    color: var(--text-light);
}

.single-article__thumbnail {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    overflow: hidden;
}

.single-article__image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.single-article__content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.single-article__footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.single-article__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.single-article__tags-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.single-article__tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.single-article__tag:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.single-article__share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.single-article__share-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.single-article__share-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.single-article__share-link:hover {
    background: var(--primary);
    color: var(--text-white);
}

.single-article__share-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Content area layout for single post */
.content-area--with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.content-primary {
    min-width: 0;
}

.content-sidebar {
    min-width: 0;
}

/* Post navigation */
.post-navigation {
    margin-top: 40px;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
}

.post-navigation__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 4px;
}

.post-navigation__title {
    font-weight: 600;
    color: var(--text-primary);
}

/* Related posts */
.related-posts {
    margin-top: 48px;
}

.related-posts__heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.related-posts__card {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.related-posts__card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.related-posts__card-thumbnail {
    display: block;
    height: 160px;
    overflow: hidden;
}

.related-posts__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-posts__card-content {
    padding: 16px;
}

.related-posts__card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.35;
}

.related-posts__card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-posts__card-title a:hover {
    color: var(--primary);
}

.related-posts__card-date {
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Post content */
.entry-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.entry-content p {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.entry-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-content blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: var(--text-secondary);
}

.entry-content code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.entry-content pre {
    background: var(--text-primary);
    color: #E5E7EB;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: var(--primary-hover);
}

/* Comments */
.comments-area {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
}

.comments-area__title {
    font-size: 1.25rem;
    margin-bottom: 30px;
}

.comments-area__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comments-area__closed {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-style: italic;
}

.comments-area__reply-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.comments-area__field {
    margin-bottom: 16px;
}

.comments-area__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.comments-area__input,
.comments-area__textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: border-color 0.2s ease;
    background: var(--bg-main);
}

.comments-area__input:focus,
.comments-area__textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.1);
}

.comments-area__textarea {
    min-height: 120px;
    resize: vertical;
}

.comments-area__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Comment items */
.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-item__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-item__avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-item__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-item__author {
    font-weight: 600;
    font-size: 0.9375rem;
}

.comment-item__date {
    font-size: 0.8125rem;
    color: var(--text-light);
    text-decoration: none;
}

.comment-item__date:hover {
    color: var(--primary);
}

.comment-item__moderation {
    font-size: 0.875rem;
    color: #92400E;
    background: #FFFBEB;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #FDE68A;
}

.comment-item__content {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.comment-item__content p {
    margin-bottom: 0.5rem;
}

.comment-item__footer {
    display: flex;
    gap: 16px;
    font-size: 0.8125rem;
}

.comment-item__edit a,
.comment-item__reply a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

.comment-item__edit a:hover,
.comment-item__reply a:hover {
    color: var(--primary);
}

/* Note: Legacy comment classes removed. See .comments-area__* and .comment-item__* above. */

/* ==========================================================================
   16. Page Styles
   ========================================================================== */

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.page-content__title {
    font-size: 2rem;
    margin-bottom: 32px;
    text-align: center;
}

.page-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.page-content h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.page-content ul {
    list-style: disc;
}

.page-content ol {
    list-style: decimal;
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Contact page styles */
.contact-page {
    padding: 0 0 60px;
}

.contact-page__header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-page__title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.contact-page__subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.contact-page__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.contact-page__form-wrapper {
    min-width: 0;
}

.contact-page__info {
    min-width: 0;
}

/* Contact notices */
.contact-notice {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-notice p {
    margin-bottom: 0;
}

.contact-notice ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-notice ul li {
    margin-bottom: 4px;
}

.contact-notice--success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.contact-notice--error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Contact form styles */
.contact-form {
    max-width: 100%;
}

.contact-form__honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form__field {
    margin-bottom: 20px;
}

.contact-form__row .contact-form__field {
    margin-bottom: 0;
}

.contact-form__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.contact-form__required {
    color: var(--primary);
}

.contact-form__input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-main);
}

.contact-form__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.1);
}

.contact-form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.contact-form__textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form__hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 6px;
}

.contact-form__actions {
    margin-top: 24px;
}

.contact-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-btn);
}

.contact-form__submit:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(229, 50, 45, 0.4);
    transform: translateY(-1px);
}

.contact-form__submit:active {
    transform: translateY(0);
}

.contact-form__submit svg {
    width: 18px;
    height: 18px;
}

/* Contact info cards */
.contact-info-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}

.contact-info-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.contact-info-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-info-card__text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.contact-info-card__text a {
    color: var(--primary);
    text-decoration: none;
}

.contact-info-card__text a:hover {
    text-decoration: underline;
}

/* Contact FAQ section */
.contact-faq {
    margin-top: 60px;
}

.contact-faq__heading {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}

/* Legacy form-group styles (backward compatibility) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-main);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Legal pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.legal-content h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.legal-content .last-updated {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   17. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--text-white);
    box-shadow: 0 6px 16px rgba(229, 50, 45, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(229, 50, 45, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: #EEEEF0;
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-sm {
    padding: 6px 16px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.0625rem;
    border-radius: var(--radius-md);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   18. Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-light { color: var(--text-light) !important; }
.text-red { color: var(--primary) !important; }
.text-white { color: var(--text-white) !important; }

.bg-white { background-color: var(--bg-main) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
.mt-5 { margin-top: 48px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mb-5 { margin-bottom: 48px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 8px !important; }
.p-2 { padding: 16px !important; }
.p-3 { padding: 24px !important; }
.p-4 { padding: 32px !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100% !important; }

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================================
   19. Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.pagination a {
    color: var(--text-secondary);
    background: var(--bg-main);
    border: 1px solid var(--border-light);
}

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

.pagination .current {
    color: var(--text-white);
    background: var(--primary);
    border: 1px solid var(--primary);
}

/* ==========================================================================
   20. Search Styles
   ========================================================================== */

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-form__input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-form__input:focus {
    border-color: var(--primary);
}

.search-form__button {
    padding: 12px 20px;
    background: var(--primary);
    color: var(--text-white);
    border: 1px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-form__button:hover {
    background: var(--primary-hover);
}

/* Search results */
.search-results__header {
    padding: 30px 0;
    text-align: center;
}

.search-results__query {
    color: var(--primary);
}

/* ==========================================================================
   21. 404 Page
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404__code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 16px;
}

.error-404__title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.error-404__desc {
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   22. Notices & Alerts
   ========================================================================== */

.notice {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice--info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.notice--success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.notice--warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.notice--error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* ==========================================================================
   23. Loading & Spinner
   ========================================================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ==========================================================================
   24. Animations
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 50ms; }
.stagger-children > *:nth-child(3) { transition-delay: 100ms; }
.stagger-children > *:nth-child(4) { transition-delay: 150ms; }
.stagger-children > *:nth-child(5) { transition-delay: 200ms; }
.stagger-children > *:nth-child(6) { transition-delay: 250ms; }
.stagger-children > *:nth-child(7) { transition-delay: 300ms; }
.stagger-children > *:nth-child(8) { transition-delay: 350ms; }
.stagger-children > *:nth-child(9) { transition-delay: 400ms; }
.stagger-children > *:nth-child(10) { transition-delay: 450ms; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   25. Responsive Design
   ========================================================================== */

/* ---------- Tablet (640px+) ---------- */
@media (min-width: 640px) {
    .hero__title {
        font-size: 2.5rem;
    }

    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-card__image {
        height: 180px;
    }

    .single-article__title {
        font-size: 2.25rem;
    }

    .contact-form__row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Desktop (1024px+) ---------- */
@media (min-width: 1024px) {
    .hero {
        padding: 100px 20px 70px;
    }

    .hero__title {
        font-size: 2.75rem;
    }

    .hero__subtitle {
        font-size: 1.1875rem;
    }

    .tool-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .site-footer__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Header desktop navigation */
    .main-navigation {
        display: flex;
    }

    .main-navigation.active {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        animation: none;
        max-height: none;
        overflow: visible;
    }

    .main-navigation.active .primary-menu__list {
        flex-direction: row;
        padding: 0;
    }

    .main-navigation.active .primary-menu__list li a {
        padding: 8px 16px;
        font-size: 0.9375rem;
    }

    .mobile-menu-toggle {
        display: none;
    }

    /* Desktop submenu dropdowns */
    .menu-item-has-children {
        position: relative;
    }

    .menu-item-has-children:hover > .sub-menu {
        display: block;
    }

    .primary-menu__list .sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: var(--bg-main);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        border-radius: var(--radius-md);
        padding: 8px 0;
        z-index: 100;
        list-style: none;
    }

    .primary-menu__list .sub-menu li a {
        padding: 8px 20px;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .primary-menu__list .sub-menu li a:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

    .submenu-toggle {
        display: none !important;
    }

    .content-wrapper {
        grid-template-columns: 1fr 300px;
    }

    .content-area--with-sidebar {
        grid-template-columns: 1fr 300px;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .single-article__title {
        font-size: 2.5rem;
    }

    .tool-card__desc {
        display: block;
    }

    .contact-page__grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* ---------- Large (1280px+) ---------- */
@media (min-width: 1280px) {
    .tool-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }

    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Small mobile adjustments ---------- */
@media (max-width: 380px) {
    .hero {
        padding: 60px 16px 40px;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .tool-card {
        padding: 24px 16px;
    }

    .tool-card__icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

    .tool-card__icon img,
    .tool-card__icon svg {
        width: 26px;
        height: 26px;
    }

    .tool-card__title {
        font-size: 0.85rem;
    }

    .features-strip {
        padding: 40px 16px;
    }

    .faq-section {
        padding: 40px 16px;
    }
}

/* ==========================================================================
   26. Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle,
    .mobile-nav,
    .ad-slot,
    .breadcrumbs,
    .search-form,
    .btn {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .entry-content {
        max-width: 100%;
    }

    .entry-content img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid;
    }
}

/* ==========================================================================
   27. WordPress Core Alignment Classes
   ========================================================================== */

.alignnone {
    margin: 16px 0;
}

.aligncenter {
    display: block;
    margin: 16px auto;
}

.alignleft {
    float: left;
    margin: 4px 24px 16px 0;
}

.alignright {
    float: right;
    margin: 4px 0 16px 24px;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 16px;
}

.wp-caption img {
    border-radius: var(--radius-md);
}

.wp-caption-text {
    font-size: 0.8125rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 8px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.gallery-item img {
    border-radius: var(--radius-sm);
}

/* Screen reader text - WordPress default class */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================================
   28. Accessibility Enhancements
   ========================================================================== */

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: var(--text-white);
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) 0;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    color: var(--text-white);
}

/* Focus ring for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in,
    .fade-in-up {
        opacity: 1;
        transform: none;
    }

    .tool-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        border: 2px solid currentColor;
    }

    .tool-card {
        border: 1px solid currentColor;
    }

    .faq-item__icon {
        color: currentColor;
    }
}

/* ==========================================================================
   29. Dark mode media query (foundational)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Placeholder: dark mode can be activated by adding a class toggle.
       These are left as comments for future implementation.
       The theme primarily uses light mode for the iLovePDF-inspired design. */
}

/* ==========================================================================
   30. Cookie Consent Banner
   ========================================================================== */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.9);
    padding: 16px 20px;
    z-index: 9998;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: none;
}

.cookie-consent.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-consent__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent__text {
    font-size: 0.875rem;
    line-height: 1.5;
    flex: 1;
    min-width: 280px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-consent__text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.cookie-consent__buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-consent__accept {
    padding: 8px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-consent__accept:hover {
    background: var(--primary-hover);
}

.cookie-consent__decline {
    padding: 8px 24px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-consent__decline:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   31. Back to Top Button
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==========================================================================
   32. Table Styles
   ========================================================================== */

.table-responsive {
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-light);
}

.table-responsive th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.table-responsive td {
    color: var(--text-secondary);
}

.table-responsive tr:last-child td {
    border-bottom: none;
}

.table-responsive tr:hover td {
    background: var(--bg-secondary);
}

/* ==========================================================================
   33. Tags & Badges
   ========================================================================== */

.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge--new {
    background: #DCFCE7;
    color: #166534;
}

.badge--popular {
    background: #FEF3C7;
    color: #92400E;
}

.badge--pro {
    background: #EDE9FE;
    color: #5B21B6;
}

/* ==========================================================================
   End of main.css
   ========================================================================== */
