/* ==========================================================================
   TIDAL PROSE — SlashSEO Theme
   Visual DNA: Terapia Physical Therapy Template
   
   Color Strategy: Cyan primary (#15B9D9) + warm peach secondary (#EFA286)
                   on near-white (#FAF9FB) with deep navy dark (#202135)
   Typography: Serif headings (Georgia stack) + Sans body (system stack)
   Layout: Full-width sections, centered narrow content, generous padding
   Components: Pill buttons, 10px rounded cards, decorative subtitle lines
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-primary: #15B9D9;
    --color-primary-dark: #1194ae;
    --color-secondary: #EFA286;
    --color-dark: #202135;
    --color-dark-lighter: #2c2d45;
    --color-light: #FAF9FB;
    --color-body: #8d8d8d;
    --color-heading: #202135;
    --color-white: #fff;
    --color-border: #dee2e6;
    --font-heading: Georgia, "Times New Roman", "Playfair Display", serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 10px;
    --radius-pill: 50rem;
    --shadow-card: 0 0 45px rgba(0,0,0,.12);
    --transition: 0.4s ease;
    --container-width: 1200px;
    --section-padding: 5rem 0;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-body);
    background-color: var(--color-white);
    -webkit-text-size-adjust: 100%;
}

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

a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-heading);
    margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* --- Layout Container --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Skip Nav --- */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    z-index: 10000;
    border-radius: 0 0 var(--radius) 0;
}
.skip-nav:focus {
    top: 0;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: inset 0 0 0 0 var(--color-light);
}
.btn-primary:hover {
    box-shadow: inset 300px 0 0 0 var(--color-light);
    color: var(--color-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* --- Section Title with Decorative Lines --- */
.section-header {
    max-width: 800px;
    text-align: center;
    margin: 0 auto 3.5rem;
}

.section-header .section-label {
    display: inline-block;
    position: relative;
    text-transform: uppercase;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding: 0 1.5rem;
}

.section-header .section-label::before,
.section-header .section-label::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: var(--color-primary);
}
.section-header .section-label::before {
    right: 100%;
    margin-right: 0;
}
.section-header .section-label::after {
    left: 100%;
    margin-left: 0;
}

.section-header h2 {
    margin-bottom: 1.25rem;
}

.section-header p {
    color: var(--color-body);
    font-size: 1.0625rem;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-topbar {
    background: var(--color-dark);
    padding: 0.5rem 0;
    font-size: 0.8125rem;
}
.site-topbar a {
    color: rgba(255,255,255,0.7);
}
.site-topbar a:hover {
    color: var(--color-primary);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-email svg {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    fill: var(--color-primary);
    vertical-align: middle;
}

.site-header {
    background: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,.06);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Desktop Nav */
.main-nav {
    display: none;
    gap: 0.25rem;
}

.main-nav a {
    position: relative;
    color: var(--color-heading);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.main-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--color-primary);
}
.main-nav a:hover::after {
    width: calc(100% - 2rem);
    left: 1rem;
}

/* Hamburger */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 8px 10px;
    cursor: pointer;
    z-index: 1001;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

/* Mobile nav */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
    padding: 1rem 0;
    z-index: 999;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-heading);
    font-weight: 500;
    border-bottom: 1px solid var(--color-light);
}
.mobile-nav a:hover {
    color: var(--color-primary);
    background: var(--color-light);
}

@media (min-width: 768px) {
    .main-nav { display: flex; }
    .menu-toggle { display: none; }
    .mobile-nav { display: none !important; }
    .site-topbar { display: block; }
}

@media (max-width: 767px) {
    .site-topbar { display: none; }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    background: var(--color-dark);
    padding: 5rem 0 4.5rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, rgba(32,33,53,0.95) 0%, rgba(21,185,217,0.15) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero-label {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--color-secondary);
    margin-bottom: 1.25rem;
    position: relative;
    padding-left: 3rem;
}
.hero-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 2px;
    background: var(--color-secondary);
}

.hero h1 {
    color: var(--color-white);
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.15;
}

.hero-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}
.hero-subtitle p { color: rgba(255,255,255,0.75); margin: 0; }

.hero .btn-primary {
    font-size: 1rem;
    padding: 1rem 2.5rem;
}

/* ==========================================================================
   TOPICS SECTION
   ========================================================================== */
.topics-section {
    padding: var(--section-padding);
    background: var(--color-light);
}

.topics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .topics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .topics-grid { grid-template-columns: repeat(3, 1fr); }
}

.topic-card {
    background: var(--color-white);
    border-radius: var(--radius);
    border: 1px solid var(--color-primary);
    padding: 2rem 1.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    opacity: 0.5;
    transition: var(--transition);
}

.topic-card:hover::before {
    height: 100%;
    opacity: 0.07;
}

