/* ==========================================================
   Peter Out and About Stories
   Matches home.php, single.php and [poa_latest_stories]
========================================================== */

:root{
    --poa-red:#c8102e;
    --poa-navy:#102744;
    --poa-light:#f7f8fb;
    --poa-border:#e5e7ef;
    --poa-text:#26354b;
    --poa-muted:#6b7280;
    --poa-radius:14px;
}

/* ---------------------------------------------------------
   Single story hero
--------------------------------------------------------- */

.poa-stories-hero{
    background:linear-gradient(135deg,#102744,#c8102e);
    border-radius:0 0 16px 16px;
    color:#fff;
    padding:40px 0;
    margin-bottom:30px;
}

.poa-stories-hero-grid{
    max-width:1180px;
    margin:0 auto;
    padding:0 40px;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(260px,420px);
    gap:40px;
    align-items:center;
}

.poa-stories-hero-left{
    min-width:0;
}

.poa-stories-hero-right{
    min-width:0;
}

.poa-stories-featured-image{
    overflow:hidden;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(0,0,0,.18);
    background:#fff;
}

.poa-stories-featured-image img{
    display:block;
    width:100%;
    height:auto;
    max-height:320px;
    object-fit:cover;
}

.poa-stories-category-list{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:14px;
}

.poa-stories-category-list a{
    display:inline-block;
    background:rgba(255,255,255,.15);
    color:#fff;
    padding:5px 12px;
    border-radius:30px;
    text-decoration:none;
    font-size:13px;
}

.poa-stories-category-list a:hover{
    background:#fff;
    color:var(--poa-navy);
}

.poa-stories-title{
    color:#fff;
    font-size:clamp(2.3rem,3.4vw,3.4rem);
    line-height:1.08;
    margin:0 0 18px;
}

.poa-stories-meta{
    color:rgba(255,255,255,.9);
    font-size:15px;
}

/* ---------------------------------------------------------
   Single story layout
--------------------------------------------------------- */

.poa-stories-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 300px;
    gap:30px;
    margin:25px auto 45px;
    max-width:1200px;
    padding:0 20px;
}

.poa-stories-main,
.poa-stories-sidebar{
    min-width:0;
}

.poa-stories-section{
    background:#fff;
    border:1px solid var(--poa-border);
    border-radius:var(--poa-radius);
    padding:30px;
    margin-bottom:25px;
    box-shadow:0 8px 22px rgba(16,39,68,.05);
}

.poa-stories-content{
    color:var(--poa-text);
    line-height:1.8;
    font-size:1.05rem;
}

.poa-stories-content p:last-child{
    margin-bottom:0;
}

.poa-stories-content img{
    max-width:100%;
    height:auto;
}

/* ---------------------------------------------------------
   Single story sidebar
--------------------------------------------------------- */

.poa-stories-sidebar .poa-stories-card{
    background:#fff;
    border:1px solid var(--poa-border);
    border-radius:var(--poa-radius);
    padding:24px;
    margin-bottom:22px;
    box-shadow:0 8px 22px rgba(16,39,68,.05);
}

.poa-stories-sidebar .poa-stories-card h2{
    color:var(--poa-navy);
    margin:0 0 18px;
    font-size:1.45rem;
    line-height:1.2;
}

.poa-stories-share-links{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.poa-stories-share-links a{
    display:inline-block;
    padding:8px 14px;
    border:1px solid var(--poa-border);
    border-radius:30px;
    text-decoration:none;
    color:var(--poa-navy);
    background:#fff;
}

.poa-stories-share-links a:hover{
    background:var(--poa-navy);
    border-color:var(--poa-navy);
    color:#fff;
}

/* ---------------------------------------------------------
   Story cards
   Used by archive, related stories and homepage shortcode
--------------------------------------------------------- */

.poa-story-grid,
.poa-stories-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:28px;
    width:100%;
}

.poa-story-card,
.poa-stories-card {
    background:#fff;
    border:1px solid var(--poa-border);
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 8px 22px rgba(16,39,68,.06);
    transition:transform .25s ease, box-shadow .25s ease;
    display:flex;
    flex-direction:column;
    min-width:0;
    height:100%;
}

.poa-story-card:hover,
.poa-stories-card:hover {
    transform:translateY(-5px);
    box-shadow:0 16px 36px rgba(16,39,68,.12);
}

