/*
Theme Name: AamirSEOTools
Theme URI: https://aamirseotools.com
Author: Aamir Shehzad
Author URI: https://aamirseotools.com
Description: SEO-optimized WordPress theme for SEO tool websites. Includes schema markup, meta tags, admin color panel, breadcrumbs, Elementor support and zero plugin conflicts.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aamirseotools
Tags: seo, blog, custom-colors, custom-logo, custom-menu, elementor, responsive-layout, schema
*/

/* =============================================
   CSS CUSTOM PROPERTIES (defaults, overridden by Customizer)
   ============================================= */
:root {
    --ast-primary-color:        #2563EB;
    --ast-secondary-color:      #1E40AF;
    --ast-accent-color:         #F59E0B;
    --ast-text-color:           #1F2937;
    --ast-text-light:           #6B7280;
    --ast-bg-color:             #FFFFFF;
    --ast-bg-secondary:         #F3F4F6;
    --ast-border-color:         #E5E7EB;
    --ast-heading-color:        #111827;
    --ast-link-color:           #2563EB;
    --ast-link-hover:           #1E40AF;
    --ast-header-bg:            #FFFFFF;
    --ast-footer-bg:            #111827;
    --ast-footer-text:          #D1D5DB;
    --ast-font-family:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ast-font-size-base:       16px;
    --ast-line-height:          1.75;
    --ast-border-radius:        8px;
    --ast-shadow:               0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --ast-shadow-md:            0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --ast-shadow-lg:            0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --ast-container-width:      1200px;
    --ast-transition:           0.25s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: var(--ast-font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ast-font-family);
    color: var(--ast-text-color);
    background-color: var(--ast-bg-color);
    line-height: var(--ast-line-height);
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--ast-heading-color);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.25rem; }

a { color: var(--ast-link-color); text-decoration: none; transition: color var(--ast-transition); }
a:hover { color: var(--ast-link-hover); text-decoration: underline; }

img, video { max-width: 100%; height: auto; display: block; }

/* =============================================
   LAYOUT / CONTAINER
   ============================================= */
.ast-container {
    width: 100%;
    max-width: var(--ast-container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.ast-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.ast-content-area { flex: 1 1 65%; min-width: 0; }
.ast-sidebar      { flex: 0 0 300px; min-width: 0; }

.ast-full-width { flex: 1 1 100%; }

/* =============================================
   HEADER
   ============================================= */
#ast-header {
    background: var(--ast-header-bg);
    box-shadow: var(--ast-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--ast-transition), box-shadow var(--ast-transition);
}

.ast-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 1.5rem;
}

/* Logo */
.ast-site-logo a { display: flex; align-items: center; gap: 0.5rem; }
.ast-site-logo img { max-height: 50px; width: auto; }
.ast-site-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ast-primary-color);
    text-decoration: none;
    line-height: 1;
}
.ast-site-title:hover { color: var(--ast-secondary-color); text-decoration: none; }
.ast-site-tagline {
    font-size: 0.75rem;
    color: var(--ast-text-light);
    margin: 0;
    font-weight: 400;
}

/* Navigation */
.ast-primary-nav ul { list-style: none; display: flex; align-items: center; gap: 0.25rem; }
.ast-primary-nav > ul > li { position: relative; }
.ast-primary-nav a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--ast-text-color);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--ast-border-radius);
    transition: background var(--ast-transition), color var(--ast-transition);
    text-decoration: none;
}
.ast-primary-nav a:hover,
.ast-primary-nav .current-menu-item > a { background: var(--ast-bg-secondary); color: var(--ast-primary-color); }

/* Dropdown */
.ast-primary-nav .sub-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--ast-bg-color);
    border: 1px solid var(--ast-border-color);
    border-radius: var(--ast-border-radius);
    box-shadow: var(--ast-shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--ast-transition);
    z-index: 999;
}
.ast-primary-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.ast-primary-nav .sub-menu li { border-bottom: 1px solid var(--ast-border-color); }
.ast-primary-nav .sub-menu li:last-child { border-bottom: none; }
.ast-primary-nav .sub-menu a { border-radius: 0; font-weight: 400; }

/* Mobile Toggle */
.ast-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--ast-text-color);
}
.ast-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 5px 0;
    transition: all var(--ast-transition);
}

