/* ===================================
   Pay for Delete Letter Website Styles
   =================================== */

/* CSS Variables */
:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --primary-bg: rgba(13, 148, 136, 0.1);
    --secondary: #f1f5f9;
    --accent: #f59e0b;
    --background: #ffffff;
    --surface: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: clamp(1.875rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 1.875rem); margin-top: 2rem; margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin-top: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text);
    line-height: 1.75;
}

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

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

ul, ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--surface);
}

.btn-block {
    width: 100%;
}

/* Top Bar */
.top-bar {
    background: var(--primary);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.75rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar a:hover {
    opacity: 0.9;
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none;
    }
}

/* Header */
.header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header.shadow {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    background: var(--primary);
    padding: 0.5rem;
    border-radius: var(--radius);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text);
}

.logo-subtitle {
    font-size: 0.625rem;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .logo-title { font-size: 1.25rem; }
    .logo-subtitle { font-size: 0.75rem; }
}

/* Navigation */
.nav-desktop {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: var(--transition);
}

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

/* Mobile Menu */
.mobile-menu-btn {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text);
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--background);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
}

.mobile-nav {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius);
}

.mobile-nav-link:hover {
    background: var(--surface);
}

.mobile-menu-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--background) 50%, var(--surface) 100%);
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: var(--secondary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.hero-title {
    margin-bottom: 1rem;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hero-desc {
        font-size: 1.25rem;
    }
}

/* Article Meta */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-item svg {
    width: 16px;
    height: 16px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: var(--text-muted);
}

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

.breadcrumbs span {
    color: var(--text);
}

/* Content Layout */
.content-wrapper {
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .content-wrapper {
        padding: 3rem 0;
    }
}

.content-layout {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .content-layout {
        grid-template-columns: 280px 1fr;
        gap: 3rem;
    }
}

/* Table of Contents */
.toc {
    display: none;
}

@media (min-width: 1024px) {
    .toc {
        display: block;
        position: sticky;
        top: 90px;
    }
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--border);
}

.toc-item {
    margin: 0;
}

.toc-link {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: var(--transition);
}

.toc-link:hover,
.toc-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
}

.toc-link.level-3 {
    padding-left: 1.25rem;
    font-size: 0.75rem;
}

/* Main Content Area */
.content {
    max-width: 800px;
}

/* Content Styling */
.content h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.content h2:first-of-type {
    border-top: none;
    margin-top: 0;
}

.content h2 svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

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

.content p {
    margin-bottom: 1rem;
}

.content ul,
.content ol {
    margin: 1rem 0 1.5rem 0;
}

.content li {
    margin-bottom: 0.5rem;
}

.content strong {
    font-weight: 600;
    color: var(--text);
}

.content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content a:hover {
    text-decoration: none;
}

/* Highlight Boxes */
.highlight-box {
    background: var(--primary-bg);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.warning-box {
    background: #fffbeb;
    border-left: 4px solid var(--warning);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--info);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.warning-box .warning-title {
    font-weight: 600;
    color: #b45309;
    margin-bottom: 0.25rem;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

th {
    background: var(--surface);
    font-weight: 600;
}

tr:nth-child(even) {
    background: var(--surface);
}

/* Cards */
.card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Template Cards */
.template-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.template-card pre {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text);
    margin: 0;
}

/* Quick Download Cards */
.quick-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.quick-card {
    background: var(--primary-bg);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
}

.quick-card:hover {
    box-shadow: var(--shadow-md);
}

.quick-card svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.quick-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quick-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.checklist-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.checklist-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* FAQ Accordion */
.faq-accordion {
    margin: 1.5rem 0;
}

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

.faq-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

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

.faq-trigger svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-trigger.active svg {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.open {
    max-height: 500px;
}

.faq-answer {
    padding-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Resource Cards */
.resource-grid {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (min-width: 768px) {
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.resource-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.resource-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resource-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.resource-card a {
    font-size: 0.875rem;
}

/* CTA Box */
.cta-box {
    background: var(--primary-bg);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
}

.cta-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.cta-desc {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Ad Zone */
.ad-zone {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 2rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.social-share-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.social-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: var(--transition);
}

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

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

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

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

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

/* Page Content */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .page-content {
        padding: 3rem 0;
    }
}

/* Print Styles */
@media print {
    .header,
    .top-bar,
    .toc,
    .ad-zone,
    .back-to-top,
    .mobile-menu-btn,
    .social-share {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .content {
        max-width: 100%;
    }
}
