/*
Theme Name: Free Medium Reading
Description: Custom theme for Free Medium Reading — compassionate medium sessions
Version: 1.0
Author: WP-Net-Control
Text Domain: fmr-theme
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Source Sans Pro', 'Segoe UI', Helvetica, sans-serif;
    color: #2C3E50;
    background: #FFFFFF;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    line-height: 1.25;
    color: #1a2e3b;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p  { margin-bottom: 1rem; }
a  { color: #4a85ad; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1a5276; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container        { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 820px;  margin: 0 auto; padding: 0 1.5rem; }

.section     { padding: 5rem 0; }
.section-alt  { background: #F2F4F6; }
.section-blue { background: #D6EAF8; }

.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h2 { margin-bottom: 0.75rem; }
.section-heading p  { font-size: 1.1rem; color: #5D6D7E; max-width: 600px; margin: 0 auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-block;
    background: #4a85ad;
    color: #fff;
    padding: 0.9rem 2rem;
    border-radius: 4px;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background: #2e6e94; color: #fff; transform: translateY(-1px); }

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: #4a85ad;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    border: 2px solid #4a85ad;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-secondary:hover { background: #4a85ad; color: #fff; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid #e0eaf3;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 1.5rem;
    max-width: 1140px;
    margin: 0 auto;
}
.site-logo {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a2e3b;
    text-decoration: none;
    line-height: 1.2;
}
.site-logo span {
    display: block;
    font-size: 0.65rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    color: #7fa8c4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* WP nav menu — supports both registered <ul id="primary-menu"> and
   fallback wp_page_menu <div id="primary-menu"><ul> */
#primary-menu,
#primary-menu ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    margin: 0; padding: 0;
}
#primary-menu a {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #2C3E50;
    padding: 0.4rem 0.75rem;
    border-radius: 3px;
    transition: color 0.2s, background 0.2s;
}
#primary-menu a:hover,
#primary-menu .current-menu-item > a,
#primary-menu .current_page_item > a { color: #4a85ad; background: #eaf3fb; }
#primary-menu .nav-cta > a {
    background: #4a85ad; color: #fff; border-radius: 4px;
}
#primary-menu .nav-cta > a:hover { background: #2e6e94; color: #fff; }

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(214,234,248,0.88) 0%, rgba(255,255,255,0.55) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 5rem 2rem;
}
.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-style: italic;
    color: #1a2e3b;
    margin-bottom: 1.2rem;
}
.hero-sub {
    font-size: 1.15rem;
    color: #3D5A70;
    margin-bottom: 2rem;
    line-height: 1.65;
    font-weight: 300;
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar { background: #D6EAF8; padding: 1.1rem 0; }
.trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 2rem;
    list-style: none;
    justify-content: center;
    align-items: center;
}
.trust-list li {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    color: #1a5276;
    letter-spacing: 0.02em;
}

/* ============================================================
   TWO COLUMN
   ============================================================ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.two-col img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(74,133,173,0.15);
}

/* ============================================================
   CARDS
   ============================================================ */
.card-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }

.card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 16px rgba(0,0,0,0.06);
    border-top: 3px solid #D6EAF8;
}
.card h3 { margin-bottom: 0.65rem; color: #1a2e3b; }
.card p  { color: #5D6D7E; font-size: 0.95rem; line-height: 1.65; margin: 0; }

.card-icon {
    width: 56px; height: 56px;
    background: #D6EAF8;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }

.testimonial {
    background: #fff;
    border-radius: 8px;
    padding: 2rem 2rem 1.5rem;
    box-shadow: 0 3px 16px rgba(0,0,0,0.06);
    position: relative;
}
.testimonial::before {
    content: '\201C';
    font-family: 'Lora', serif;
    font-size: 5rem;
    color: #D6EAF8;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    line-height: 1;
}
.testimonial p    { font-style: italic; color: #2C3E50; line-height: 1.65; padding-top: 1.8rem; margin: 0; }
.testimonial cite { display: block; margin-top: 1rem; font-size: 0.82rem; font-weight: 600; color: #7fa8c4; font-style: normal; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, #D6EAF8 0%, #EBF5FB 100%);
    padding: 5rem 0;
    text-align: center;
}
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p  { font-size: 1.1rem; color: #3D5A70; max-width: 580px; margin: 0 auto 2rem; line-height: 1.7; }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, #D6EAF8 0%, #EBF5FB 100%);
    padding: 4rem 0 3rem;
}
.page-hero h1 { font-style: italic; }
.page-hero p  { font-size: 1.1rem; color: #3D5A70; margin-top: 0.75rem; margin-bottom: 0; }

/* ============================================================
   POST / PAGE CONTENT
   ============================================================ */
.page-content { font-size: 1.05rem; line-height: 1.8; color: #2C3E50; }
.page-content h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin: 2.5rem 0 1rem; }
.page-content h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; color: #1a5276; }
.page-content h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.page-content ul, .page-content ol { margin: 0 0 1rem 1.5rem; }
.page-content li { margin-bottom: 0.4rem; }
.page-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.page-content th { background: #D6EAF8; padding: 0.6rem 0.8rem; text-align: left; font-family: 'Source Sans Pro', sans-serif; }
.page-content td { padding: 0.5rem 0.8rem; border-bottom: 1px solid #e0eaf3; }
.page-content blockquote { border-left: 4px solid #D6EAF8; padding: 0.5rem 1.25rem; color: #5D6D7E; font-style: italic; margin: 1.5rem 0; }

/* ============================================================
   BLOG LIST
   ============================================================ */
.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(0,0,0,0.06);
    border-top: 3px solid #D6EAF8;
    display: flex; flex-direction: column;
}
.blog-card-thumb { display: block; line-height: 0; overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-card-thumb img { transform: scale(1.04); }
.blog-card-body { padding: 1.5rem 2rem 2rem; display: flex; flex-direction: column; flex: 1; }
.blog-card .cat { font-size: 0.78rem; color: #7fa8c4; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.blog-card h3 { margin-bottom: 0.75rem; }
.blog-card h3 a { color: #1a2e3b; transition: color 0.2s; }
.blog-card h3 a:hover { color: #4a85ad; }
.blog-card p { color: #5D6D7E; font-size: 0.92rem; flex: 1; margin: 0; }
.blog-card .read-more { margin-top: 1rem; color: #4a85ad; font-size: 0.9rem; font-weight: 600; }

/* Single post featured image */
.single-featured-img { margin-bottom: 2.5rem; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.single-featured-img img { width: 100%; height: auto; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #1a2e3b; color: #a8c5d8; padding: 3.5rem 0 1.5rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-logo { font-family: 'Lora', serif; font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.footer-tagline { font-size: 0.9rem; line-height: 1.6; color: #89a8bc; margin: 0; }
.footer-heading { font-family: 'Lora', serif; font-size: 0.9rem; font-weight: 700; color: #d6eaf8; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

#footer-menu { list-style: none; margin: 0; padding: 0; }
#footer-menu li + li { margin-top: 0.4rem; }
#footer-menu a { color: #89a8bc; font-size: 0.88rem; transition: color 0.2s; }
#footer-menu a:hover { color: #D6EAF8; }

.footer-contact li { font-size: 0.88rem; color: #89a8bc; margin-bottom: 0.4rem; list-style: none; }
.footer-contact a { color: #89a8bc; transition: color 0.2s; }
.footer-contact a:hover { color: #D6EAF8; }
.footer-bottom {
    border-top: 1px solid #2c4a5e;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #5c7a8f;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .two-col          { grid-template-columns: 1fr; gap: 2rem; }
    .card-grid-2      { grid-template-columns: 1fr; }
    .card-grid-3      { grid-template-columns: 1fr; }
    .testimonials-grid{ grid-template-columns: 1fr; }
    .footer-inner     { grid-template-columns: 1fr; }
    .trust-list       { flex-direction: column; gap: 0.35rem; align-items: flex-start; padding-left: 1rem; }
    .hero-content     { padding: 3rem 1.5rem; }
    .hero-section     { min-height: 440px; }
    #primary-menu,
    #primary-menu ul  { display: none; }
    .footer-bottom    { flex-direction: column; gap: 0.5rem; text-align: center; }
}
