/*
Theme Name: CATS Transport
Theme URI: https://chrisabbotttransport.com
Author: Good Creations
Description: Custom theme for Chris Abbott Transportation Service - NEMT in Central Oregon
Version: 1.0.3
Text Domain: cats-transport
*/

:root {
    --color-black: #1a1a1a;
    --color-orange: #d4411e;
    --color-orange-dark: #b8381a;
    --color-gray-dark: #2d2d2d;
    --color-gray: #4a4a4a;
    --color-gray-light: #f5f5f5;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.7;
    background: var(--color-white);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-black);
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ====================================
   HEADER & NAVIGATION
   ==================================== */
.site-header {
    background: var(--color-black);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img,
.custom-logo {
    height: 60px;
    width: auto;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu>li>a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    transition: color 0.2s, background 0.2s;
}

.nav-menu>li>a:hover,
.nav-menu>li.current-menu-item>a,
.nav-menu>li.current-menu-ancestor>a {
    color: var(--color-orange);
}

/* Dropdown Arrow */
.dropdown-arrow {
    transition: transform 0.2s;
}

.nav-menu>li:hover .dropdown-arrow,
.nav-menu>li.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Submenu */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 100;
}

/* Show dropdown on hover */
.nav-menu>li:hover>.sub-menu,
.nav-menu>li.dropdown-open>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    margin: 0;
}

.sub-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.sub-menu a:hover {
    background: var(--color-gray-light);
    color: var(--color-orange);
}

.sub-menu .current-menu-item a {
    color: var(--color-orange);
    background: var(--color-gray-light);
}

/* Header CTA Button */
.header-cta {
    background: var(--color-orange);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background 0.2s;
    margin-left: 1rem;
    white-space: nowrap;
}

.header-cta:hover {
    background: var(--color-orange-dark);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ====================================
   MOBILE NAVIGATION
   ==================================== */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--color-black);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 0 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .main-nav.is-open {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu>li>a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Mobile dropdown */
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .nav-menu>li.dropdown-open>.sub-menu {
        max-height: 500px;
    }

    .sub-menu a {
        color: rgba(255, 255, 255, 0.85);
        padding: 0.75rem 2rem;
    }

    .sub-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--color-orange);
    }

    .header-cta {
        margin: 1.5rem;
        text-align: center;
    }
}

/* ====================================
   HERO SECTION
   ==================================== */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)),
        url('') center/cover;
    color: white;
}

.hero-content {
    max-width: 650px;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: clamp(1.6rem, 5vw, 3.1rem);
}

.hero-lead {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* ====================================
   BUTTONS
   ==================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-orange);
    color: white;
    border: 1px solid black;
}

.btn-primary:hover {
    background: var(--color-orange-dark);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--color-black);
}

/* ====================================
   SECTIONS
   ==================================== */
.section {
    padding: 5rem 0;
}

.section-dark {
    background: var(--color-black);
    color: white;
}

.section-gray {
    background: var(--color-gray-light);
}

/* ====================================
   SERVICES GRID
   ==================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-card h3 {
    color: var(--color-black);
}

/* ====================================
   STATS
   ==================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-orange);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

/* ====================================
   FOOTER
   ==================================== */
.site-footer {
    background: var(--color-black);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--color-orange);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--color-orange);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ====================================
   PAGE TEMPLATES
   ==================================== */