.topic-card h3 {
    color: var(--color-heading);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    transition: var(--transition);
}

.topic-card:hover h3 {
    color: var(--color-primary);
}

.topic-card .topic-desc {
    color: var(--color-body);
    font-size: 0.9375rem;
    line-height: 1.7;
}
.topic-card .topic-desc p { margin: 0; }

/* ==========================================================================
   LATEST POSTS SECTION
   ========================================================================== */
.posts-section {
    padding: var(--section-padding);
    background: var(--color-white);
}

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

@media (min-width: 768px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
}

.post-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

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

.post-card:hover .post-card-image img {
    transform: scale(1.08);
}

.post-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(21, 185, 217, 0);
    transition: var(--transition);
    border-radius: var(--radius) var(--radius) 0 0;
}

.post-card:hover .post-card-image::after {
    background: rgba(21, 185, 217, 0.2);
}

.post-card-body {
    padding: 1.5rem;
    background: var(--color-light);
    border: 1px solid var(--color-primary);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-date {
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-card-date svg {
    width: 14px;
    height: 14px;
    fill: var(--color-primary);
}

.post-card-body h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.post-card-body h3 a {
    color: var(--color-heading);
}
.post-card-body h3 a:hover {
    color: var(--color-primary);
}

.post-card-excerpt {
    font-size: 0.9375rem;
    color: var(--color-body);
    margin-bottom: 1.25rem;
    flex: 1;
}
.post-card-excerpt p { margin: 0; }

.post-card-body .btn {
    align-self: flex-start;
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */
.faq-section {
    padding: var(--section-padding);
    background: var(--color-light);
}

.faq-list {
    max-width: 820px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--color-primary);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.25rem 3rem 1.25rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-heading);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    line-height: 1.4;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-primary);
    transition: var(--transition);
    font-family: var(--font-body);
}

.faq-item.is-open .faq-question::after {
    content: "−";
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-answer {
    display: none;
    padding: 0 1.5rem 1.25rem;
    color: var(--color-body);
    font-size: 0.9375rem;
    line-height: 1.8;
}

.faq-item.is-open .faq-answer {
    display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.6);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand .logo-text {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.55);
}

.footer-col h4 {
    color: var(--color-white);
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-heading);
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.55);
    padding: 0.3rem 0;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: 6px;
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.55);
    font-size: 0.9375rem;
    padding: 0.3rem 0;
}
.footer-contact a:hover {
    color: var(--color-primary);
}
.footer-contact svg {
    width: 16px;
    height: 16px;
    fill: var(--color-primary);
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

/* ==========================================================================
   BLOG INDEX PAGE
   ========================================================================== */
.page-hero {
    background: var(--color-dark);
    padding: 4rem 0 3.5rem;
    text-align: center;
    position: relative;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(32,33,53,0.95), rgba(21,185,217,0.12));
}
.page-hero-content {
    position: relative;
    z-index: 2;
}
.page-hero h1 {
    color: var(--color-white);
    margin-bottom: 0.25rem;
}
.page-hero p {
    color: rgba(255,255,255,0.6);
}

.blog-listing {
    padding: var(--section-padding);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    color: var(--color-heading);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.pagination .active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ==========================================================================
   SINGLE POST PAGE
   ========================================================================== */
.post-single {
    padding: var(--section-padding);
}

.post-single-inner {
    max-width: 780px;
    margin: 0 auto;
}

.post-single-meta {
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.post-single-cover {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-single-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-single-excerpt {
    font-size: 1.125rem;
    color: var(--color-heading);
    border-left: 3px solid var(--color-primary);
    padding-left: 1.25rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-style: italic;
}
.post-single-excerpt p { margin: 0; color: inherit; }

/* Content HTML styling */
.content-html {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #555;
}

.content-html h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.content-html h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content-html p {
    margin-bottom: 1.25rem;
}

.content-html ul, .content-html ol {
    margin: 0 0 1.25rem 1.5rem;
    list-style: disc;
}
.content-html ol { list-style: decimal; }
.content-html li { margin-bottom: 0.4rem; }

.content-html a {
    color: var(--color-primary);
    text-decoration: underline;
}

.content-html img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.content-html blockquote {
    border-left: 3px solid var(--color-secondary);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--color-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--color-heading);
}

/* ==========================================================================
   STATIC PAGE
   ========================================================================== */
.page-content {
    padding: var(--section-padding);
}

.page-content-inner {
    max-width: 780px;
    margin: 0 auto;
}

/* ==========================================================================
   ACCESSIBILITY & FOCUS
   ========================================================================== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   UTILITY
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    box-shadow: 0 4px 15px rgba(21,185,217,0.4);
    transition: var(--transition);
    z-index: 999;
    border: none;
    cursor: pointer;
}
.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
}
.back-to-top.visible {
    display: flex;
}
