@charset "utf-8";

/* ============================================================
   1. CORE FOUNDATION & VARIABLES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --pinstripe: 1.5px solid #ffffff;
    --cc-blue: #3a6c85;
    --cc-dark: #2a3439;
    --cc-slate: #69828f;
    --cc-green: #009444;
}

* {
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0; 
    padding: 0;
    background-color: #f4f4f4;
    color: var(--cc-dark);
}

/* ============================================================
   2. MAIN GRID SHELL
   ============================================================ */
.grid {
    max-width: 950px;
    margin: auto;
    display: grid;
    min-height: 100vh;
    grid-template-columns: 100%;
    grid-template-rows: auto auto 1fr auto; 
    grid-template-areas: 
        "hd" 
        "nav" 
        "art" 
        "ft";
}

@media (min-width: 768px) {
    .grid {
        background-color: #ffffff;
        box-shadow: -1px 0px 2px #69828f, 1px 0px 2px #69828f;
    }
}

/* ============================================================
   3. HEADER & LOGO
   ============================================================ */
header {
    grid-area: hd;
    background-color: var(--cc-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23ffffff' fill-opacity='0.09' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    padding: 15px 0;
}

.logo { 
    margin: 0 auto; 
    display: block; 
    width: 85%; 
    max-width: 450px; 
    height: auto; 
}

/* ============================================================
   4. NAVIGATION (Desktop & Mobile)
   ============================================================ */
.desktop-nav, .mobile-nav {
    grid-area: nav;
    background-color: var(--cc-blue);
    border-top: var(--pinstripe);
    border-bottom: var(--pinstripe);
}

.desktop-nav { display: none; }
.mobile-nav { display: block; }

@media (min-width: 768px) {
    .desktop-nav { display: block; }
    .mobile-nav { display: none; }
    .desktop-nav ul { text-align: center; padding: 10px 0; margin: 0; list-style: none; }
    .desktop-nav li { display: inline-block; margin: 0 12px; }
    .desktop-nav a { text-decoration: none; color: #ffffff; font-size: 16px; font-weight: 600; transition: 0.3s ease; }
    .desktop-nav a:hover { color: #f4f4f4; border-bottom: 2px solid #ffffff; }
}

.accordion { 
    background-color: var(--cc-blue); 
    color: #ffffff; 
    padding: 18px; 
    width: 100%; 
    border: none; 
    text-transform: uppercase; 
    font-size: 18px; 
    font-weight: 600; 
    cursor: pointer; 
}

.mobile-nav .panel {
    display: none;
    background-color: var(--cc-slate);
    text-align: center;
    padding: 0;
    overflow: hidden;
}

.mobile-nav .panel ul { padding: 0; margin: 0; list-style: none; }
.mobile-nav .panel li { padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-nav .panel li:last-child { border-bottom: none; }
.mobile-nav .panel a { color: #ffffff; text-decoration: none !important; display: block; font-size: 18px; font-weight: 600; }

/* ============================================================
   5. STANDARD ARTICLE & CONTENT TYPOGRAPHY
   ============================================================ */
article { 
    grid-area: art; 
    padding: 30px; 
    line-height: 1.6; 
    background-color: #ffffff; 
}

.article-header h1 {
    color: var(--cc-blue);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    margin: 0 0 1.1rem 0;
}

.article-header h2 {
    color: var(--cc-dark);
    font-size: 1.35rem; 
    font-weight: 300; 
    line-height: 1.4;
    text-align: left;
    opacity: 0.9;
    margin: 0 0 1.1rem 0;
}

.byline-wrapper {
    color: var(--cc-dark);
    font-size: 1.35rem; 
    font-weight: 700;
    line-height: 1.2;
    display: block;
    margin-bottom: 1.5rem;
}

.article-text p {
    font-size: 1.15rem; 
    color: #333333;
    line-height: 1.7;
    text-align: left; 
    margin: 0 0 1.5rem 0;
}

@media (min-width: 768px) {
    .article-text p {
        text-align: justify;
        text-justify: inter-word;
    }
}

.article-text h3 {
    color: var(--cc-blue);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: left;
    line-height: 1.3;
    margin: 2.8rem 0 1.2rem 0;
}

.article-text a { color: var(--cc-blue); text-decoration: none; font-weight: 600; }
.article-text a:hover { text-decoration: underline; }

/* --- Article Images, Figures & Video --- */
.article-hero {
    display: block;
    width: 100%;
    margin: 1.1rem 0 2rem 0;
    padding: 0;
}

.article-hero img {
    display: block;
    width: 100%;
    height: auto;
}

.article-hero figcaption, 
.article-body-image figcaption {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 11pt;
    color: var(--cc-slate);
    font-style: italic;
    line-height: 1.4;
}

.article-body-image {
    display: block;
    width: 100%;
    max-width: 600px; 
    margin: 2.5rem auto; 
}

.article-body-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.video-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

#federer-question {
    display: block;
    max-width: 650px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .video-wrapper { padding: 0 10px; margin: 20px 0; }
}

/* --- Read Also Call-out --- */
.read-also-box {
    margin: 2.5rem 0;
    padding: 1.2rem;
    background-color: #f9f9f9;
    border-left: 4px solid var(--cc-green);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    max-width: 750px;
}

.read-also-box:hover {
    background-color: #f0f4f7;
    border-left-width: 8px;
}

.read-also-content { flex-grow: 1; }

.read-also-thumb {
    flex-shrink: 0;
    width: 120px; 
    height: 80px;
    overflow: hidden;
    border-radius: 2px;
}

.read-also-thumb img { width: 100%; height: 100%; object-fit: cover; }

.read-also-label {
    display: block;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cc-slate);
    letter-spacing: 1.2px;
    margin-bottom: 4px;
}

.read-also-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--cc-dark);
    line-height: 1.3;
}

@media (max-width: 480px) {
    .read-also-box { gap: 15px; padding: 1rem; }
    .read-also-thumb { width: 90px; height: 60px; }
}

/* ============================================================
   6. HUB & CATEGORY PAGES
   ============================================================ */
article.category-page {
    padding-top: 15px !important; 
}

.page-header {
    border-bottom: 4px solid var(--cc-blue);
    margin-bottom: 40px; 
    padding-bottom: 18px;
}

.page-header h1 {
    color: var(--cc-blue);
    font-size: 2.2rem;
    margin-top: 30px;
    margin-bottom: 5px;
}

.page-header p {
    color: var(--cc-dark);
    font-size: 1.15rem;
    margin: 0;
}

.pagestory a, 
.page-substories a {
    text-decoration: none !important;
    display: block;
    color: inherit;
    border-bottom: none !important;
}

.pagestory h2, 
.page-substories h2 {
    color: var(--cc-blue);
    margin: 15px 0 10px 0;
    line-height: 1.25;
    font-weight: 700;
    text-decoration: none !important;
}

/* --- Hero Story --- */
.pagestory {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(0, 148, 68, 0.3); 
}

.pagestory h2 { font-size: 1.8rem; }

.pagestory img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover; 
    border-radius: 12px;
    display: block;
    margin-bottom: 20px;
}

