/* ============================================
   KDP Tools SaaS — Design System
   Modern SaaS UI with Indigo primary color
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Primary Colors */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Accents */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Radii */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    background-color: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-700);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 1.5rem;
    transition: var(--transition);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-600);
}

.navbar-logo svg {
    width: 32px;
    height: 32px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.navbar-links a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--primary-600);
    background-color: var(--primary-50);
}

.navbar-cta {
    background: var(--primary-600) !important;
    color: #fff !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-full) !important;
    font-weight: 600 !important;
}

.navbar-cta:hover {
    background: var(--primary-700) !important;
    transform: translateY(-1px);
}

/* Mobile menu button */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--gray-700);
}

.navbar-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
        align-items: center;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
    }

    .navbar-links.open {
        display: flex;
    }

    .navbar-links a {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .navbar-dropdown .navbar-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--gray-50);
        border-radius: 0;
        padding: 0 0 0 1rem;
        min-width: auto;
    }
    
    .navbar-dropdown .navbar-dropdown-menu a {
        padding: 0.6rem 1rem;
    }

    .navbar-dropdown.open .navbar-dropdown-menu {
        display: block;
    }
}

/* --- Navbar Dropdown --- */
.navbar-dropdown {
    position: relative;
}

.navbar-dropdown > a {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 4px;
}

.navbar-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.navbar-dropdown:hover > a::after,
.navbar-dropdown.open > a::after {
    transform: rotate(180deg);
}

.navbar-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 0.5rem 0;
    z-index: 1100;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-dropdown:hover .navbar-dropdown-menu {
    display: block;
}

.navbar-dropdown-menu a {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem !important;
    color: var(--gray-600) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    white-space: nowrap;
}

.navbar-dropdown-menu a:hover {
    color: var(--primary-600) !important;
    background: var(--primary-50) !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 50%, #312e81 100%);
    color: #fff;
    padding: 6rem 1.5rem;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(2%, -1%) rotate(1deg);
    }

    66% {
        transform: translate(-1%, 1%) rotate(-1deg);
    }
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: #fff;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-600);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-700);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-600);
    color: #fff;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 5rem 1.5rem;
}

.section-gray {
    background: var(--gray-100);
}

.section-white {
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* ============================================
   CARD GRID
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.card-icon.indigo {
    background: var(--primary-50);
    color: var(--primary-600);
}

.card-icon.emerald {
    background: #ecfdf5;
    color: #059669;
}

.card-icon.amber {
    background: #fffbeb;
    color: #d97706;
}

.card-icon.rose {
    background: #fff1f2;
    color: #e11d48;
}

.card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--primary-600);
    font-weight: 600;
    font-size: 0.9rem;
}

.card-link:hover {
    gap: 0.6rem;
}

/* ============================================
   TOOL PAGE LAYOUT
   ============================================ */
.tool-hero {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    color: #fff;
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
}

.tool-hero h1 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.tool-hero p {
    opacity: 0.9;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.tool-container {
    max-width: 960px;
    margin: -2rem auto 3rem;
    padding: 0 1.5rem;
}

.tool-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    border: 1px solid var(--gray-200);
}

@media (max-width: 768px) {
    .tool-card {
        padding: 1.5rem;
    }
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-800);
    background: #fff;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.35rem;
}

/* ============================================
   RESULTS TABLE
   ============================================ */
.results-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.results-section h2 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius);
    overflow: hidden;
}

.results-table th,
.results-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.9rem;
}

.results-table thead th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-200);
}

.results-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.results-table tbody tr:hover {
    background: var(--gray-50);
}

.results-table tbody td {
    color: var(--gray-700);
}

.result-value {
    font-weight: 700;
    color: var(--primary-600);
}

/* Result Cards */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-card {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.result-card-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.result-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-600);
}

.result-card-value.success {
    color: var(--success);
}

.result-card-value.danger {
    color: var(--danger);
}

/* ============================================
   CANVAS PREVIEW
   ============================================ */
.canvas-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.canvas-wrapper canvas {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    max-width: 100%;
    background: #fff;
}

/* ============================================
   BLOG CARDS
   ============================================ */
.blog-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition-slow);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-400);
    font-size: 3rem;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.blog-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.blog-card-body p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.article-container h1 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-container h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-100);
    color: var(--gray-900);
}

.article-container h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--gray-800);
}

.article-container p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--gray-700);
    font-size: 1.05rem;
}

.article-container ul,
.article-container ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.article-container li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
    color: var(--gray-700);
    font-size: 1.02rem;
}

.article-container ul li {
    list-style-type: disc;
}

.article-container ol li {
    list-style-type: decimal;
}

.article-container blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--primary-400);
    background: var(--primary-50);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--gray-600);
}

.article-container a {
    color: var(--primary-600);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--primary-200);
    text-underline-offset: 2px;
    transition: var(--transition);
}

.article-container a:hover {
    color: var(--primary-700);
    text-decoration-color: var(--primary-500);
}

.article-container strong {
    color: var(--gray-900);
    font-weight: 700;
}

.article-meta {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.article-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.article-body p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--gray-700);
}

/* Table of Contents */
.toc {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.toc h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.toc ul {
    list-style: none;
    padding: 0;
}

.toc li {
    margin-bottom: 0.35rem;
}

.toc a {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.toc a:hover {
    color: var(--primary-600);
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover {
    color: var(--primary-600);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 1.5rem 2rem;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-brand h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   PAGE HEADER (for non-tool pages)
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    color: #fff;
    padding: 3rem 1.5rem;
    text-align: center;
}

.page-header h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.page-content p,
.page-content li {
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.page-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* ============================================
   EDITOR (HTML Description Tool)
   ============================================ */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-300);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

.editor-toolbar button {
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: var(--transition);
}

.editor-toolbar button:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    border-color: var(--primary-200);
}

.editor-area {
    min-height: 250px;
    padding: 1.25rem;
    border: 1.5px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    outline: none;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gray-800);
}

.editor-area:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.output-area {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--gray-700);
    background: var(--gray-50);
    resize: vertical;
}

/* ============================================
   ADSENSE PLACEHOLDER ZONES
   ============================================ */
.adsense-zone {
    text-align: center;
    /* No min-height, padding, or margin — empty zones take up zero space.
       Real AdSense <ins> tags provide their own dimensions after approval. */
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.hidden {
    display: none;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.875rem 1.5rem;
    background: var(--gray-900);
    color: #fff;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    opacity: 0;
    transform: translateY(1rem);
    transition: var(--transition-slow);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Contact form success/error */
.form-message {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Fade-in animation — JS adds .fade-in-ready, then .visible on scroll */
.fade-in {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.fade-in-ready {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}