/*
Theme Name: TidyNest Living
Template: hostinger-ai-theme
Description: Fresh and bright editorial child theme for TidyNest Living.
Version: 1.0.0
Text Domain: tidynest-living
*/

:root { --tn-radius: 20px; --tn-shadow: 0 12px 28px rgba(47, 107, 79, 0.14); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

/* Header */
.tn-header { background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--wp--preset--color--line); }
.tn-header__row { padding-top: 16px; padding-bottom: 16px; gap: 16px; }
.tn-brand { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.tn-brand a { color: var(--wp--preset--color--ink); text-decoration: none; }
.tn-brand span { color: var(--wp--preset--color--accent); }
.tn-nav a, .tn-nav .wp-block-navigation-item__content { font-size: 0.95rem; font-weight: 600; color: var(--wp--preset--color--ink); text-decoration: none; border-bottom: 2px solid transparent; padding: 4px 0; }
.tn-nav a:hover { border-bottom-color: var(--wp--preset--color--accent); }

/* Sections */
.tn-section { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }
.tn-section h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -0.02em; margin: 0 0 28px; }

/* Hero */
.tn-hero { padding-top: clamp(32px, 6vw, 88px); padding-bottom: clamp(40px, 6vw, 88px); }
.tn-hero .wp-block-columns { align-items: center; gap: clamp(24px, 5vw, 72px); margin: 0; }
.tn-hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 20px; }
.tn-hero__text { font-size: 1.2rem; color: var(--wp--preset--color--muted); max-width: 36ch; margin: 0 0 28px; }
.tn-hero svg { display: block; width: 100%; height: auto; }
.wp-block-button__link { padding: 14px 28px; font-weight: 700; }
.wp-block-button__link:hover { background: #265A42; color: #fff; }

/* Topic tiles */
.tn-topics { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.tn-topics > * { margin: 0; }
.tn-tile { position: relative; padding: 28px; border-radius: var(--tn-radius); border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--surface); transition: box-shadow .2s ease, transform .2s ease; }
.tn-tile h3 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.15; }
.tn-tile p { margin: 0; color: inherit; opacity: .92; font-size: 1rem; }
.tn-tile a { color: inherit; text-decoration: none; }
.tn-tile a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tn-tile:hover { box-shadow: var(--tn-shadow); transform: translateY(-2px); }
.tn-tile--lead { grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px; background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); color: #fff; }
.tn-tile--lead h3 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); color: #fff; }
.tn-tile--tint { background: var(--wp--preset--color--tint); border-color: var(--wp--preset--color--tint); }

/* Post cards */
.tn-card { display: flex; flex-direction: column; height: 100%; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: var(--tn-radius); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.tn-card:hover { box-shadow: var(--tn-shadow); transform: translateY(-2px); }
.tn-card .wp-block-post-featured-image { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; }
.tn-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tn-card__body { padding: 20px 22px 24px; }
.tn-card .wp-block-post-terms a { font-size: 0.8rem; font-weight: 700; color: var(--wp--preset--color--accent); text-decoration: none; }
.tn-card .wp-block-post-title { margin: 6px 0 8px; font-size: 1.2rem; line-height: 1.25; }
.tn-card .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.tn-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.tn-card .wp-block-post-excerpt { margin: 0; color: var(--wp--preset--color--muted); font-size: 0.95rem; line-height: 1.55; }
.tn-card .wp-block-post-date { margin-top: 12px; color: var(--wp--preset--color--muted); font-size: 0.85rem; }
.tn-empty { padding: 28px; border-radius: var(--tn-radius); background: var(--wp--preset--color--tint); color: var(--wp--preset--color--ink); }

/* Closing band */
.tn-band { background: var(--wp--preset--color--tint); border-radius: 28px; padding: clamp(28px, 5vw, 56px); }
.tn-band h2 { margin: 0 0 12px; }
.tn-band p { margin: 0 0 24px; color: var(--wp--preset--color--muted); }

/* Articles and pages */
.tn-article { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 80px); }
.tn-article .wp-block-post-title { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; margin: 8px 0 12px; }
.tn-article .wp-block-post-terms a { font-size: 0.85rem; font-weight: 700; color: var(--wp--preset--color--accent); text-decoration: none; }
.tn-article .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: 0.9rem; }
.tn-article .wp-block-post-featured-image img { border-radius: var(--tn-radius); width: 100%; height: auto; }
.tn-article .wp-block-post-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2em; margin-bottom: .5em; }
.tn-article .wp-block-post-content h3 { font-size: 1.3rem; margin-top: 1.6em; }
.tn-article .wp-block-post-content :where(ul, ol) { padding-left: 1.3em; }
.tn-article .wp-block-post-content li { margin-bottom: .4em; }
.tn-article .wp-block-post-content img { border-radius: 16px; }
.tn-archive-title { font-size: clamp(2rem, 4.6vw, 3rem); letter-spacing: -0.02em; margin: 0 0 12px; }

/* Footer */
.tn-footer { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--tint); padding-top: 56px; padding-bottom: 32px; }
.tn-footer a { color: var(--wp--preset--color--tint); text-decoration: none; }
.tn-footer a:hover { text-decoration: underline; }
.tn-footer h2 { font-size: 1rem; color: #fff; margin: 0 0 12px; letter-spacing: 0; }
.tn-footer p { margin: 0 0 8px; font-size: 0.98rem; }
.tn-footer__brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.tn-footer__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(228, 239, 230, 0.2); font-size: 0.88rem; opacity: .85; }

@media (max-width: 781px) {
  .tn-topics { grid-template-columns: 1fr; }
  .tn-tile--lead { grid-row: auto; min-height: 0; }
  .tn-hero__text { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }