/* ==============================================================
   GOTOOL-PDF-PLATFORM Core Design System (main.css)
   ============================================================== */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--primary-hover);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.25;
}
h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.875rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}
.btn-secondary {
    background-color: #ffffff;
    color: var(--gray-700);
    border-color: var(--gray-300);
}
.btn-secondary:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}
.btn-success {
    background-color: var(--success);
    color: #ffffff;
}
.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}
.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.1rem;
}
.btn-block {
    width: 100%;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}
.form-control {
    width: 100%;
    padding: 0.65rem 0.875rem;
    font-size: 0.95rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    color: var(--gray-900);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-text {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Cards */
.card {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.925rem;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error, .alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}
.badge-pro { background: #fef3c7; color: #b45309; }
.badge-free { background: #e0f2fe; color: #0369a1; }
.badge-guest { background: #f1f5f9; color: #475569; }

/* Grid Layouts */
.grid { display: grid; gap: 1.5rem; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Toast notifications */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--gray-900);
    color: #ffffff;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: toast-slide 0.3s ease;
}
@keyframes toast-slide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==============================================================
   Tool & Lucide Icon System
   ============================================================== */
.lucide-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.tool-icon-box {
    width: 46px;
    height: 46px;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    border-radius: var(--radius-sm, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.tool-icon-box-sm {
    width: 38px;
    height: 38px;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    border-radius: var(--radius-sm, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.category-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #2563eb);
}
.category-hero-icon-svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary, #2563eb);
}
.tool-header-icon {
    width: 32px;
    height: 32px;
    stroke: var(--primary, #2563eb);
}
.icon-emoji {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==============================================================
   Tool Card Architecture
   ============================================================== */
.tool-card-item {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.tool-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md, 10px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    word-break: break-word;
    overflow-wrap: break-word;
}
.tool-card-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary, #2563eb);
}
.tool-card-link:hover .tool-icon-box {
    background-color: #dbeafe;
    transform: scale(1.05);
}
.tool-card-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}
.tool-header-text {
    min-width: 0;
    flex: 1;
}
.tool-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.2rem;
    line-height: 1.3;
}
.tool-card-category {
    font-size: 0.75rem;
    color: var(--primary, #2563eb);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}
.tool-card-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
    margin: 0;
}
.tool-card-action {
    margin-top: 1.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.tool-card-arrow {
    font-size: 1rem;
    transition: transform 0.15s ease;
}
.tool-card-link:hover .tool-card-arrow {
    transform: translateX(3px);
}

/* Tool List Cards (e.g. all-tools page) */
.tool-list-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    min-width: 0;
}
.tool-list-card:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.tool-list-info {
    min-width: 0;
    flex: 1;
}
.tool-list-title {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.25rem;
}
.tool-list-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.4;
    margin: 0;
}

/* ==============================================================
   Production Footer Styles
   ============================================================== */
.footer-wrapper {
    background-color: var(--gray-900, #0f172a);
    color: var(--gray-400, #94a3b8);
    border-top: 1px solid var(--gray-800, #1e293b);
    padding: 4rem 1.5rem 2rem;
    margin-top: auto;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
.footer-col {
    min-width: 0;
}
.footer-col-brand {
    padding-right: 1.5rem;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 1rem;
}
.footer-tagline {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--gray-400, #94a3b8);
    margin-bottom: 1.25rem;
    max-width: 320px;
}
.security-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full, 9999px);
    font-size: 0.75rem;
    color: var(--gray-300, #cbd5e1);
    font-weight: 500;
}
.footer-heading {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin-bottom: 1.25rem;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.footer-links li a {
    color: var(--gray-400, #94a3b8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease;
    display: inline-block;
}
.footer-links li a:hover {
    color: #ffffff;
}
.footer-bottom {
    border-top: 1px solid var(--gray-800, #1e293b);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-500, #64748b);
}

