/*
Theme Name: PW Design
Theme URI: https://paulwalsh.com
Author: Paul Walsh
Author URI: https://paulwalsh.com
Description: A modern, conversion-focused WordPress theme with gradient card styling, sticky header, and responsive layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pw-design
Tags: blog, portfolio, custom-menu, featured-images, full-width-template, sticky-post, theme-options, two-columns, responsive-layout
*/

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f6f6f8;
    color: #222;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit
}

img {
    max-width: 100%;
    height: auto
}

/* ===== LAYOUT ===== */
.container {
    width: min(1200px, 92%);
    margin: auto
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    background: linear-gradient(90deg, #ff2f92, #8b2cff);
    color: #fff;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(255, 47, 146, .25);
    transition: .2s
}

/* Contact nav button (last menu item) — on-brand blue, split out of the .btn group */
#menu-main-menu > li:last-child > a {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    transition: .2s
}

.btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    color: #fff
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0
}

.logo {
    font-size: 28px;
    font-weight: 800;
    height: 72px;
}

.logo span {
    color: #ff2f92
}

.menu {
    display: flex;
    gap: 28px;
    align-items: center;
    color: #555;
    font-weight: 500
}

.menu a:hover {
    color: #ff2f92
}

.logo img {
    width: auto;
    height: 100%;
}

/* WordPress nav menu */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    align-items: center
}

.main-navigation ul li {
    position: relative
}

.main-navigation ul li a {
    color: #555;
    font-weight: 500;
    transition: .2s
}

.main-navigation ul li a:hover {
    color: #ff2f92
}

.main-navigation ul li.current-menu-item>a {
    color: #ff2f92
}

/* Sub-menus */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    display: none;
    flex-direction: column;
    gap: 0
}

.main-navigation ul li:hover>ul {
    display: flex
}

.main-navigation ul ul li a {
    display: block;
    padding: 10px 18px;
    white-space: nowrap
}

/* ===== HERO ===== */
.hero {
    padding: 70px 0 50px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 40px;
    align-items: center
}

.hero h1 {
    font-size: 64px;
    line-height: 1.05;
    margin: 0 0 16px
}

.hero h1 span {
    color: #ff2f92
}

.hero p {
    font-size: 20px;
    color: #666;
    max-width: 580px;
    margin-bottom: 28px
}

.hero-card {
    background: #fff;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .12)
}

.hero-card img {
    width: 100%;
    display: block;
    height: 100%;
    object-fit: cover
}

/* ===== SECTION TITLES ===== */
.section-title {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    padding: 24px 0 16px;
}

.section-sub {
    text-align: center;
    color: #666;
    max-width: 800px;
    margin: 0 auto 40px
}

/* ===== SERVICES GRID ===== */
.services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px
}

.card {
    padding: 32px 26px;
    border-radius: 28px;
    color: #fff;
    box-shadow: 0 18px 40px rgba(139, 44, 255, .18)
}

.card:nth-child(odd) {
    background: linear-gradient(180deg, #6a11cb, #8b2cff)
}

.card:nth-child(even) {
    background: linear-gradient(180deg, #ff2f92, #ff4db2)
}

.card h3 {
    margin: 0 0 10px;
    font-size: 22px
}

.card p {
    opacity: .95;
    font-size: 15px;
    margin: 0
}

/* ===== ABOUT ===== */
.about {
    padding: 90px 0;
    text-align: center
}

.about p {
    max-width: 900px;
    margin: 0 auto;
    color: #555;
    font-size: 19px
}

/* ===== CASE STUDIES ===== */
.cases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 80px
}

.case {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .08);
    transition: .3s
}

.case:hover {
    transform: translateY(-6px)
}

.case img {
    width: 100%;
    height: 260px;
    object-fit: cover
}

.case .content {
    padding: 20px
}

.case .content h3 {
    margin: 0 0 8px;
    font-size: 20px
}

.case .content p {
    margin: 0;
    color: #666;
    font-size: 15px
}

/* ===== BLOG / POSTS ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 80px
}

.post-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .08);
    transition: .3s
}

.post-card:hover {
    transform: translateY(-6px)
}

.post-card .post-thumbnail img {
    width: 100%;
    object-fit: cover
}

.post-card .post-body {
    padding: 20px
}

.post-card .post-body h2 {
    font-size: 20px;
    margin: 0 0 8px;
    line-height: 1.3
}

.post-card .post-body h2 a:hover {
    color: #ff2f92
}

.post-card .post-body .post-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px
}

.post-card .post-body p {
    font-size: 15px;
    color: #666;
    margin: 0 0 14px
}

/* ===== SINGLE POST ===== */
.single-post-wrap {
    margin: 0;
    padding: 0
}

.single-post-wrap h1 {
    font-size: 48px;
    line-height: 1.1;
    margin: 0 0 16px
}

.single-post-wrap .post-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 24px
}

.single-post-wrap .featured-image {
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .1)
}