.page-header {
    background: var(--color-black);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-content {
    padding: 4rem 0;
}

.page-content h2 {
    margin-top: 2rem;
}

/* Featured image floats right, text wraps around it */
.post-featured-image {
    float: right;
    width: 50%;
    margin: 0 0 1.5rem 2rem;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Clearfix so content area fully contains the float */
.post-content::after {
    content: '';
    display: table;
    clear: both;
}

/* Stack image full-width on mobile */
@media (max-width: 640px) {
    .post-featured-image {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem 0;
    }
}

/* Hide the duplicate h1 that articles include in their own content body */
.post-title ~ h1 {
    display: none;
}

.post-title {
    margin-bottom: 1.5rem;
}

/* Hide page title banner on fare quote page — heading is inside the calculator */
.page-id-490 .page-header {
    display: none;
}

/* Post content heading sizes — scoped so they don't affect the rest of the site */
.post-content h1 {
    font-size: 1.6rem;
}

.post-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
}

.post-content h4 {
    font-size: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
}

/* ====================================
   GUTENBERG ALIGNMENT SUPPORT
   ==================================== */
.page-body>.alignfull,
.page-content .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.page-body>.alignwide,
.page-content .alignwide {
    width: 100vw;
    max-width: 1400px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

@media (min-width: 1400px) {

    .page-body>.alignwide,
    .page-content .alignwide {
        margin-left: calc(50% - 700px);
        margin-right: calc(50% - 700px);
    }
}

/* Remove top padding when first block is full-width */
.page-body>.alignfull:first-child,
.page-body>.wp-block-cover:first-child {
    margin-top: -4rem;
}

/* Also handle if there's no .page-body wrapper */
.page-content>.alignfull:first-child,
.page-content>.wp-block-cover:first-child {
    margin-top: -4rem;
}

/* Remove bottom padding when last block is full-width */
.page-body>.alignfull:last-child,
.page-body>.wp-block-cover:last-child {
    margin-bottom: -4rem;
}

.page-content>.alignfull:last-child,
.page-content>.wp-block-cover:last-child {
    margin-bottom: -4rem;
}

/* ====================================
   ARCHIVE / BLOG
   ==================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
}

.post-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card h3 {
    margin-bottom: 0.5rem;
}

.post-card h3 a {
    color: var(--color-black);
    text-decoration: none;
}

.post-card h3 a:hover {
    color: var(--color-orange);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

/* ====================================
   HERO PHONE
   ==================================== */
.hero-phone {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-orange);
    margin-bottom: 1.5rem;
}

.hero-phone a {
    color: inherit;
    text-decoration: none;
}

.hero-phone a:hover {
    text-decoration: underline;
}

/* ====================================
   SERVICE ICONS
   ==================================== */
.service-icon {
    width: 60px;
    height: 60px;
    background: var(--color-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.service-card a {
    color: var(--color-orange);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-card a:hover {
    text-decoration: underline;
}

/* ====================================
   TWO COLUMN LAYOUT
   ==================================== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.two-col-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.two-col-image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ====================================
   FEATURE LIST
   ==================================== */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    padding: 1rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-orange);
    font-weight: bold;
}

/* ====================================
   CTA SECTION
   ==================================== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-gray-dark) 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.cta-phone {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-orange);
    margin-bottom: 1.5rem;
}

.cta-phone a {
    color: inherit;
    text-decoration: none;
}

.cta-phone a:hover {
    text-decoration: underline;
}

/* ====================================
   PAGE HERO (for service pages)
   ==================================== */
.page-hero {
    background: var(--color-black);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-hero h1 {
    color: white;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* ====================================
   CARDS (for use cases, etc)
   ==================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card h3 {
    color: var(--color-orange);
    margin-bottom: 0.75rem;
}

/* ====================================
   RESPONSIVE ADJUSTMENTS
   ==================================== */
@media (max-width: 640px) {
    .hero {
        min-height: 80vh;
    }

    .hero-content {
        padding: 1.25rem 1.25rem !important;
    }

    .hero .btn {
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
        min-height: unset;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .hero-lead {
        font-size: 0.9rem;
    }

    .cta-phone {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* ====================================
   TWO COLUMN FIX - OVERRIDE
   ==================================== */
.two-col {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4rem !important;
    align-items: center !important;
}

@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

.two-col>div,
.two-col>.two-col-image {
    width: 100% !important;
}

/* ====================================
   WORDPRESS GUTENBERG BLOCK STYLES
   ==================================== */

/* Columns Block */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.wp-block-column {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column;
    }

    .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* Cover Block */
.wp-block-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.wp-block-cover__background {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: #000;
}

.wp-block-cover__image-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Group Block */
.wp-block-group.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.wp-block-group {
    box-sizing: border-box;
}

/* Image Block */
.wp-block-image {
    margin-bottom: 1rem;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wp-block-image.size-large img {
    width: 100%;
}

/* Buttons Block */
.wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wp-block-buttons.is-content-justification-center {
    justify-content: center;
}

.wp-block-button__link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-orange);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.wp-block-button__link:hover {
    background: var(--color-orange-dark);
}

/* Media & Text Block */
.wp-block-media-text {
    display: grid;
    grid-template-columns: 50% 1fr;
    gap: 2rem;
    align-items: center;
}

.wp-block-media-text.is-stacked-on-mobile {
    grid-template-columns: 50% 1fr;
}

@media (max-width: 768px) {
    .wp-block-media-text.is-stacked-on-mobile {
        grid-template-columns: 1fr;
    }
}

.wp-block-media-text__media img {
    width: 100%;
    height: auto;
}

.wp-block-media-text__content {
    padding: 0 1rem;
}

/* Spacer Block */
.wp-block-spacer {
    display: block;
}