/* DownloadInPDF.com - Master Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Semantic Accents (Shared) */
    --color-primary: hsl(243, 75%, 59%); /* Indigo #4f46e5 */
    --color-primary-rgb: 79, 70, 229;
    --color-secondary: hsl(271, 91%, 65%); /* Purple #9333ea */
    --color-secondary-rgb: 147, 51, 234;
    --color-success: hsl(142, 71%, 45%);
    --color-warning: hsl(38, 92%, 50%);
    --color-danger: hsl(0, 84%, 60%);
    --color-info: hsl(200, 95%, 48%);
    
    /* Layout Constants */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Light Mode Variables (Default) */
    --bg-primary: hsl(220, 20%, 97%);
    --bg-secondary: hsl(0, 0%, 100%);
    --bg-tertiary: hsl(220, 14%, 93%);
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-glass: rgba(255, 255, 255, 0.6);
    --text-primary: hsl(222, 47%, 11%);
    --text-secondary: hsl(215, 16%, 47%);
    --text-muted: hsl(215, 12%, 65%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 8px 24px rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --bg-primary: hsl(222, 47%, 6%);
    --bg-secondary: hsl(223, 30%, 11%);
    --bg-tertiary: hsl(223, 25%, 15%);
    --bg-glass: rgba(15, 23, 42, 0.65);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.04);
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 65%);
    --text-muted: hsl(215, 14%, 45%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 8px 30px rgba(79, 70, 229, 0.35);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Base Layout Wrapper */
.main-content {
    flex: 1;
}

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

/* --- Navigation Header --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}
.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}
.navbar .container {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-icon {
    font-size: 1.8rem;
    background: initial;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}
.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-bounce);
}
.theme-toggle:hover {
    transform: scale(1.1);
}
.theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
}
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--border-color);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
}
.btn-lg {
    padding: 14px 30px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* --- Hero Section --- */
.hero {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 64px;
}
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.hero-tag {
    align-self: flex-start;
    background: rgba(79, 70, 229, 0.1);
    color: var(--color-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--text-primary) 50%, var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
}
.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Floating 3D SVG PDF Icon */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.svg-3d-wrapper {
    width: 320px;
    height: 320px;
    filter: drop-shadow(0 20px 50px rgba(var(--color-primary-rgb), 0.3));
    animation: float 6s ease-in-out infinite;
    transform-style: preserve-3d;
    perspective: 1000px;
}
.svg-3d-element {
    width: 100%;
    height: 100%;
    animation: slowRotate 15s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}
@keyframes slowRotate {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}

/* --- Ad Places --- */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px dashed var(--text-muted);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px;
    margin: 24px 0;
    overflow: hidden;
    position: relative;
    user-select: none;
}
.ad-header { height: 90px; width: 728px; max-width: 100%; margin: 20px auto; }
.ad-sidebar { width: 300px; height: 600px; margin: 0 auto; }
.ad-footer { height: 90px; width: 728px; max-width: 100%; margin: 40px auto; }
.ad-content { height: 250px; width: 336px; margin: 20px auto; }

/* --- Popular Tools Grid --- */
.section {
    padding: 60px 0;
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.section-title {
    font-size: 2.2rem;
}
.section-subtitle {
    color: var(--text-secondary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: var(--transition-smooth);
}
.tool-card:hover::before {
    opacity: 1;
}
.tool-icon {
    font-size: 2.2rem;
    width: 60px;
    height: 60px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: var(--transition-bounce);
}
.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}
.tool-name {
    font-size: 1.15rem;
    font-weight: 700;
}
.tool-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
}
.tool-action {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Category List Layout --- */
.categories-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.category-block {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}
.category-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    border-left: 4px solid var(--color-primary);
    padding-left: 12px;
}
.category-tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.category-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
    font-weight: 600;
    font-size: 0.95rem;
}
.category-item:hover {
    border-color: var(--color-primary);
    background: rgba(79, 70, 229, 0.04);
    transform: translateX(4px);
}
.category-item-icon {
    font-size: 1.25rem;
}

