/*
Theme Name: Doctors24
Theme URI: https://doctors24.cfd
Author: Doctors24 Editorial Team
Description: Lightweight, accessible block theme for the Doctors24 online health guide. Includes breadcrumbs, reading time, author box and related posts.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: doctors24
*/

:root { --d24-radius: 14px; --d24-shadow: 0 1px 2px rgba(11,60,58,.06), 0 8px 24px rgba(11,60,58,.08); --d24-shadow-hover: 0 2px 4px rgba(11,60,58,.08), 0 16px 32px rgba(11,60,58,.14); --d24-ease: 250ms ease; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* Skip link */
.d24-skip { position: absolute; left: 8px; top: -64px; z-index: 1000; background: #0b3c3a; color: #fff; padding: 12px 16px; border-radius: 8px; text-decoration: none; transition: top var(--d24-ease); }
.d24-skip:focus { top: 8px; }

/* Focus */
:where(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid #0f766e; outline-offset: 3px; border-radius: 4px; }

/* Sticky header: transparent at top, solid on scroll */
.d24-header { position: sticky; top: 0; z-index: 100; background: transparent; transition: background var(--d24-ease), box-shadow var(--d24-ease), backdrop-filter var(--d24-ease); }
.d24-header.is-scrolled { background: rgba(255,255,255,.96); box-shadow: 0 1px 0 rgba(11,60,58,.1), 0 8px 24px rgba(11,60,58,.06); backdrop-filter: saturate(1.2) blur(8px); }
.admin-bar .d24-header { top: 32px; }
.d24-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; min-height: 44px; }
.d24-brand svg { width: 36px; height: 36px; flex: none; }
.d24-header .wp-block-navigation a { min-height: 44px; display: inline-flex; align-items: center; transition: color var(--d24-ease); }
.d24-header .wp-block-navigation a:hover { color: #0f766e; }

/* Hero */
.d24-hero { background: radial-gradient(1200px 500px at 85% -10%, #cdeee9 0%, rgba(205,238,233,0) 60%), linear-gradient(180deg, #eef8f6 0%, #ffffff 100%); margin-top: -88px; padding-top: calc(88px + 4rem) !important; }
.d24-hero h1 { max-width: 18ch; }
.d24-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: #0f766e; }

/* Buttons */
.wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; transition: transform var(--d24-ease), box-shadow var(--d24-ease), background var(--d24-ease), color var(--d24-ease); }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: var(--d24-shadow-hover); }
.is-style-outline .wp-block-button__link:hover { background: #0b3c3a; color: #fff; }

/* Cards */
.d24-card { background: #fff; border: 1px solid #dcebe8; border-radius: var(--d24-radius); box-shadow: var(--d24-shadow); overflow: hidden; transition: transform var(--d24-ease), box-shadow var(--d24-ease); height: 100%; }
.d24-card:hover { transform: translateY(-4px); box-shadow: var(--d24-shadow-hover); }
.d24-card .wp-block-post-featured-image { margin: 0; }
.d24-card .wp-block-post-featured-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.d24-card a { text-decoration: none; }
.d24-card .wp-block-post-title a:hover { color: #0f766e; text-decoration: underline; }
.d24-topic { background: #fff; border: 1px solid #dcebe8; border-radius: var(--d24-radius); padding: 24px; box-shadow: var(--d24-shadow); transition: transform var(--d24-ease), box-shadow var(--d24-ease); height: 100%; }
.d24-topic:hover { transform: translateY(-4px); box-shadow: var(--d24-shadow-hover); }
.d24-topic .d24-icon { width: 44px; height: 44px; border-radius: 12px; background: #e3f4f1; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.d24-topic .d24-icon svg { width: 24px; height: 24px; stroke: #0b6b66; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.d24-topic h3 { margin: 0 0 8px; }

/* Breadcrumbs, reading time, meta */
.d24-breadcrumbs { font-size: .875rem; color: #3d5a58; }
.d24-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.d24-breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #7a9694; }
.d24-breadcrumbs a { color: #0b6b66; }
.d24-reading-time { color: #3d5a58; font-size: .875rem; }
.d24-disclaimer-box { border-left: 4px solid #0f766e; background: #eef8f6; padding: 16px 20px; border-radius: 0 12px 12px 0; font-size: .9375rem; }

/* Single post */
.d24-post-content { font-size: 1.125rem; line-height: 1.75; }
.d24-post-content h2 { margin-top: 2.5rem; }
.d24-post-content h3 { margin-top: 2rem; }
.d24-post-content a { text-underline-offset: 3px; }
.d24-toc { background: #f4faf9; border: 1px solid #dcebe8; border-radius: 12px; padding: 16px 24px; margin: 24px 0 32px; }
.d24-toc strong { display: block; margin-bottom: 8px; font-family: Georgia, serif; }
.d24-toc ol { margin: 0; padding-left: 20px; }
.d24-toc a { display: inline-block; padding: 4px 0; }
.d24-faq details { border: 1px solid #dcebe8; border-radius: 12px; padding: 12px 20px; margin-bottom: 12px; background: #fff; }
.d24-faq summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.d24-author-box { border: 1px solid #dcebe8; border-radius: var(--d24-radius); background: #f4faf9; padding: 24px; }
.d24-author-box .wp-block-post-author { align-items: center; }
.d24-author-box .wp-block-post-author__avatar img { border-radius: 50%; }

/* Forms (Contact Form 7) */
.wpcf7 label { display: block; font-weight: 600; margin-bottom: 16px; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 textarea, .wpcf7 select { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 14px; border: 1px solid #9bb8b4; border-radius: 10px; font: inherit; background: #fff; margin-top: 6px; }
.wpcf7 textarea { min-height: 160px; }
.wpcf7 input[type=submit] { min-height: 48px; padding: 0 28px; background: #0b6b66; color: #fff; border: 0; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; transition: transform var(--d24-ease), background var(--d24-ease); }
.wpcf7 input[type=submit]:hover { background: #0b3c3a; transform: translateY(-2px); }
.wpcf7-not-valid-tip { color: #b42318; font-weight: 400; font-size: .875rem; }

/* Footer */
.d24-footer a { text-decoration: none; display: inline-block; padding: 6px 0; min-height: 24px; }
.d24-footer a:hover { text-decoration: underline; }
.d24-footer ul { list-style: none; margin: 0; padding: 0; }

/* Search */
.wp-block-search__input { min-height: 44px; }
.wp-block-search__button { min-height: 44px; }

/* Mobile */
@media (max-width: 782px) { .admin-bar .d24-header { top: 46px; } .d24-hero { padding-top: calc(88px + 2rem) !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } .d24-card:hover, .d24-topic:hover, .wp-block-button__link:hover { transform: none; } }