/* Header CTA */
.ast-header-cta .btn-primary {
    background: var(--ast-primary-color);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--ast-border-radius);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background var(--ast-transition);
}
.ast-header-cta .btn-primary:hover { background: var(--ast-secondary-color); text-decoration: none; color: #fff; }

/* =============================================
   HERO / BANNER
   ============================================= */
.ast-hero {
    background: linear-gradient(135deg, var(--ast-primary-color) 0%, var(--ast-secondary-color) 100%);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
}
.ast-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.ast-hero p { font-size: 1.15rem; opacity: 0.9; max-width: 640px; margin: 0 auto 2rem; }
.ast-hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.ast-hero .btn-white {
    background: #fff;
    color: var(--ast-primary-color);
    padding: 0.75rem 2rem;
    border-radius: var(--ast-border-radius);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--ast-transition);
}
.ast-hero .btn-white:hover { background: var(--ast-bg-secondary); text-decoration: none; color: var(--ast-primary-color); }
.ast-hero .btn-outline {
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: var(--ast-border-radius);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--ast-transition);
}
.ast-hero .btn-outline:hover { background: rgba(255,255,255,0.15); text-decoration: none; color: #fff; }

/* =============================================
   TOOLS GRID
   ============================================= */
.ast-tools-section { padding: 4rem 0; }
.ast-section-header { text-align: center; margin-bottom: 3rem; }
.ast-section-header h2 { margin-bottom: 0.5rem; }
.ast-section-header p { color: var(--ast-text-light); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

.ast-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ast-tool-card {
    background: var(--ast-bg-color);
    border: 1px solid var(--ast-border-color);
    border-radius: calc(var(--ast-border-radius) * 1.5);
    padding: 1.5rem;
    box-shadow: var(--ast-shadow);
    transition: box-shadow var(--ast-transition), transform var(--ast-transition), border-color var(--ast-transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ast-tool-card:hover {
    box-shadow: var(--ast-shadow-lg);
    transform: translateY(-3px);
    border-color: var(--ast-primary-color);
    text-decoration: none;
    color: inherit;
}
.ast-tool-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--ast-primary-color), var(--ast-secondary-color));
    border-radius: var(--ast-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
}
.ast-tool-card h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.ast-tool-card p { font-size: 0.875rem; color: var(--ast-text-light); margin: 0; flex: 1; }

/* =============================================
   BREADCRUMBS
   ============================================= */
.ast-breadcrumbs {
    background: var(--ast-bg-secondary);
    padding: 0.75rem 0;
    font-size: 0.85rem;
}
.ast-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; list-style: none; }
.ast-breadcrumbs li + li::before { content: "/"; color: var(--ast-text-light); margin-right: 0.25rem; }
.ast-breadcrumbs a { color: var(--ast-primary-color); }
.ast-breadcrumbs span[aria-current] { color: var(--ast-text-light); }

/* =============================================
   MAIN CONTENT
   ============================================= */
.ast-main-content { padding: 3rem 0; }

.ast-entry {
    background: var(--ast-bg-color);
    border-radius: var(--ast-border-radius);
    overflow: hidden;
}
.ast-entry-header { margin-bottom: 1.5rem; }
.ast-entry-title { margin-bottom: 0.5rem; }
.ast-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--ast-text-light);
    margin-bottom: 1rem;
    align-items: center;
}
.ast-entry-meta a { color: var(--ast-text-light); }
.ast-entry-meta a:hover { color: var(--ast-primary-color); }
.ast-entry-meta .cat-tag {
    background: var(--ast-primary-color);
    color: #fff;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.ast-entry-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--ast-border-radius);
    margin-bottom: 1.5rem;
}

.ast-entry-content {
    line-height: var(--ast-line-height);
}
.ast-entry-content h2, .ast-entry-content h3, .ast-entry-content h4 { margin-top: 2rem; }
.ast-entry-content ul, .ast-entry-content ol { margin: 1rem 0 1rem 1.5rem; }
.ast-entry-content li { margin-bottom: 0.4rem; }
.ast-entry-content blockquote {
    border-left: 4px solid var(--ast-primary-color);
    padding: 1rem 1.5rem;
    background: var(--ast-bg-secondary);
    border-radius: 0 var(--ast-border-radius) var(--ast-border-radius) 0;
    margin: 1.5rem 0;
    font-style: italic;
}
.ast-entry-content pre {
    background: #1F2937;
    color: #E5E7EB;
    padding: 1.25rem;
    border-radius: var(--ast-border-radius);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}
