/**
 * PageSpeedIQ Content Pages & Unified Footer Styles
 * Follows Google Sans / Roboto Google-inspired design system
 */

/* Content Page Layout & Typography (Exact Match with index.php) */
.content-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    font-family: 'Google Sans', 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.content-page-wrapper,
body.content-page-wrapper *,
.content-page-wrapper p,
.content-page-wrapper span,
.content-page-wrapper a,
.content-page-wrapper li,
.content-page-wrapper div,
.content-page-wrapper button,
.content-page-wrapper input,
.content-page-wrapper select,
.content-page-wrapper textarea,
.content-page-wrapper td,
.content-page-wrapper th {
    font-family: 'Google Sans', 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.content-page-main {
    flex: 1;
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 36px 20px 60px;
    font-family: 'Google Sans', 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    color: #202124;
    line-height: 1.6;
}

/* Headings with Google Sans typography */
.content-page-wrapper h1,
.content-page-wrapper h2,
.content-page-wrapper h3,
.content-page-wrapper h4,
.content-page-wrapper h5,
.content-page-wrapper h6,
.content-page-main h1,
.content-page-main h2,
.content-page-main h3,
.content-page-main h4,
.content-page-main h5,
.content-page-main h6 {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    letter-spacing: -0.02em;
}

.content-page-wrapper code,
.content-page-wrapper pre,
.content-page-wrapper kbd,
.content-page-wrapper samp {
    font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, monospace !important;
}

.content-page-main h1 {
    font-size: 34px;
    font-weight: 700;
    color: #202124;
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin: 8px 0 16px 0;
}

.content-page-main h2 {
    font-size: 22px;
    font-weight: 600;
    color: #202124;
    letter-spacing: -0.3px;
    line-height: 1.35;
    margin: 32px 0 14px 0;
}

.content-page-main h3 {
    font-size: 17px;
    font-weight: 600;
    color: #202124;
    margin: 18px 0 10px 0;
}

.content-page-main p {
    font-size: 16px;
    color: #3c4043;
    line-height: 1.7;
    margin-bottom: 16px;
}

.content-page-main a {
    color: #1a73e8;
    text-decoration: none;
}

.content-page-main a:hover {
    text-decoration: underline;
}

.content-page-main ul, 
.content-page-main ol {
    padding-left: 24px;
    margin-bottom: 20px;
    color: #3c4043;
}

.content-page-main li {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.6;
}

/* Breadcrumbs / Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #5f6368;
    text-decoration: none !important;
    margin-bottom: 24px;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: #1a73e8;
}

.page-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #1a73e8;
    margin-bottom: 8px;
}

/* Sections & Cards */
.content-page-main section {
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 24px 0;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(60,64,67,0.06);
}

.content-page-main .hero-card {
    background: linear-gradient(135deg, #f8fafd 0%, #ffffff 50%, #f1f6fd 100%);
    border: 1px solid #d2e3fc;
}

/* Grids */
.content-page-main .grid {
    display: grid;
    gap: 20px;
    margin: 24px 0;
}

.content-page-main .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.content-page-main .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Tables */
.content-page-main table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #dadce0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 16px;
}

.content-page-main th {
    background: #f8f9fa;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #202124;
    border-bottom: 1px solid #dadce0;
}

.content-page-main td {
    padding: 12px 14px;
    border-bottom: 1px solid #e8eaed;
    color: #3c4043;
}

.content-page-main tr:last-child td {
    border-bottom: none;
}

/* Tool Audit Forms */
.tool-audit-card {
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(60,64,67,0.08);
    margin: 24px 0 32px 0;
}

.tool-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tool-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.tool-input-wrap svg {
    position: absolute;
    left: 14px;
    color: #5f6368;
    pointer-events: none;
}

.tool-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tool-input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.tool-submit-btn {
    background: #1a73e8;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    white-space: nowrap;
}

.tool-submit-btn:hover {
    background: #1557b0;
}

/* Callout Box */
.callout-box {
    background: #f8f9fa;
    border-left: 4px solid #1a73e8;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-size: 16px;
    color: #3c4043;
}

/* Unified Global Footer Styles */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #dadce0;
    margin-top: 60px;
    padding: 48px 0 32px;
    font-family: 'Roboto', -apple-system, sans-serif;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr;
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid #e8eaed;
}

