/**
 * Responsive Breakpoints & Mobile Navigation
 * Extends components.css with mobile-first refinements
 */

/* =============================================================
   MOBILE NAVIGATION DRAWER
   ============================================================= */
@media (max-width: 991px) {

    .pm-nav-menu-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 90vw);
        height: 100vh;
        background: var(--pm-navy-dark);
        padding: 80px 28px 32px;
        flex-direction: column;
        align-items: flex-start;
        overflow-y: auto;
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
    }

    .pm-nav-menu-wrapper.active {
        right: 0;
    }

    .pm-main-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .pm-main-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .pm-main-menu a {
        color: #E2E8F0;
        font-size: 1.1rem;
        padding: 16px 0;
        display: block;
    }

    .pm-main-menu a:hover {
        color: var(--pm-amber);
    }

    .pm-main-menu a::after {
        display: none;
    }

    .pm-mobile-toggle {
        display: flex;
        z-index: 1001;
        position: relative;
    }

    .pm-header-actions .pm-btn-text {
        display: none;
    }

    .pm-header-actions .pm-btn {
        padding: 9px 14px;
    }

    /* Mobile nav overlay backdrop */
    body.pm-mobile-nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(4px);
    }
}

/* =============================================================
   CAMPAIGNS SECTION — NO POSTS FALLBACK CARDS
   ============================================================= */
.pm-campaign-card.pm-placeholder-card {
    background: linear-gradient(135deg, var(--pm-bg-alt) 0%, var(--pm-bg-light) 100%);
    border: 1.5px dashed var(--pm-border-hover);
}

/* =============================================================
   HERO SECTION — VISUAL CARD INNER FLEX LAYOUT
   ============================================================= */
.pm-hero-card-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-hero-tagline-box {
    display: flex;
    flex-direction: column;
}

/* =============================================================
   PROGRESS BAR ANIMATION ON SCROLL
   ============================================================= */
.pm-progress-fill {
    width: 0%;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pm-progress-fill.animated {
    width: var(--pm-progress-target);
}

/* =============================================================
   PAGE TEMPLATE HERO BANNER
   ============================================================= */
.pm-page-hero {
    background: linear-gradient(135deg, var(--pm-navy-dark) 0%, var(--pm-navy) 100%);
    padding: 80px 0 70px;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.pm-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.pm-page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.pm-page-hero h1 {
    color: #FFFFFF;
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 16px;
}

.pm-page-hero p {
    color: #CBD5E1;
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto;
}

/* =============================================================
   CONTACT & FORM PAGE STYLES
   ============================================================= */
.pm-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 50px;
    align-items: start;
}

@media (max-width: 860px) {
    .pm-contact-grid {
        grid-template-columns: 1fr;
    }
}

.pm-contact-info-card {
    background: var(--pm-navy);
    color: #fff;
    border-radius: var(--pm-radius-lg);
    padding: 40px;
}

.pm-contact-info-card h3 {
    color: #fff;
    margin-bottom: 28px;
}

.pm-contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pm-contact-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pm-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--pm-radius-sm);
    background: rgba(232, 138, 26, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pm-amber);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pm-contact-info-item strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.pm-contact-info-item span {
    color: #94A3B8;
    font-size: 0.95rem;
}

/* =============================================================
   ABOUT PAGE — TIMELINE & MILESTONES
   ============================================================= */
.pm-timeline {
    position: relative;
    padding-left: 36px;
}

.pm-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--pm-amber) 0%, var(--pm-emerald) 100%);
}

.pm-timeline-item {
    position: relative;
    margin-bottom: 36px;
}

.pm-timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--pm-amber);
    border: 2px solid #fff;
    box-shadow: 0 0 0 4px rgba(232, 138, 26, 0.25);
}

.pm-timeline-year {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pm-amber);
    margin-bottom: 4px;
}

.pm-timeline-item h4 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.pm-timeline-item p {
    color: var(--pm-text-muted);
    font-size: 0.95rem;
}

/* =============================================================
   DONATE PAGE — GIVING WIDGET FULL PAGE
   ============================================================= */
.pm-donate-page-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: start;
}

@media (max-width: 860px) {
    .pm-donate-page-grid {
        grid-template-columns: 1fr;
    }
}

.pm-donate-sidebar-card {
    background: var(--pm-bg-alt);
    border-radius: var(--pm-radius-lg);
    padding: 32px;
    border: 1px solid var(--pm-border);
    position: sticky;
    top: 100px;
}

/* =============================================================
   TRANSPARENCY PAGE — GOVERNANCE GRID
   ============================================================= */
.pm-governance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 860px) {
    .pm-governance-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .pm-governance-grid {
        grid-template-columns: 1fr;
    }
}

.pm-governance-card {
    background: #FFFFFF;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    padding: 28px;
    text-align: center;
    transition: var(--pm-transition);
}