/* --- Sub-stories Feed --- */
.page-substories {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(0, 148, 68, 0.3); 
}

.page-substories:last-of-type {
    border-bottom: none; 
}

.page-substories img {
    width: 100%;
    height: auto; 
    aspect-ratio: 600 / 430; 
    object-fit: contain; 
    border-radius: 8px;
    display: block;
    margin-bottom: 15px;
}

.substory-text h2 {
    font-size: 1.5rem;
    margin-top: 0; 
    margin-bottom: 12px;
}

.page-subhead {
    font-size: 1.05rem;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.page-byline {
    font-size: 0.95rem;
    color: var(--cc-dark);
    font-weight: 600;
    margin-top: 5px;
    line-height: 1.2;
    letter-spacing: 0.1px; 
    display: block;
}

@media (min-width: 768px) {
    .page-substories a {
        display: flex;
        flex-direction: row-reverse;
        gap: 40px;
        align-items: center; 
        justify-content: space-between;
    }
    
    .page-substories img {
        width: 300px; 
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    .substory-text { flex: 1; }
}

/* ============================================================
   7. FOOTER & UTILITIES
   ============================================================ */
footer {
    grid-area: ft;
    background-color: var(--cc-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    padding: 50px 20px; 
    color: #aebfc7; 
    text-align: center; 
    border-top: var(--pinstripe);
}

footer ul { 
    list-style: none; 
    padding: 0; 
    margin: 0 auto 25px auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

footer li { display: inline-block; }

footer a { 
    color: #aebfc7; 
    text-decoration: none; 
    font-weight: 600; 
    text-transform: uppercase; 
    transition: color 0.3s ease; 
}

footer a:hover { color: #ffffff; }
footer p { font-size: 11px; margin-top: 35px; opacity: 0.6; }

@media (max-width: 684px) {
    footer ul { flex-direction: column; gap: 18px; margin-bottom: 25px; }
    footer li { display: block; margin: 0; }
    footer a { font-size: 15px; letter-spacing: 1px; display: inline-block; padding: 5px 0; }
}

#backToTop {
    display: none; 
    position: fixed; 
    bottom: 25px; 
    left: 25px; 
    z-index: 999 !important; 
    width: 50px; 
    height: 50px; 
    background-color: var(--cc-green); 
    color: #ffffff; 
    border: none; 
    border-radius: 50%; 
    align-items: center; 
    justify-content: center;
    font-size: 24px; 
    font-weight: bold; 
    text-decoration: none; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); 
    cursor: pointer; 
    transition: all 0.3s ease;
    pointer-events: auto;
}

#backToTop:hover { background-color: var(--cc-dark); transform: scale(1.1); color: #ffffff; }

/* ============================================================
   8. SPECIALTY PAGE MODULES (Audio, Gallery, Newsletter)
   ============================================================ */

/* --- Audio Player & Playlist --- */
.player-container, .playlist-container {
    max-width: 650px;
    width: 100%;
    margin: 30px auto;
}

#player-border {
    background-color: var(--cc-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23ffffff' fill-opacity='0.09' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    padding: 25px;
    border-radius: 24px;
    border: rgba(0,0,0,0.1) solid 1px;
}

#player-border h2, #player-border h3, #player-border p { color: #ffffff !important; }

.current-song-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

#current-cover {
    width: 220px !important; 
    height: 220px !important;
    min-width: 220px !important;
    object-fit: cover !important;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

@media (min-width: 601px) {
    .current-song-info { flex-direction: row; text-align: left; }
    #current-cover { width: 250px !important; height: 250px !important; }
}

.song-details { flex: 1; }
.song-details h2 { font-size: 1.6rem; margin: 0; font-weight: 700; }
.song-details h3 { font-size: 1.2rem; margin: 5px 0; font-style: italic; opacity: 0.9; }

.playlist-container {
    background-color: #1e262a;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 24px;
}

#playlist { list-style: none; padding: 0; margin: 0; }

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: 0.2s;
}

.playlist-item.active { background-color: var(--cc-green); }

.playlist-item img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover !important;
    border-radius: 8px;
    margin-right: 20px;
}

.playlist-item .song-title { color: white; font-weight: 600; margin: 0; }
.playlist-item .song-artist { color: rgba(255,255,255,0.7); font-size: 0.9em; margin: 0; }

.plyr--audio .plyr__controls { background: transparent !important; }
.plyr--audio .plyr__time { color: #ffffff; }
.plyr--audio .plyr__controls button { color: #ffffff !important; }
.plyr--audio .plyr__controls button:hover { background: rgba(255, 255, 255, 0.1) !important; color: #ffffff !important; }
.plyr--audio .plyr__control--overlaid { background: var(--cc-green) !important; }
.plyr--audio input[type=range] { color: var(--cc-green) !important; }

/* --- Photo Gallery Grid --- */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}
.gallery-container figure { margin: 0; transition: transform 0.3s ease; }
.gallery-container figure:hover { transform: translateY(-5px); }
.gallery-container img { width: 100%; height: auto; aspect-ratio: 600 / 430; object-fit: cover; border-radius: 8px; display: block; }
.gallery-container figcaption { padding: 15px 0; font-weight: 700; color: var(--cc-blue); text-align: center; }

/* --- Newsletter Page Modules --- */
#newsletter-section {
    background-color: var(--cc-dark);
    padding: 30px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: stretch;
    border-radius: 8px;
    margin: 40px 0;
}

#newsletter-description { 
    color: white; text-align: center; border-right: 1px solid rgba(255,255,255,0.1); 
    display: flex; flex-direction: column; justify-content: center; padding: 0 15px; 
}

.feature-list { list-style: none !important; padding: 0; margin: 0; text-align: left; }
.feature-list li {
    color: white; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05); letter-spacing: 1px; line-height: 1.4; text-transform: uppercase;
}