.poa-story-card-image,
.poa-stories-card-image {
    display:block;
    height:190px;
    overflow:hidden;
    background:#eef2f7;
}

.poa-story-card-image img,
.poa-stories-card-image img {
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}

.poa-story-card-content,
.poa-stories-card-content {
    padding:22px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.poa-story-card-categories,
.poa-stories-card-categories,
.poa-story-card-cats,
.poa-stories-card-cats {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:14px;
}

.poa-story-card-categories span,
.poa-stories-card-categories span,
.poa-story-card-cats span,
.poa-stories-card-cats span {
    display:inline-block;
    padding:5px 10px;
    border-radius:20px;
    font-size:12px;
    line-height:1;
    font-weight:700;
    background:#eef2f7;
    color:var(--poa-navy);
}

.poa-story-card-title,
.poa-stories-card-title {
    margin:0 0 10px;
    font-size:1.35rem;
    line-height:1.3;
}

.poa-story-card-title a,
.poa-stories-card-title a {
    color:var(--poa-navy);
    text-decoration:none;
}

.poa-story-card-title a:hover,
.poa-stories-card-title a:hover {
    color:var(--poa-red);
}

.poa-story-card-meta,
.poa-stories-card-meta {
    color:var(--poa-muted);
    font-size:.9rem;
    margin-bottom:12px;
}

.poa-story-card-excerpt,
.poa-stories-card-excerpt {
    color:var(--poa-text);
    font-size:.95rem;
    line-height:1.6;
    margin-bottom:18px;
}

.poa-story-card-excerpt p,
.poa-stories-card-excerpt p {
    margin:0;
}

.poa-story-card-read-more,
.poa-stories-card-read-more {
    margin-top:auto;
}

.poa-story-card-read-more a,
.poa-stories-card-read-more a,
.poa-stories-read-more {
    display:inline-block;
    background:var(--poa-red);
    color:#fff;
    padding:10px 18px;
    border-radius:30px;
    text-decoration:none;
    font-weight:700;
}

.poa-story-card-read-more a:hover,
.poa-stories-card-read-more a:hover,
.poa-stories-read-more:hover {
    background:var(--poa-navy);
    color:#fff;
}

/* ---------------------------------------------------------
   Related stories
--------------------------------------------------------- */

.poa-related-stories{
    max-width:1200px;
    margin:0 auto 50px;
    padding:0 20px;
}

.poa-related-stories > h2{
    color:var(--poa-navy);
    font-size:2rem;
    margin:0 0 24px;
    border-left:4px solid var(--poa-red);
    padding-left:12px;
}

/* ---------------------------------------------------------
   Stories archive
--------------------------------------------------------- */

.poa-stories-archive-container{
    max-width:1200px;
    margin:0 auto;
    padding:0 20px;
}

.poa-stories-archive-header{
    margin:35px 0 30px;
}

.poa-stories-archive-header h1{
    font-size:clamp(2.3rem,4vw,3.6rem);
    margin-bottom:0;
}

.poa-stories-archive-description{
    margin-top:12px;
    color:var(--poa-muted);
    font-size:1.05rem;
    max-width:760px;
}

.poa-stories-archive-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,320px));
    gap:30px;
    margin:0 0 45px;
    justify-content:start;
}

.poa-stories-archive-card{
    background:#fff;
    border:1px solid var(--poa-border);
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 8px 22px rgba(16,39,68,.06);
    transition:transform .25s ease, box-shadow .25s ease;
    display:flex;
    flex-direction:column;
    min-height:100%;
}

.poa-stories-archive-card:hover{
    transform:translateY(-6px);
    box-shadow:0 16px 36px rgba(16,39,68,.12);
}

.poa-stories-archive-logo{
    display:block;
    height:180px;
    overflow:hidden;
    background:#eef2f7;
    border-bottom:1px solid var(--poa-border);
}

.poa-stories-archive-logo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}

.poa-stories-archive-content{
    padding:20px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.poa-stories-archive-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:14px;
}

.poa-stories-archive-category{
    display:inline-block;
    padding:5px 10px;
    border-radius:20px;
    font-size:12px;
    line-height:1;
    font-weight:600;
    background:#eef2f7;
    color:var(--poa-navy);
}