.footer-heading {
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #202124;
    margin: 0 0 16px 0;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-list a {
    color: #5f6368;
    font-size: 16px;
    text-decoration: none !important;
    transition: color 0.15s;
}

.footer-nav-list a:hover {
    color: #1a73e8;
}

.footer-desc {
    font-size: 16px;
    color: #5f6368;
    line-height: 1.6;
    margin: 12px 0 16px 0;
    max-width: 380px;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 500;
}

.badge-lighthouse {
    background: #e6f4ea;
    border: 1px solid #ceead6;
    color: #137333;
}

.badge-free {
    background: #e8f0fe;
    border: 1px solid #d2e3fc;
    color: #1a73e8;
}

.badge-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34a853;
    display: inline-block;
    animation: badge-pulse 2s infinite ease-in-out;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 24px;
    font-size: 16px;
    color: #80868b;
    text-align: center;
}

.footer-disclaimer {
    font-size: 16px;
    max-width: 580px;
    text-align: right;
    line-height: 1.5;
    color: #80868b;
}

/* Mobile & Tablet Responsive */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .content-page-main {
        padding: 16px 14px 32px !important;
    }
    .content-page-main h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    .content-page-main h2 {
        font-size: 19px !important;
        line-height: 1.35 !important;
    }
    .content-page-main section {
        padding: 14px 16px !important;
    }
    .content-page-main .grid-cols-2,
    .content-page-main .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-disclaimer {
        text-align: center;
    }
}

@media (max-width: 640px) {
    /* Compact Content Page Main - Eliminate Extra Spacing */
    main.content-page-main {
        padding-top: 10px !important;
        padding-bottom: 24px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Reduce spacing between sections */
    main.content-page-main > * + * {
        margin-top: 14px !important;
    }

    /* Tight mobile headings */
    .content-page-wrapper h1,
    .content-page-main h1 {
        font-size: 21px !important;
        line-height: 1.25 !important;
        margin-top: 4px !important;
        margin-bottom: 6px !important;
    }

    .content-page-wrapper h2,
    .content-page-main h2 {
        font-size: 17px !important;
        line-height: 1.3 !important;
        margin-top: 14px !important;
        margin-bottom: 6px !important;
    }

    .content-page-wrapper h3,
    .content-page-main h3 {
        font-size: 16px !important;
        line-height: 1.35 !important;
        margin-top: 10px !important;
        margin-bottom: 4px !important;
    }

    /* Tight paragraphs */
    .content-page-main p {
        font-size: 16px !important;
        line-height: 1.55 !important;
        margin-bottom: 8px !important;
    }

    /* Back link button */
    .content-page-main a[href="/"],
    .content-page-main .back-link {
        margin-bottom: 8px !important;
        font-size: 16px !important;
    }

    /* Tight cards & inner padding on mobile */
    .content-page-main .rounded-3xl,
    .content-page-main .rounded-2xl {
        border-radius: 12px !important;
        padding: 12px 14px !important;
    }

    /* Tight grid gaps */
    .content-page-main .grid {
        gap: 10px !important;
    }

    /* Tight inner space-y */
    .content-page-main .space-y-4 > * + *,
    .content-page-main .space-y-6 > * + * {
        margin-top: 10px !important;
    }

    .content-page-main ul,
    .content-page-main ol {
        padding-left: 18px !important;
        margin-bottom: 10px !important;
    }

    .content-page-main li {
        margin-bottom: 4px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .tool-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .tool-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