.single-post-wrap .featured-image img {
    width: 100%;
    display: block;
    max-height: 480px;
    object-fit: cover
}

.single-post-wrap .post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333
}

.single-post-wrap .post-content h2,
.single-post-wrap .post-content h3 {
    margin-top: 2em
}

.single-post-wrap .post-content p {
    margin: 0 0 1.4em
}

.single-post-wrap .post-content a {
    color: #ff2f92;
    text-decoration: underline
}

/* ===== PAGE CONTENT ===== */
.page-wrap {
    margin: 0;
    padding: 0
}

.page-wrap h1 {
    font-size: 48px;
    line-height: 1.1;
    margin: 0 0 24px
}

.page-wrap .page-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333
}

.page-wrap .page-content h2,
.page-wrap .page-content h3 {
    margin-top: 2em
}

.page-wrap .page-content p {
    margin: 0 0 1.4em
}

.page-wrap .page-content a {
    color: #ff2f92
}

/* ===== PAGINATION ===== */
.pagination {
    text-align: center;
    padding: 20px 0 60px
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    margin: 0 3px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .06);
    font-weight: 600
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: linear-gradient(90deg, #ff2f92, #8b2cff);
    color: #fff
}

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 100px 20px
}

.error-404 h1 {
    font-size: 120px;
    font-weight: 800;
    color: #ff2f92;
    margin: 0;
    line-height: 1
}

.error-404 h2 {
    font-size: 36px;
    margin: 12px 0 16px
}

.error-404 p {
    color: #666;
    font-size: 18px;
    margin-bottom: 32px
}

/* ===== FOOTER ===== */
footer {
    background: #111;
    color: #fff;
    padding: 60px 0;
    text-align: center
}

footer p {
    margin: 0;
    opacity: .75;
    font-size: 15px
}

footer a {
    color: #ff2f92
}

.footer-about-heading {
    color: #ff2f92;
    margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width:992px) {

    .hero,
    .services,
    .cases,
    .posts-grid {
        grid-template-columns: 1fr 1fr
    }

    .hero h1 {
        font-size: 48px
    }
}

@media (max-width:768px) {
    .hero,
    .services,
    .cases,
    .posts-grid {
        grid-template-columns: 1fr
    }

    .hero {
        padding: 40px 0 30px
    }

    .hero h1 {
        font-size: 38px
    }

    .section-title {
        font-size: 32px
    }

    .single-post-wrap h1,
    .page-wrap h1 {
        font-size: 34px
    }
}

/* ===== PREMIUM MOBILE MENU ===== */
.mobile-menu-toggle {
    display: none;
    background: linear-gradient(90deg, #ff2f92, #8b2cff);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 47, 146, .25);
    transition: .3s;
    z-index: 9999;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

/* MOBILE */
@media (max-width:768px) {
    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 10000;
        position: relative;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: 0; /* keep right 0 */
        width: 320px;
        max-width: 100%;
        height: 100vh;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: -10px 0 40px rgba(0,0,0,.12);
        z-index: 9998;
        padding: 100px 25px 30px;
        display: block;

        /* ✅ hide without creating page width */
        transform: translateX(100%);
        transition: transform .35s ease;
        overflow-y: auto;
    }

    .main-navigation.active {
        transform: translateX(0);
    }

    .main-navigation ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    .main-navigation ul li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,.06);
        list-style: none;
    }

    .main-navigation ul li a {
        display: block;
        width: 100%;
        padding: 18px 0;
        font-size: 18px;
        color: #333;
        text-decoration: none;
    }

    .main-navigation ul li:last-child a {
        margin-top: 20px;
        text-align: center;
        border-radius: 999px;
        color: #fff;
        padding: 14px 24px;
    }
}

.about-section .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #222;
    text-align: center;
    margin-bottom: 24px;
}

.about-section .section-title::before,
.about-section .section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    max-width: 180px;
    background: linear-gradient(90deg, #ff2f92, #8b2cff);
    opacity: .35;
}
/* Small top label */
.cases-section .services-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cases-section .services-label::before,
.cases-section .services-label::after {
    content: "";
    flex: 1;
    height: 1px;
    max-width: 140px;
    background: linear-gradient(90deg, #ff2f92, #8b2cff);
    opacity: .35;
}

/* Main heading */
.cases-section .section-title {
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 18px;
    color: #222;
}

/* Small intro text */
.cases-section .about-intro {
    font-size: 17px;
    line-height: 1.7;
    color: #666;
    text-align: center;
    max-width: 760px;
    margin: 0 auto 50px;
}
.case-page-content{
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
}

.case-page-content h2{
    font-size: 42px;
    margin-bottom: 20px;
}

.case-page-content p{
    font-size: 18px;
    line-height: 1.8;
    color: #666;
}
.blog-page-content{
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: center;
}

.blog-page-content h2{
    font-size: 42px;
    margin-bottom: 20px;
}

.blog-page-content p{
    font-size: 18px;
    line-height: 1.8;
}