.poa-stories-archive-content h2{
    margin:0 0 10px;
    font-size:1.35rem;
    line-height:1.3;
    font-weight:700;
}

.poa-stories-archive-content h2 a{
    color:var(--poa-navy);
    text-decoration:none;
}

.poa-stories-archive-content h2 a:hover{
    color:var(--poa-red);
}

.poa-stories-archive-content p{
    color:var(--poa-text);
    font-size:.95rem;
    line-height:1.6;
    margin:0 0 18px;
}

.poa-stories-archive-button{
    display:inline-block;
    background:var(--poa-red);
    color:#fff;
    padding:10px 18px;
    border-radius:30px;
    text-decoration:none;
    font-weight:700;
    margin-top:auto;
    align-self:flex-start;
}

.poa-stories-archive-button:hover{
    background:var(--poa-navy);
    color:#fff;
}

.poa-stories-archive-pagination{
    margin:30px 0 50px;
}

.poa-stories-no-results{
    background:#fff;
    border:1px solid var(--poa-border);
    border-radius:16px;
    padding:28px;
    margin:30px 0 50px;
}

/* ---------------------------------------------------------
   Homepage stories
--------------------------------------------------------- */

.poa-home-stories-grid{
    margin-top:28px;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */

@media (max-width:1024px){
    .poa-stories-layout{
        grid-template-columns:1fr;
    }

    .poa-stories-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:768px){
    .poa-stories-hero{
        padding:30px 0;
    }

    .poa-stories-hero-grid{
        grid-template-columns:1fr;
        gap:22px;
        padding:0 20px;
        text-align:center;
    }

    .poa-stories-hero-right{
        order:-1;
    }

    .poa-stories-featured-image{
        max-width:520px;
        margin:0 auto;
    }

    .poa-stories-category-list{
        justify-content:center;
    }

    .poa-stories-title{
        font-size:2.1rem;
    }

    .poa-stories-layout{
        margin:22px auto 35px;
        padding:0 16px;
    }

    .poa-stories-section{
        padding:22px;
    }

    .poa-stories-grid,
    .poa-stories-archive-grid{
        grid-template-columns:1fr;
        gap:22px;
    }

    .poa-stories-archive-card{
        width:100%;
    }

    .poa-stories-archive-header{
        margin:25px 0 24px;
    }

    .poa-related-stories{
        padding:0 16px;
    }
}

/* =========================================================
   STORIES ARCHIVE — FINAL WIDTH AND GRID OVERRIDE
========================================================= */

body.post-type-archive-story .site-content > .ast-container,
body.post-type-archive-story .ast-container {
    display:block;
    width:100%;
    max-width:none;
    padding-left:0;
    padding-right:0;
}

body.post-type-archive-story .content-area,
body.post-type-archive-story .site-main {
    width:100%;
    max-width:none;
    margin:0;
}

.poa-stories-archive-container {
    width:calc(100% - 40px);
    max-width:1200px;
    margin:0 auto;
    padding:0;
}

.poa-stories-grid {
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:30px !important;
    width:100% !important;
    max-width:none !important;
    margin:0 0 45px !important;
}

.poa-stories-grid > * {
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
    float:none !important;
}

.poa-stories-card,
.poa-story-card {
    width:100% !important;
    max-width:none !important;
    height:100%;
}

@media (max-width:900px) {
    .poa-stories-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width:600px) {
    .poa-stories-archive-container {
        width:calc(100% - 32px);
    }

    .poa-stories-grid {
        grid-template-columns:1fr !important;
    }
}

.poa-cta-block {
	margin: 48px 0 20px;
	padding: 32px;
	text-align: center;
	background: #f4f6f8;
	border-radius: 12px;
}

.poa-cta-block h2 {
	margin: 0 0 12px;
}

.poa-cta-block p {
	max-width: 700px;
	margin: 0 auto 22px;
}

.poa-cta-buttons {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.poa-cta-button {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 6px;
	background: #1d4f73;
	color: #fff;
	text-decoration: none;
	font-weight: 700;
}

.poa-cta-button:hover {
	background: #163d59;
	color: #fff;
}

.poa-cta-button-secondary {
	background: #fff;
	color: #1d4f73;
	border: 2px solid #1d4f73;
}

.poa-cta-button-secondary:hover {
	background: #1d4f73;
	color: #fff;
}