.ast-entry-content code {
    background: var(--ast-bg-secondary);
    color: var(--ast-primary-color);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
}
.ast-entry-content pre code { background: none; color: inherit; padding: 0; }
.ast-entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.ast-entry-content th, .ast-entry-content td { padding: 0.75rem 1rem; border: 1px solid var(--ast-border-color); text-align: left; }
.ast-entry-content th { background: var(--ast-bg-secondary); font-weight: 600; }
.ast-entry-content tr:nth-child(even) td { background: var(--ast-bg-secondary); }

/* Tags */
.ast-entry-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ast-entry-tags span { font-size: 0.85rem; color: var(--ast-text-light); }
.ast-entry-tags a {
    background: var(--ast-bg-secondary);
    color: var(--ast-text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid var(--ast-border-color);
    transition: all var(--ast-transition);
}
.ast-entry-tags a:hover { background: var(--ast-primary-color); color: #fff; border-color: var(--ast-primary-color); }

/* =============================================
   POST CARDS (archive / blog listing)
   ============================================= */
.ast-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.ast-post-card {
    background: var(--ast-bg-color);
    border: 1px solid var(--ast-border-color);
    border-radius: calc(var(--ast-border-radius) * 1.5);
    overflow: hidden;
    box-shadow: var(--ast-shadow);
    transition: box-shadow var(--ast-transition), transform var(--ast-transition);
    display: flex;
    flex-direction: column;
}
.ast-post-card:hover { box-shadow: var(--ast-shadow-lg); transform: translateY(-4px); }
.ast-post-card-thumb { aspect-ratio: 16/9; overflow: hidden; }
.ast-post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ast-post-card:hover .ast-post-card-thumb img { transform: scale(1.04); }
.ast-post-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.ast-post-card-meta { display: flex; gap: 0.75rem; font-size: 0.78rem; color: var(--ast-text-light); margin-bottom: 0.5rem; align-items: center; }
.ast-post-card-meta .cat { color: var(--ast-primary-color); font-weight: 600; }
.ast-post-card h2, .ast-post-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.35; }
.ast-post-card h2 a, .ast-post-card h3 a { color: var(--ast-heading-color); text-decoration: none; }
.ast-post-card h2 a:hover, .ast-post-card h3 a:hover { color: var(--ast-primary-color); }
.ast-post-card-excerpt { font-size: 0.9rem; color: var(--ast-text-light); flex: 1; line-height: 1.6; }
.ast-post-card-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--ast-border-color); }
.ast-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ast-primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}
.ast-read-more:hover { text-decoration: underline; }

/* =============================================
   SIDEBAR / WIDGETS
   ============================================= */
.ast-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.ast-widget {
    background: var(--ast-bg-color);
    border: 1px solid var(--ast-border-color);
    border-radius: calc(var(--ast-border-radius) * 1.5);
    overflow: hidden;
    box-shadow: var(--ast-shadow);
}
.ast-widget-title {
    background: var(--ast-bg-secondary);
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ast-heading-color);
    border-bottom: 1px solid var(--ast-border-color);
    margin: 0;
}
.ast-widget-content { padding: 1.25rem; }
.widget ul { list-style: none; }
.widget ul li { padding: 0.4rem 0; border-bottom: 1px solid var(--ast-border-color); font-size: 0.9rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--ast-text-color); text-decoration: none; }
.widget ul li a:hover { color: var(--ast-primary-color); }

/* Search widget */
.ast-search-form { display: flex; gap: 0.5rem; }
.ast-search-form input[type="search"] {
    flex: 1;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--ast-border-color);
    border-radius: var(--ast-border-radius);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--ast-transition);
}
.ast-search-form input[type="search"]:focus { border-color: var(--ast-primary-color); }
.ast-search-form button {
    background: var(--ast-primary-color);
    color: #fff;
    border: none;
    padding: 0 1rem;
    border-radius: var(--ast-border-radius);
    cursor: pointer;
    transition: background var(--ast-transition);
}
.ast-search-form button:hover { background: var(--ast-secondary-color); }

