/*
Theme Name: Mousaw
Theme URI: https://mousaw.com
Author: Eric Mousaw
Author URI: https://mousaw.com
Description: A clean, Bootstrap 5 blog theme for digital marketing content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: mousaw
*/

/* ========== CSS Custom Properties ========== */

:root {
    --mousaw-mint: #E5F4E3;
    --mousaw-blue: #5DA9E9;
    --mousaw-navy: #003F91;
    --mousaw-white: #FFFFFF;
    --mousaw-purple: #6D326D;

    --mousaw-bg-primary: #FFFFFF;
    --mousaw-bg-section: #E5F4E3;
    --mousaw-text-heading: #003F91;
    --mousaw-text-body: #2D2D2D;
    --mousaw-text-muted: #6c757d;
    --mousaw-link-color: #5DA9E9;
    --mousaw-link-hover: #003F91;
    --mousaw-btn-primary-bg: #6D326D;
    --mousaw-btn-primary-hover: #8B4A8B;
    --mousaw-border-accent: #6D326D;
    --mousaw-code-bg: #1e1e2e;
    --mousaw-code-text: #cdd6f4;

    --mousaw-font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --mousaw-font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    --mousaw-line-height: 1.8;
    --mousaw-content-max-width: 800px;
}

/* ========== Base Typography ========== */

body {
    font-family: var(--mousaw-font-body);
    color: var(--mousaw-text-body);
    line-height: var(--mousaw-line-height);
    background-color: var(--mousaw-bg-primary);
}

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

h1 { margin-bottom: 1rem; }
h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { margin-top: 2rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--mousaw-link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--mousaw-link-hover);
    text-decoration: underline;
}

/* ========== Navbar ========== */

.navbar-mousaw {
    background-color: var(--mousaw-navy);
}

.navbar-mousaw .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar-mousaw .navbar-brand:hover {
    color: var(--mousaw-mint);
}

.navbar-mousaw .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.navbar-mousaw .nav-link:hover,
.navbar-mousaw .nav-link.active {
    color: #fff;
}

/* ========== Cards (Blog Listing) ========== */

.card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card .card-img-top {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card .card-title a {
    color: var(--mousaw-text-heading);
    text-decoration: none;
}

.card .card-title a:hover {
    color: var(--mousaw-link-color);
    text-decoration: none;
}

.badge-mousaw {
    background-color: var(--mousaw-purple);
    color: #fff;
    font-weight: 500;
    font-size: 0.75rem;
    text-decoration: none;
    padding: 0.35em 0.65em;
    border-radius: 4px;
}

.badge-mousaw:hover {
    background-color: var(--mousaw-btn-primary-hover);
    color: #fff;
    text-decoration: none;
}

.article-meta {
    font-size: 0.875rem;
    color: var(--mousaw-text-muted);
}

/* ========== Single Post ========== */

.featured-image-single img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
}

.yoast-breadcrumb {
    font-size: 0.85rem;
}

.yoast-breadcrumb a {
    color: var(--mousaw-text-muted);
}

.yoast-breadcrumb a:hover {
    color: var(--mousaw-link-color);
}

/* ========== Post Content Blocks ========== */

.single-post-content {
    max-width: var(--mousaw-content-max-width);
    margin: 0 auto;
}

/* Images */
.single-post-content figure.wp-block-image {
    margin: 2rem 0;
    text-align: center;
}

.single-post-content figure.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.single-post-content figure.wp-block-image figcaption {
    font-size: 0.85rem;
    color: var(--mousaw-text-muted);
    margin-top: 0.5rem;
}

/* Tables — responsive wrapper */
.single-post-content .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

.single-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95rem;
    min-width: 480px;
}

.single-post-content table th,
.single-post-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.single-post-content table th {
    background-color: var(--mousaw-navy);
    color: #fff;
    font-weight: 600;
}