/* --- Universal Tool Page Structure --- */
.tool-interface-section {
    padding: 40px 0;
}
.tool-grid-layout {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 32px;
    margin-top: 32px;
}
@media (max-width: 1024px) {
    .tool-grid-layout {
        grid-template-columns: 1fr;
    }
}
.panel-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Dropzone style */
.dropzone {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 60px 40px;
    text-align: center;
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}
.dropzone:hover, .dropzone.dragover {
    border-color: var(--color-primary);
    background: rgba(79, 70, 229, 0.03);
    transform: scale(0.99);
}
.dropzone-icon {
    font-size: 3.5rem;
    animation: bounceIcon 3s ease-in-out infinite;
}
@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-types-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Process UI Layout */
.process-wrapper {
    display: none;
    flex-direction: column;
    gap: 24px;
}
.process-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}
.file-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-icon-large {
    font-size: 2.2rem;
    color: var(--color-danger);
}
.file-name-text {
    font-weight: 700;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-size-badge {
    background: var(--bg-tertiary);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Smart Output Panel */
.smart-output-panel {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.panel-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.input-field, select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}
.input-field:focus, select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Output Slider Styles */
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
}
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    transition: var(--transition-bounce);
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Before / After Stats */
.comparison-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    text-align: center;
}
.comp-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.comp-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}
.comp-value {
    font-size: 1.4rem;
    font-weight: 800;
}
.comp-value.saving {
    color: var(--color-success);
}
.comp-value.red {
    color: var(--color-danger);
}

/* Preview Panels */
.preview-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.preview-title {
    font-weight: 700;
}
.preview-viewport {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    min-height: 250px;
    max-height: 500px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
}
.preview-viewport img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    object-fit: contain;
}

/* --- PDF Editor Workspace Layout --- */
.editor-workspace {
    display: none;
    flex-direction: column;
    height: calc(100vh - 120px);
    min-height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
}
.editor-toolbar {
    height: 56px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
}
.editor-tools-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.editor-tool-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}
.editor-tool-btn:hover, .editor-tool-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.editor-tool-btn input[type="color"] {
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}
.editor-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}
.editor-sidebar {
    width: 220px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}
.thumb-card {
    border: 2px solid transparent;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}
.thumb-card.active {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}
.thumb-img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: white;
    border-radius: 4px;
    margin-bottom: 4px;
}
.thumb-number {
    font-size: 0.8rem;
    font-weight: 700;
}
.editor-canvas-container {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px;
    background: var(--bg-primary);
    position: relative;
}
.pdf-page-container {
    position: relative;
    box-shadow: var(--shadow-lg);
    background: white;
    margin-bottom: 32px;
}
.pdf-page-container canvas {
    display: block;
}
.fabric-canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 500px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-body {
    padding: 24px;
    overflow-y: auto;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-tertiary);
}
.signature-pad-canvas {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    cursor: crosshair;
}

/* --- Info Section & Content --- */
.content-section {
    padding: 60px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.rich-text {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.rich-text h2 {
    font-size: 1.8rem;
    margin-top: 24px;
}
.rich-text h3 {
    font-size: 1.4rem;
    margin-top: 16px;
}
.rich-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}
.rich-text ul, .rich-text ol {
    padding-left: 24px;
    color: var(--text-secondary);
}

/* FAQ Accordions */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}
.faq-question {
    padding: 20px 24px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}
.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.faq-item.open .faq-answer {
    padding: 0 24px 24px;
    max-height: 300px; /* arbitrary height to expand */
}

/* --- Blog Section --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}
.blog-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition-bounce);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}
.blog-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}
.blog-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.blog-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}
.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}
.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
}
.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
}
.blog-readmore {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-primary);
}
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(4px);
}
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-tag {
        align-self: center;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .navbar .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 40px 24px;
        transition: var(--transition-smooth);
        box-shadow: var(--shadow-lg);
    }
    .navbar .nav-menu.open {
        left: 0;
    }
    .hamburger {
        display: flex;
    }
}
@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .btn-lg {
        width: 100%;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .panel-card {
        padding: 16px;
    }
}
