
/*
Theme Name: M For Maira
Theme URI: https://mformaira.com
Author: M For Maira
Author URI: https://mformaira.com
Description: A clean, modern and responsive technology-focused editorial WordPress theme for M For Maira.
Version: 1.0
Text Domain: mformaira
*/

/* =========================================
   1. DESIGN TOKENS
========================================= */

:root {
    --color-bg: #f8f9fb;
    --color-surface: #ffffff;
    --color-text: #172033;
    --color-text-soft: #596273;
    --color-heading: #101828;
    --color-primary: #173f68;
    --color-primary-dark: #102f4e;
    --color-accent: #6f8fb3;
    --color-border: #e5e8ee;
    --color-muted: #8a93a3;

    --font-heading: Georgia, "Times New Roman", serif;
    --font-body: "Segoe UI", Arial, Helvetica, sans-serif;

    --container: 1180px;
    --radius-small: 8px;
    --radius-medium: 14px;
    --radius-large: 22px;

    --shadow-soft: 0 8px 30px rgba(16, 24, 40, 0.06);
}


/* =========================================
   2. RESET
========================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================
   3. TYPOGRAPHY
========================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-style: normal;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 5.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p,
li,
.entry-content,
.page-content {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
}

p {
    margin-top: 0;
    margin-bottom: 1.2rem;
}

strong,
b {
    font-weight: 700;
    font-style: normal;
}


/* =========================================
   4. LAYOUT
========================================= */

.container {
    width: min(100% - 40px, var(--container));
    margin-inline: auto;
}

.site-main {
    min-height: 60vh;
}

.section {
    padding: 90px 0;
}

.section-heading {
    margin-bottom: 40px;
}

.section-heading h2 {
    margin-bottom: 12px;
}

.section-heading p {
    max-width: 680px;
    color: var(--color-text-soft);
}


/* =========================================
   5. BUTTONS
========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 700;
    transition: 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    border: 1px solid var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background: var(--color-light-blue, #edf3f9);
}


/* =========================================
   6. HEADER
========================================= */

.site-header {
    position: relative;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
}

.site-title a {
    color: var(--color-primary);
}

.site-description {
    margin: 4px 0 0;
    color: var(--color-muted);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-style: normal;
    line-height: 1.4;
}


/* =========================================
   7. NAVIGATION
========================================= */

.main-navigation {
    display: block;
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    display: block;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    padding: 8px 12px;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: transparent;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-style: normal;
    cursor: pointer;
}


/* =========================================
   8. HERO
========================================= */