.single-post-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Code Blocks */
.single-post-content pre,
.single-post-content .wp-block-code {
    background-color: var(--mousaw-code-bg);
    color: var(--mousaw-code-text);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: var(--mousaw-font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.single-post-content code {
    font-family: var(--mousaw-font-mono);
    font-size: 0.875em;
}

.single-post-content :not(pre) > code {
    background-color: #f1f3f5;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--mousaw-purple);
}

/* Blockquotes */
.single-post-content blockquote,
.single-post-content .wp-block-quote {
    border-left: 4px solid var(--mousaw-border-accent);
    background-color: var(--mousaw-bg-section);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.single-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.single-post-content blockquote cite {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--mousaw-text-muted);
    margin-top: 0.5rem;
}

/* Lists */
.single-post-content ul,
.single-post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.single-post-content li {
    margin-bottom: 0.4rem;
}

/* ========== Author Box ========== */

.author-box {
    background-color: var(--mousaw-bg-section);
    border-radius: 10px;
}

/* ========== Related Posts ========== */

.related-posts .card {
    border: 1px solid #e9ecef;
}

.related-posts .card-title a {
    font-size: 0.95rem;
}

/* ========== Tags ========== */

.post-tags .badge {
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.post-tags .badge:hover {
    background-color: var(--mousaw-bg-section) !important;
}

/* ========== Footer ========== */

.site-footer {
    background-color: var(--mousaw-navy);
    color: rgba(255, 255, 255, 0.85);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-brand {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.footer-about {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer-heading {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.footer-divider {
    border-color: rgba(255, 255, 255, 0.12);
    margin: 32px 0 20px;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
}

/* ========== Pagination ========== */

.pagination .page-numbers {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    margin: 0 0.15rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: var(--mousaw-text-heading);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination .page-numbers.current {
    background-color: var(--mousaw-navy);
    color: #fff;
    border-color: var(--mousaw-navy);
}

.pagination .page-numbers:hover:not(.current) {
    background-color: var(--mousaw-bg-section);
    border-color: var(--mousaw-navy);
}

/* ========== Archive Header ========== */

.archive-header {
    background-color: var(--mousaw-bg-section);
    border-radius: 10px;
}

/* ========== Buttons ========== */

.btn-mousaw {
    background-color: var(--mousaw-btn-primary-bg);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-mousaw:hover {
    background-color: var(--mousaw-btn-primary-hover);
    color: #fff;
}

/* ========== Homepage: Hero ========== */

.hero-section {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #003F91 0%, #1a5cad 40%, #2d72c4 70%, #6D326D 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(93, 169, 233, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(109, 50, 109, 0.2) 0%, transparent 50%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #fff 0%, transparent 100%);
}

.hero-section .container {
    z-index: 1;
}

.hero-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-gradient-text {
    background: linear-gradient(90deg, #73BDB0, #5DA9E9, #E5F4E3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 48px;
}

.btn-hero-primary {
    background: #fff;
    color: var(--mousaw-navy);
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    border: 2px solid #fff;
    transition: all 0.2s ease;
}

.btn-hero-primary:hover {
    background: transparent;
    color: #fff;
}

.btn-hero-outline {
    background: transparent;
    color: #fff;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.btn-hero-outline:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
}

/* ========== Homepage: Section Headers ========== */

.section-header {
    margin-bottom: 48px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--mousaw-purple);
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--mousaw-navy);
    margin-top: 0;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--mousaw-text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========== Homepage: Pillar Cards ========== */

.pillars-section {
    padding: 80px 0;
    background: #fff;
}

.pillar-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e9ecef;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 63, 145, 0.12);
    text-decoration: none;
}

.pillar-card-header {
    position: relative;
    aspect-ratio: 16 / 8;
    overflow: hidden;
}

.pillar-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pillar-card:hover .pillar-card-img {
    transform: scale(1.04);
}

.pillar-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
}

.pillar-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--pillar-accent);
    border-radius: 10px;
    color: #fff;
    flex-shrink: 0;
}

.pillar-card-body {
    padding: 20px 24px 24px;
}

.pillar-card-cat {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--pillar-accent);
    margin-bottom: 8px;
}

.pillar-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--mousaw-navy);
    margin: 0 0 8px;
    line-height: 1.35;
}

.pillar-card:hover .pillar-card-title {
    color: var(--pillar-accent);
}

.pillar-card-tagline {
    font-size: 0.9rem;
    color: var(--mousaw-text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.pillar-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--mousaw-text-muted);
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.pillar-card-arrow {
    font-size: 1.2rem;
    color: var(--pillar-accent);
    transition: transform 0.2s ease;
}

.pillar-card:hover .pillar-card-arrow {
    transform: translateX(4px);
}

/* ========== Homepage: Latest Articles ========== */

.latest-section {
    padding: 80px 0;
    background: var(--mousaw-bg-section);
}

/* ========== Homepage: Approach ========== */

.approach-section {
    padding: 80px 0;
    background: #fff;
}

.approach-text {
    font-size: 1.05rem;
    color: var(--mousaw-text-body);
    line-height: 1.8;
}

.approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.approach-card {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.approach-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.approach-card-icon {
    margin-bottom: 12px;
}

.approach-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mousaw-navy);
    margin: 0 0 6px;
}

.approach-card-desc {
    font-size: 0.85rem;
    color: var(--mousaw-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ========== Homepage: CTA ========== */

.cta-section {
    padding: 0 0 80px;
    background: #fff;
}

.cta-box {
    background: linear-gradient(135deg, var(--mousaw-navy) 0%, #1a5cad 100%);
    border-radius: 16px;
    padding: 48px 56px;
    color: #fff;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
}

.cta-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}

.btn-cta {
    display: inline-block;
    background: #fff;
    color: var(--mousaw-navy);
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cta:hover {
    background: var(--mousaw-mint);
    color: var(--mousaw-navy);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ========== Responsive ========== */

@media (max-width: 767.98px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.15rem; }

    .single-post-content {
        font-size: 1rem;
    }

    .featured-image-single img {
        border-radius: 0;
        max-height: 300px;
    }

    .author-box {
        padding: 1rem !important;
    }

    /* Homepage mobile */
    .hero-section {
        padding: 60px 0 50px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-stat-number {
        font-size: 1.3rem;
    }

    .pillars-section,
    .latest-section,
    .approach-section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .approach-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 32px 24px;
        text-align: center;
    }

    .cta-title {
        font-size: 1.4rem;
    }

    .cta-section .text-lg-end {
        text-align: center !important;
    }
}