.signup { 
    background-color: var(--cc-green); padding: 35px 25px; border-radius: 20px; text-align: center; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); display: flex; flex-direction: column; justify-content: center;
}

.signup h2 { color: white; font-size: 1.2rem; margin-bottom: 25px; font-weight: 800; }

.mailchimp input[type="text"],
.mailchimp input[type="email"] {
    width: 100%; height: 45px; border-radius: 25px; border: none; margin-bottom: 15px; text-align: center; font-size: 1rem;
}

.mailchimp input[type="submit"] {
    background-color: var(--cc-blue); color: white; width: 100%; height: 50px; border-radius: 25px;
    border: 2px solid white; font-weight: 800; cursor: pointer; transition: 0.3s ease;
}
.mailchimp input[type="submit"]:hover { background: white; color: var(--cc-green); }

#testimonials { 
    color: white; text-align: center; border-left: 1px solid rgba(255,255,255,0.1); 
    display: flex; flex-direction: column; justify-content: center; padding: 0 15px; gap: 15px;
}

.quote { display: block; font-style: italic; font-size: 0.85rem; line-height: 1.4; margin-bottom: 3px; color: white !important; }
.attrib { font-size: 0.75rem; color: var(--cc-slate); font-weight: 700; display: block; }

.disclaimer, .spec-link a { color: #ffffff !important; font-size: 14px; margin-top: 15px; opacity: 0.9; }
.spec-link a { text-decoration: none !important; font-weight: 600; }
.spec-link a:hover { text-decoration: underline !important; }

@media (min-width: 900px) {
    #newsletter-section { grid-template-columns: 1fr 1.3fr 1fr; gap: 20px; padding: 40px 20px; }
}

@media (max-width: 899px) {
    #newsletter-description, #testimonials { border: none; padding: 15px 0; }
    #newsletter-description { text-align: center; align-items: center; }
    .feature-list { text-align: center; width: 100%; }
    .feature-list li { border-bottom: 1px solid rgba(255,255,255,0.1); margin-left: auto; margin-right: auto; }
}