/**
 * Universal Responsive Framework for EasyPDFTool
 * Ensures consistent design and mobile compatibility across all pages
 */

:root {
    /* Colors - Consistent Palette */
    --primary-blue: #2563eb;
    --primary-purple: #7c3aed;
    --primary-pink: #ec4899;
    --success-green: #10b981;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --background-light: #f8fafc;
    --surface-white: #ffffff;
    --border-gray: #e2e8f0;

    /* Spacing - Consistent Units */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius - Consistent Curves */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows - Consistent Elevation */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-primary: 'Inter', -apple-system, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
}

/* =====================================================
   RESPONSIVE HEADER
   ===================================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-gray);
    z-index: 1000;
    padding: 12px 24px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo img {
    height: 36px;
    transition: transform 0.3s ease;
}

.header-logo:hover img {
    transform: scale(1.05);
}

.header-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

/* Desktop Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.header-nav a {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
    background: #f1f5f9;
    color: var(--primary-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-all-tools {
    padding: 10px 20px;
    background: #eff6ff;
    border: none;
    color: var(--primary-blue);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-all-tools:hover {
    background: #dbeafe;
}

/* Mobile Menu Toggle (Hidden by default) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* =====================================================
   RESPONSIVE FOOTER
   ===================================================== */

.main-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 60px 24px 24px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
}

/* =====================================================
   RESPONSIVE TOOL CARDS/BOXES
   ===================================================== */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

.tool-card {
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.tool-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.tool-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.tool-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
    .header-nav {
        display: none;
        /* Hide main nav on tablet/mobile */
    }

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

    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

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

/* Mobile: 320px - 767px */
@media (max-width: 767px) {
    .main-header {
        padding: 12px 16px;
    }

    .header-container {
        gap: 16px;
    }

    .header-logo img {
        height: 28px;
    }

    .header-brand {
        font-size: 16px;
    }

    .btn-all-tools {
        padding: 8px 12px;
        font-size: 13px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 12px;
    }

    .tool-card {
        padding: 20px;
    }

    .tool-card-icon {
        font-size: 36px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        /* Single column footer */
        gap: 24px;
    }

    .main-footer {
        padding: 40px 16px 20px;
        margin-top: 40px;
    }
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-fluid {
    width: 100%;
    padding: 0 24px;
}

@media (max-width: 767px) {

    .container,
    .container-fluid {
        padding: 0 16px;
    }
}

/* Responsive Text */
.text-responsive {
    font-size: clamp(14px, 2vw, 18px);
}

.heading-responsive {
    font-size: clamp(24px, 5vw, 48px);
}

/* Hide/Show by breakpoint */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

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

    .show-mobile {
        display: block;
    }
}

/* =====================================================
   BUTTON SYSTEM - Consistent across all pages
   ===================================================== */

.btn {
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: var(--font-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

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

.btn-success:hover {
    background: #059669;
}

@media (max-width: 767px) {
    .btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        /* Full width buttons on mobile */
    }
}

/* =====================================================
   FORM INPUTS - Consistent across all pages
   ===================================================== */

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-primary);
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* =====================================================
   MOBILE-FIRST SPACING
   ===================================================== */

.mt-xs {
    margin-top: var(--spacing-xs);
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-xs {
    margin-bottom: var(--spacing-xs);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.p-xs {
    padding: var(--spacing-xs);
}

.p-sm {
    padding: var(--spacing-sm);
}

.p-md {
    padding: var(--spacing-md);
}

.p-lg {
    padding: var(--spacing-lg);
}

.p-xl {
    padding: var(--spacing-xl);
}

/* =====================================================
   MAIN CONTENT AREA - Always below fixed header
   ===================================================== */

main {
    padding-top: 80px;
    /* Height of fixed header + margin */
    min-height: calc(100vh - 80px);
}

@media (max-width: 767px) {
    main {
        padding-top: 60px;
        /* Smaller header on mobile */
    }
}