.hero {
    padding: 110px 0 100px;
    background:
        radial-gradient(
            circle at top right,
            rgba(111, 143, 179, 0.16),
            transparent 35%
        ),
        linear-gradient(135deg, #ffffff, #f4f7fa);
}

.hero-content {
    max-width: 850px;
}

.hero-eyebrow,
.category-label {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero-description {
    max-width: 700px;
    color: var(--color-text-soft);
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-style: normal;
    line-height: 1.8;
}


/* =========================================
   9. ARTICLE CARDS
========================================= */

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.article-card {
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 38px rgba(16, 24, 40, 0.10);
}

.article-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9edf2;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-content {
    padding: 24px;
}

.article-card-title {
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    line-height: 1.3;
}

.article-card-title a {
    color: var(--color-heading);
}

.article-card-title a:hover {
    color: var(--color-primary);
}

.article-card-excerpt {
    color: var(--color-text-soft);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-style: normal;
    line-height: 1.7;
}


/* =========================================
   10. FEATURED ARTICLE
========================================= */

.featured-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
}

.featured-post {
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
}

.featured-post-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-post-content {
    padding: 34px;
}

.featured-post-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.featured-post-title a {
    color: var(--color-heading);
}


/* =========================================
   11. ARTICLE PAGE
========================================= */

.single-post-header {
    padding: 90px 0 50px;
    background: #ffffff;
}

.single-post-header .entry-title {
    max-width: 900px;
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.entry-meta {
    color: var(--color-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: normal;
}

.entry-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 60px 0 100px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.85;
}

.entry-content p,
.entry-content li {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
}

.entry-content h2 {
    margin-top: 55px;
    font-family: var(--font-heading);
}

.entry-content h3 {
    margin-top: 40px;
    font-family: var(--font-heading);
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content img {
    margin: 24px auto;
    border-radius: var(--radius-medium);
}


/* =========================================
   12. PAGE CONTENT
========================================= */

.page-content {
    max-width: 820px;
    margin: 0 auto;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: normal;
    line-height: 1.85;
}

.page-content p,
.page-content li {
    font-family: var(--font-body);
    font-style: normal;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
    font-family: var(--font-heading);
}

.page-content h2 {
    margin-top: 40px;
}

.page-content h3 {
    margin-top: 30px;
}


/* =========================================
   13. FOOTER
========================================= */

.site-footer {
    margin-top: 80px;
    padding: 70px 0 30px;
    background: #101828;
    color: #d7dde7;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
}

.footer-title {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

.site-footer p,
.site-footer li {
    color: #d7dde7;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-style: normal;
    line-height: 1.7;
}

.site-footer a {
    color: #d7dde7;
    font-family: var(--font-body);
    font-style: normal;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #ffffff;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin-bottom: 10px;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca7b7;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: normal;
}


/* =========================================
   14. FORMS
========================================= */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: normal;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(23, 63, 104, 0.18);
    border-color: var(--color-primary);
}


/* =========================================
   15. SEARCH
========================================= */

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 20px 0;
}

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
}


/* =========================================
   16. PAGINATION
========================================= */

.navigation.pagination,
.pagination,
.posts-navigation {
    margin-top: 40px;
    text-align: center;
    font-family: var(--font-body);
}

.page-numbers {
    display: inline-block;
    margin: 3px;
    padding: 8px 13px;
    color: var(--color-primary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 7px;
    font-family: var(--font-body);
    font-style: normal;
}

.page-numbers.current,
.page-numbers:hover {
    color: #ffffff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}


/* =========================================
   17. COMMENTS
========================================= */

.comments-area {
    max-width: 780px;
    margin: 50px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    font-family: var(--font-body);
    font-style: normal;
}

.comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-body {
    margin-bottom: 20px;
    padding: 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
}


/* =========================================
   18. WORDPRESS DEFAULTS
========================================= */

.alignwide {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
    max-width: 100%;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
    color: var(--color-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: normal;
}

.sticky,
.bypostauthor {
    display: block;
}


/* =========================================
   19. TABLETS
========================================= */

@media (max-width: 1100px) {
    .main-navigation ul {
        gap: 14px;
    }

    .main-navigation a {
        font-size: 0.85rem;
    }

    .featured-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================================
   20. MOBILE NAVIGATION
========================================= */

@media (max-width: 900px) {
    .header-inner {
        position: relative;
        min-height: 72px;
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .site-title {
        font-size: 1.6rem;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .main-navigation {
        display: none;
        flex: 0 0 100%;
        width: 100%;
        margin: 0;
        padding: 12px 0;
        border-top: 1px solid var(--color-border);
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .main-navigation li {
        width: 100%;
    }

    .main-navigation a {
        display: block;
        padding: 11px 4px;
        font-size: 0.95rem;
    }

    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================================
   21. SMALL MOBILE
========================================= */

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .container {
        width: min(100% - 28px, var(--container));
    }

    .section {
        padding: 65px 0;
    }

    .hero {
        padding: 75px 0;
    }

    .hero h1 {
        font-size: clamp(2.4rem, 10vw, 3.5rem);
    }

    .hero-description {
        font-size: 1rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-card-content {
        padding: 20px;
    }

    .featured-post-content {
        padding: 22px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .header-inner {
        min-height: 70px;
    }

    .entry-content {
        padding: 40px 0 65px;
        font-size: 1rem;
    }

    .single-post-header {
        padding: 55px 0 35px;
    }

    .search-form {
        flex-direction: column;
    }
}