.pm-governance-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pm-shadow-md);
    border-color: rgba(232, 138, 26, 0.4);
}

.pm-governance-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--pm-radius-md);
    background: rgba(232, 138, 26, 0.1);
    color: var(--pm-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 18px;
}

/* =============================================================
   VOLUNTEER PAGE — INTEREST CARDS GRID
   ============================================================= */
.pm-volunteer-area-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 640px) {
    .pm-volunteer-area-cards {
        grid-template-columns: 1fr;
    }
}

.pm-volunteer-area-card {
    background: var(--pm-bg-light);
    border: 1.5px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    padding: 24px;
    cursor: pointer;
    transition: var(--pm-transition);
}

.pm-volunteer-area-card:hover,
.pm-volunteer-area-card.active {
    border-color: var(--pm-amber);
    background: #FFFBEB;
    transform: translateY(-3px);
    box-shadow: var(--pm-shadow-sm);
}

/* =============================================================
   ADDITIONAL MICRO-ANIMATIONS
   ============================================================= */
@keyframes pmSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.pm-animate-up {
    animation: pmSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pm-animate-fade {
    animation: pmFadeIn 0.5s ease both;
}

/* Staggered animation delays for cards */
.pm-grid > *:nth-child(1) { animation-delay: 0.05s; }
.pm-grid > *:nth-child(2) { animation-delay: 0.12s; }
.pm-grid > *:nth-child(3) { animation-delay: 0.20s; }

/* =============================================================
   CAMPAIGNS PAGE — FILTER TABS
   ============================================================= */
.pm-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.pm-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1.5px solid var(--pm-border);
    background: #FFFFFF;
    border-radius: var(--pm-radius-full);
    font-family: var(--pm-font-heading);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--pm-navy);
    cursor: pointer;
    transition: var(--pm-transition);
}

.pm-filter-tab:hover,
.pm-filter-tab.active {
    background: var(--pm-navy);
    color: #FFFFFF;
    border-color: var(--pm-navy);
}

/* =============================================================
   UTILITY: SCROLLBAR STYLING
   ============================================================= */
.pm-modal-box::-webkit-scrollbar {
    width: 5px;
}

.pm-modal-box::-webkit-scrollbar-track {
    background: var(--pm-bg-alt);
}

.pm-modal-box::-webkit-scrollbar-thumb {
    background: var(--pm-amber);
    border-radius: 10px;
}

/* =============================================================
   FORM ALERTS
   ============================================================= */
.pm-alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.pm-alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* =============================================================
   404 PAGE
   ============================================================= */
.pm-404-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 0;
}

.pm-404-number {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 900;
    color: var(--pm-amber);
    line-height: 1;
    font-family: var(--pm-font-heading);
    margin-bottom: 20px;
    text-shadow: 0 4px 30px rgba(232, 138, 26, 0.3);
}

/* =============================================================
   HERO SWIPER & TOP UTILITY BAR RESPONSIVE
   ============================================================= */
@media (max-width: 991px) {
    .pm-alert-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .pm-alert-left {
        width: 100%;
        justify-content: space-between;
    }
    .pm-alert-right {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    .pm-hero-slide-container {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: center;
    }
    .pm-hero-slide-content {
        max-width: 100%;
    }
    .pm-hero-actions {
        justify-content: center;
    }
    .pm-hero-floating-card {
        max-width: 520px;
        margin: 0 auto;
        text-align: left;
    }
    .pm-hero-slide {
        min-height: auto;
        padding: 70px 0 90px;
    }
}

@media (max-width: 640px) {
    .pm-hero-title {
        font-size: 2rem;
    }
    .pm-hero-floating-card {
        padding: 22px;
    }
    .pm-stat-giant {
        font-size: 2.2rem;
    }
    .pm-hero-controls-wrap {
        display: none;
    }
    .pm-topbar-sep,
    .pm-topbar-greeting {
        display: none;
    }
}

/* =============================================================
   NEW HOMEPAGE SECTIONS RESPONSIVE RULES
   ============================================================= */
@media (max-width: 991px) {
    .pm-mission-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }
    .pm-mission-img-stack {
        max-width: 600px;
        margin: 0 auto;
    }
    .pm-why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .pm-wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .pm-donors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pm-ba-slider-container {
        height: 420px;
    }
    .pm-ba-layer img {
        height: 420px;
    }
    .pm-ba-story-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .pm-ba-story-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .pm-why-grid {
        grid-template-columns: 1fr;
    }
    .pm-wishlist-grid {
        grid-template-columns: 1fr;
    }
    .pm-donors-grid {
        grid-template-columns: 1fr;
    }
    .pm-ba-slider-container {
        height: 320px;
    }
    .pm-ba-layer img {
        height: 320px;
    }
    .pm-mission-sticky {
        position: static;
        max-width: 100%;
        margin-top: 20px;
    }
    .pm-mission-badge-floating {
        position: static;
        margin-top: 16px;
    }
}