/* =============================================
   PAGINATION
   ============================================= */
.ast-pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}
.ast-pagination a, .ast-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--ast-border-color);
    border-radius: var(--ast-border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ast-text-color);
    text-decoration: none;
    transition: all var(--ast-transition);
}
.ast-pagination a:hover { background: var(--ast-primary-color); color: #fff; border-color: var(--ast-primary-color); }
.ast-pagination .current { background: var(--ast-primary-color); color: #fff; border-color: var(--ast-primary-color); }

/* =============================================
   COMMENTS
   ============================================= */
.ast-comments { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--ast-border-color); }
.comment-list { list-style: none; }
.comment { padding: 1.5rem; background: var(--ast-bg-secondary); border-radius: var(--ast-border-radius); margin-bottom: 1rem; }
.comment-author img { border-radius: 50%; width: 48px; height: 48px; }
.comment-meta { font-size: 0.85rem; color: var(--ast-text-light); }
.reply a { font-size: 0.8rem; color: var(--ast-primary-color); }
.children { padding-left: 2rem; }
#respond { margin-top: 2rem; }
#respond h3 { margin-bottom: 1rem; }
.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ast-border-color);
    border-radius: var(--ast-border-radius);
    font-family: inherit;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    transition: border-color var(--ast-transition);
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: none;
    border-color: var(--ast-primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.comment-form label { font-size: 0.85rem; font-weight: 600; color: var(--ast-heading-color); }
.comment-form .form-submit input {
    background: var(--ast-primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    width: auto;
    padding: 0.75rem 2rem;
    transition: background var(--ast-transition);
}
.comment-form .form-submit input:hover { background: var(--ast-secondary-color); }

/* =============================================
   FOOTER
   ============================================= */
#ast-footer {
    background: var(--ast-footer-bg);
    color: var(--ast-footer-text);
    padding: 4rem 0 0;
}
.ast-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ast-footer-widget h4 {
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}
.ast-footer-widget p { font-size: 0.9rem; line-height: 1.7; opacity: 0.8; }
.ast-footer-widget ul { list-style: none; }
.ast-footer-widget ul li { margin-bottom: 0.6rem; }
.ast-footer-widget ul li a { color: var(--ast-footer-text); font-size: 0.875rem; opacity: 0.8; text-decoration: none; transition: opacity var(--ast-transition), color var(--ast-transition); }
.ast-footer-widget ul li a:hover { opacity: 1; color: var(--ast-accent-color); text-decoration: none; }

.ast-footer-social { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.ast-footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background var(--ast-transition);
}
.ast-footer-social a:hover { background: var(--ast-primary-color); text-decoration: none; }

.ast-footer-bottom {
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.7;
}
.ast-footer-bottom a { color: var(--ast-footer-text); }
.ast-footer-bottom a:hover { color: var(--ast-accent-color); }
.ast-footer-bottom-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* =============================================
   BUTTONS
   ============================================= */
.ast-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--ast-border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--ast-transition);
    text-decoration: none;
    line-height: 1.4;
}
.ast-btn-primary { background: var(--ast-primary-color); color: #fff; border-color: var(--ast-primary-color); }
.ast-btn-primary:hover { background: var(--ast-secondary-color); border-color: var(--ast-secondary-color); color: #fff; text-decoration: none; }
.ast-btn-secondary { background: transparent; color: var(--ast-primary-color); border-color: var(--ast-primary-color); }
.ast-btn-secondary:hover { background: var(--ast-primary-color); color: #fff; text-decoration: none; }
.ast-btn-accent { background: var(--ast-accent-color); color: #fff; border-color: var(--ast-accent-color); }
.ast-btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.ast-btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }

/* =============================================
   NOTICE / ALERT BOXES
   ============================================= */
.ast-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--ast-border-radius);
    border-left: 4px solid;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.ast-alert-info    { background: #EFF6FF; border-color: #3B82F6; color: #1E40AF; }
.ast-alert-success { background: #F0FDF4; border-color: #22C55E; color: #15803D; }
.ast-alert-warning { background: #FFFBEB; border-color: #F59E0B; color: #92400E; }
.ast-alert-danger  { background: #FFF1F2; border-color: #F43F5E; color: #9F1239; }

/* =============================================
   TOC (Table of Contents)
   ============================================= */
.ast-toc {
    background: var(--ast-bg-secondary);
    border: 1px solid var(--ast-border-color);
    border-radius: var(--ast-border-radius);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}
.ast-toc-title { font-weight: 700; margin-bottom: 0.75rem; font-size: 0.95rem; }
.ast-toc ol { margin: 0 0 0 1.25rem; }
.ast-toc li { margin-bottom: 0.35rem; font-size: 0.875rem; }
.ast-toc a { color: var(--ast-primary-color); }

/* =============================================
   404 PAGE
   ============================================= */
.ast-404 { text-align: center; padding: 6rem 0; }
.ast-404-code { font-size: clamp(6rem, 20vw, 10rem); font-weight: 900; color: var(--ast-primary-color); line-height: 1; opacity: 0.15; }
.ast-404 h1 { margin-top: -2rem; }

/* =============================================
   ELEMENTOR COMPATIBILITY
   ============================================= */
.elementor-section { margin: 0; }
.ast-elementor-canvas { padding-top: 0 !important; }
.elementor-page #ast-header { position: relative; }
body.elementor-editor-active #ast-header { position: relative !important; }

/* =============================================
   SKIP LINK (a11y)
   ============================================= */
.ast-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--ast-primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top 0.2s;
}
.ast-skip-link:focus { top: 0; }

/* =============================================
   LOADING SPINNER
   ============================================= */
.ast-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(37,99,235,0.2);
    border-top-color: var(--ast-primary-color);
    border-radius: 50%;
    animation: ast-spin 0.6s linear infinite;
}
@keyframes ast-spin { to { transform: rotate(360deg); } }

/* =============================================
   BACK TO TOP
   ============================================= */
#ast-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--ast-primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ast-shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--ast-transition);
    z-index: 500;
    font-size: 1.1rem;
}
#ast-back-to-top.visible { opacity: 1; visibility: visible; }
#ast-back-to-top:hover { background: var(--ast-secondary-color); transform: translateY(-3px); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .ast-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .ast-mobile-toggle { display: block; }
    .ast-primary-nav {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--ast-bg-color);
        border-top: 1px solid var(--ast-border-color);
        box-shadow: var(--ast-shadow-lg);
        z-index: 999;
        padding: 1rem;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .ast-primary-nav.open { display: block; }
    .ast-primary-nav ul { flex-direction: column; }
    .ast-primary-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }
    .ast-row { flex-direction: column; }
    .ast-sidebar { flex: none; width: 100%; }
    .ast-footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .ast-footer-bottom { flex-direction: column; text-align: center; }
    .ast-header-cta { display: none; }
    .ast-posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .ast-container { padding-left: 1rem; padding-right: 1rem; }
    .ast-hero { padding: 3rem 0; }
    .ast-tools-grid { grid-template-columns: 1fr; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    #ast-header, #ast-footer, .ast-sidebar, #ast-back-to-top, .ast-breadcrumbs { display: none; }
    .ast-content-area { flex: 1 1 100%; }
    body { color: #000; }
    a { color: #000; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* =============================================
   DARK MODE (auto via OS preference)
   ============================================= */
@media (prefers-color-scheme: dark) {
    body.ast-auto-dark {
        --ast-bg-color:       #111827;
        --ast-bg-secondary:   #1F2937;
        --ast-text-color:     #E5E7EB;
        --ast-heading-color:  #F9FAFB;
        --ast-text-light:     #9CA3AF;
        --ast-border-color:   #374151;
        --ast-header-bg:      #1F2937;
    }
}

/* =============================================
   BOOTSTRAP 5 OVERRIDES & INTEGRATION
   ============================================= */

/* Map Bootstrap primary to brand color */
:root {
    --bs-primary:        #2563EB;
    --bs-primary-rgb:    37, 99, 235;
    --bs-link-color:     #2563EB;
    --bs-link-hover-color: #1E40AF;
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-color:     #1F2937;
    --bs-border-radius:  8px;
    --bs-border-radius-lg: 12px;
    --bs-border-radius-sm: 6px;
}

/* Bootstrap button primary — use brand color */
.btn-primary {
    --bs-btn-bg:               #2563EB;
    --bs-btn-border-color:     #2563EB;
    --bs-btn-hover-bg:         #1E40AF;
    --bs-btn-hover-border-color: #1E40AF;
    --bs-btn-active-bg:        #1D4ED8;
    --bs-btn-disabled-bg:      #93C5FD;
    --bs-btn-disabled-border-color: #93C5FD;
    font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color:            #2563EB;
    --bs-btn-border-color:     #2563EB;
    --bs-btn-hover-bg:         #2563EB;
    --bs-btn-hover-border-color: #2563EB;
}

/* Accent / amber button */
.btn-accent {
    background-color: #F59E0B;
    border-color:     #F59E0B;
    color:            #fff;
    font-weight: 600;
}
.btn-accent:hover {
    background-color: #D97706;
    border-color:     #D97706;
    color:            #fff;
}

/* Focus ring — brand colored */
.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(37,99,235,.25);
    border-color: #2563EB;
}

/* ── Navbar Bootstrap Integration ── */
.ast-navbar-main {
    background: var(--ast-header-bg, #fff);
    box-shadow: var(--ast-shadow, 0 1px 3px rgba(0,0,0,.1));
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.ast-navbar-main.scrolled {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

.ast-navbar-main .navbar {
    background: transparent !important;
}

.ast-navbar-main .navbar-brand .ast-site-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ast-primary-color, #2563EB);
    line-height: 1;
}

.ast-navbar-main .nav-link {
    color: var(--ast-text-color, #1F2937);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--ast-border-radius, 8px);
    transition: background 0.25s ease, color 0.25s ease;
}

.ast-navbar-main .nav-link:hover,
.ast-navbar-main .nav-link.active {
    background: var(--ast-bg-secondary, #F3F4F6);
    color: var(--ast-primary-color, #2563EB);
}

.ast-navbar-main .navbar-nav .nav-link.show {
    color: var(--ast-primary-color, #2563EB);
}

.ast-navbar-main .dropdown-menu {
    border: 1px solid var(--ast-border-color, #E5E7EB);
    border-radius: var(--ast-border-radius, 8px);
    box-shadow: var(--ast-shadow-lg, 0 10px 15px rgba(0,0,0,.1));
    margin-top: 0.5rem !important;
    min-width: 220px;
    animation: astDropIn 0.15s ease;
}

@keyframes astDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ast-navbar-main .dropdown-item {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.ast-navbar-main .dropdown-item:hover {
    background: var(--ast-bg-secondary, #F3F4F6);
    color: var(--ast-primary-color, #2563EB);
}

/* ── Navbar search ── */
.ast-navbar-search .form-control {
    border-color: var(--ast-border-color, #E5E7EB);
    font-size: 0.875rem;
}

.ast-navbar-search .form-control:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 0.2rem rgba(37,99,235,.15);
}

/* ── Theme toggle button ── */
.ast-theme-toggle {
    line-height: 1;
}

.ast-theme-toggle:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* ── Bootstrap Card enhancements ── */
.card {
    border-color: var(--ast-border-color, #E5E7EB);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--ast-shadow, 0 1px 3px rgba(0,0,0,.1));
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
    box-shadow: var(--ast-shadow-lg, 0 10px 15px rgba(0,0,0,.1));
    transform: translateY(-2px);
}

.card-header {
    background: var(--ast-bg-secondary, #F3F4F6);
    border-bottom-color: var(--ast-border-color, #E5E7EB);
    font-weight: 600;
}

/* ── Bootstrap Form Enhancements ── */
.form-control,
.form-select {
    border-color: var(--ast-border-color, #E5E7EB);
    font-family: var(--ast-font-family, 'Inter', sans-serif);
    color: var(--ast-text-color, #1F2937);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ── Bootstrap Badge ── */
.badge.bg-primary { background-color: #2563EB !important; }
.badge.bg-accent  { background-color: #F59E0B !important; }

/* ── Bootstrap Alert overrides ── */
.alert {
    border-radius: var(--ast-border-radius, 8px);
}

/* ── Bootstrap Table ── */
.table thead th {
    background: var(--ast-bg-secondary, #F3F4F6);
    color: var(--ast-heading-color, #111827);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Bootstrap Accordion ── */
.accordion-button:not(.collapsed) {
    color: #2563EB;
    background-color: #EFF6FF;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(37,99,235,.2);
}

/* =============================================
   UTILITY CLASSES (SEO Tools Layout)
   ============================================= */

/* Section spacing */
.ast-section      { padding: 4rem 0; }
.ast-section-sm   { padding: 2rem 0; }
.ast-section-lg   { padding: 6rem 0; }

/* Gradient backgrounds */
.ast-bg-gradient-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    color: #fff;
}

.ast-bg-gradient-accent {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #fff;
}

.ast-bg-subtle {
    background-color: var(--ast-bg-secondary, #F3F4F6);
}

/* Text utilities */
.ast-text-primary { color: #2563EB !important; }
.ast-text-accent  { color: #F59E0B !important; }
.ast-text-muted   { color: var(--ast-text-light, #6B7280) !important; }

/* fw-600 helper */
.fw-600 { font-weight: 600; }
.fw-800 { font-weight: 800; }

/* Icon circle */
.ast-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ast-icon-circle-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Tool output box */
.ast-output-box {
    background: var(--ast-bg-secondary, #F3F4F6);
    border: 1px solid var(--ast-border-color, #E5E7EB);
    border-radius: var(--ast-border-radius, 8px);
    padding: 1.25rem;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    min-height: 120px;
    white-space: pre-wrap;
    word-break: break-all;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Results table */
.ast-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ast-results-table th {
    background: var(--ast-primary-color, #2563EB);
    color: #fff;
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 600;
}

.ast-results-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--ast-border-color, #E5E7EB);
    color: var(--ast-text-color, #1F2937);
}

.ast-results-table tr:nth-child(even) td {
    background: var(--ast-bg-secondary, #F3F4F6);
}

/* Score badge */
.ast-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    border: 4px solid;
    flex-shrink: 0;
}

.ast-score-good    { color: #22C55E; border-color: #22C55E; }
.ast-score-fair    { color: #F59E0B; border-color: #F59E0B; }
.ast-score-poor    { color: #EF4444; border-color: #EF4444; }

/* ── Footer widget list links ── */
#ast-footer .ast-footer-widget ul.list-unstyled li a {
    color: var(--ast-footer-text, #D1D5DB);
    opacity: 0.8;
    font-size: 0.875rem;
    text-decoration: none;
    transition: opacity 0.25s ease, color 0.25s ease;
}

#ast-footer .ast-footer-widget ul.list-unstyled li a:hover {
    opacity: 1;
    color: #F59E0B;
}

/* ── Social link hover ── */
.ast-social-link:hover {
    background: #2563EB !important;
    text-decoration: none;
}

/* ── Cookie banner hide animation ── */
.ast-cookie-hiding {
    animation: astSlideDown 0.4s ease forwards;
}

@keyframes astSlideDown {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(100%); opacity: 0; }
}

/* =============================================
   RESPONSIVE BOOTSTRAP OVERRIDES
   ============================================= */

@media (max-width: 991.98px) {
    .ast-navbar-main .dropdown-menu {
        box-shadow: none;
        border: none;
        border-left: 3px solid #2563EB;
        border-radius: 0;
        padding-left: 0.75rem;
        margin-top: 0 !important;
    }

    .ast-navbar-main .navbar-collapse {
        padding: 1rem 0;
        border-top: 1px solid var(--ast-border-color, #E5E7EB);
        margin-top: 0.5rem;
    }

    .ast-navbar-main .nav-link {
        border-radius: 0;
    }

    .ast-navbar-search {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .ast-navbar-search .input-group {
        max-width: 100% !important;
    }

    .ast-header-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-bottom: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    #ast-footer .row {
        row-gap: 2rem;
    }

    .ast-footer-bottom {
        text-align: center;
    }

    .ast-footer-bottom .ast-footer-bottom-nav {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    #ast-back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
    }
}

/* =============================================
   PRINT (Bootstrap addendum)
   ============================================= */
@media print {
    .ast-navbar-main,
    #ast-footer,
    #ast-back-to-top,
    #ast-cookie-banner,
    #ast-scroll-progress { display: none !important; }
}
