/*
Theme Name: Temples of Kerala
Theme URI: https://mytemplesinkerala.com
Author: Temples of Kerala
Description: ക്ഷേത്രങ്ങൾ, ആചാരങ്ങൾ, ഐതീഹ്യങ്ങൾ എന്നിവയ്ക്കുള്ള മലയാളം വെബ്സൈറ്റ് തീം. ഹോം പേജിൽ പ്രധാന വാർത്തയും വിഭാഗങ്ങളും, പോസ്റ്റ് പേജിൽ WhatsApp/Facebook ഷെയർ, ബന്ധപ്പെട്ട പോസ്റ്റുകൾ, സൈഡ്ബാർ എന്നിവ ഉൾപ്പെടുന്നു.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tok
Tags: blog, news, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Look: indigo night header, lamp-gold accents, kumkum-red category tags. Headings Anek Malayalam, body Noto Sans Malayalam. */
:root {
  --bg: #f5f5f1;
  --surface: #ffffff;
  --ink: #1b1f2a;
  --muted: #5a6072;
  --line: #dcdde2;
  --night: #171a38;
  --night-2: #20244a;
  --night-ink: #f1efe8;
  --gold: #e0a526;
  --kumkum: #a82a1c;
  --link: #8f2216;
  --font-display: "Anek Malayalam", "Noto Sans Malayalam", "Nirmala UI", sans-serif;
  --font-body: "Noto Sans Malayalam", "Nirmala UI", system-ui, sans-serif;
  --radius: 6px;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1020; --surface: #171a34; --ink: #ecebe6; --muted: #a4a8bd; --line: #2a2e52;
    --night: #090b1a; --night-2: #12152e; --gold: #f0b93a; --kumkum: #ff8f7a; --link: #ffb4a0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.85;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--kumkum); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.35; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap {
  width: 100%; max-width: 1160px; margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--gold); color: #111; padding: 8px 14px; }

/* Header */
.masthead { background: var(--night); color: var(--night-ink); border-bottom: 4px solid var(--gold); }
.masthead-top { display: flex; align-items: center; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; color: inherit; text-decoration: none; }
.brand .custom-logo { max-height: 64px; width: auto; }
.brand-text { min-width: 0; }
.brand-name { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 5vw, 34px); line-height: 1.2; margin: 0; }
.brand-tag { display: block; color: var(--gold); font-size: 14px; line-height: 1.4; margin: 0; }
.head-actions { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
  padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--gold); color: var(--night-ink); background: transparent;
}
.btn:hover { background: var(--gold); color: #1a1a1a; }
.btn-solid { background: var(--gold); color: #1a1a1a; }
.btn-solid:hover { background: var(--night-ink); border-color: var(--night-ink); }

.nav-band { background: var(--night-2); border-top: 1px solid rgba(255,255,255,.08); }
.nav-toggle { display: none; width: 100%; text-align: left; border: 0; border-radius: 0; padding: 12px 0; background: transparent; color: var(--night-ink); font: inherit; font-weight: 600; cursor: pointer; }
.nav-band ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav-band li { position: relative; }
.nav-band a { display: block; padding: 12px 16px; color: var(--night-ink); text-decoration: none; font-weight: 500; font-size: 16px; border-bottom: 3px solid transparent; }
.nav-band a:hover, .nav-band .current-menu-item > a, .nav-band .current-cat > a { border-bottom-color: var(--gold); color: #fff; }
.nav-band .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; background: var(--night-2); z-index: 20; flex-direction: column; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.nav-band li:hover > .sub-menu, .nav-band li:focus-within > .sub-menu { display: flex; }

/* Section headings with lamp flame */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 44px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sec-head h2, .sec-head h1 { font-size: clamp(22px, 4vw, 28px); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.sec-head h2::before, .sec-head h1::before {
  content: ""; flex: 0 0 auto; width: 11px; height: 17px; background: var(--gold);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; transform: rotate(8deg);
}
.sec-head a.more { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--night-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--night) 0%, var(--night-2) 100%); position: relative; }
.ph::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 34px; margin: -17px 0 0 -11px; background: var(--gold); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; opacity: .85; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cat-tag { font-size: 13px; font-weight: 600; color: var(--kumkum); text-decoration: none; line-height: 1.5; }
.card-title { font-size: 19px; font-weight: 700; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--kumkum); }
.card-meta { font-size: 13px; color: var(--muted); margin: 0; }
.card-excerpt { font-size: 15px; line-height: 1.7; color: var(--muted); margin: 0; }

/* Front hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 380px; background: var(--night); display: flex; align-items: flex-end; }
.hero-main .bg, .hero-main .bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(9,11,26,.92) 8%, rgba(9,11,26,.15) 70%); }
.hero-main .txt { position: relative; z-index: 1; padding: 28px; color: #fff; min-width: 0; }
.hero-main .cat-tag { color: var(--gold); }
.hero-main h2 { font-size: clamp(26px, 4.5vw, 38px); font-weight: 800; margin: 6px 0 8px; }
.hero-main h2 a { color: #fff; text-decoration: none; }
.hero-main p { color: #d8d8e2; margin: 0; font-size: 16px; line-height: 1.7; }
.hero-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mini { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mini .card-media { aspect-ratio: 1 / 1; height: 100%; }
.mini .mini-body { padding: 10px 12px 10px 0; min-width: 0; }
.mini h3 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.mini h3 a { color: var(--ink); text-decoration: none; }
.mini h3 a:hover { color: var(--kumkum); }

/* Layout with sidebar */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-block: 32px 24px; align-items: start; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px clamp(16px, 4vw, 40px) 32px; min-width: 0; }
.entry-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }
.entry-cats a { font-size: 14px; font-weight: 600; color: var(--kumkum); text-decoration: none; }
.entry-title { font-size: clamp(30px, 5.5vw, 44px); font-weight: 800; }
.entry-meta { color: var(--muted); font-size: 14px; margin: 10px 0 20px; }
.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { width: 100%; border-radius: var(--radius); display: block; }
.entry-content { max-width: 70ch; font-size: 18px; }
.entry-content h2 { font-size: 28px; margin: 1.6em 0 .5em; }
.entry-content h3 { font-size: 23px; margin: 1.4em 0 .4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .3em; }
.entry-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--gold); color: var(--muted); }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption, .wp-caption-text { font-size: 14px; color: var(--muted); }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: block; clear: both; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.share strong { font-family: var(--font-display); }
.share .btn { color: var(--ink); border-color: var(--line); }
.share .btn:hover { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }
.tags { margin-top: 14px; font-size: 14px; color: var(--muted); }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.post-nav a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface); line-height: 1.6; }
.post-nav a:hover { border-color: var(--gold); }
.post-nav small { display: block; color: var(--muted); font-size: 13px; }
.post-nav .next { text-align: right; }
.post-nav span.empty { display: none; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.widget-title { font-size: 19px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.widget-title::before { content: ""; width: 9px; height: 14px; background: var(--gold); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; transform: rotate(8deg); }
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.widget li a { text-decoration: none; color: var(--ink); }
.widget li a:hover { color: var(--kumkum); }
.rp { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.rp .thumb { aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: var(--night-2); }
.rp .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp .t { font-size: 15px; line-height: 1.55; font-weight: 500; }
.about-box address { font-style: normal; font-size: 15px; line-height: 1.8; color: var(--muted); }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.search-form button { font: inherit; font-weight: 600; border: 0; border-radius: var(--radius); padding: 10px 16px; background: var(--night); color: var(--night-ink); cursor: pointer; }
.search-form button:hover { background: var(--kumkum); }

/* Pagination */
.pagination { margin: 36px 0 8px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); color: var(--ink); }
.pagination .page-numbers.current { background: var(--night); color: var(--night-ink); border-color: var(--night); }

.archive-desc { color: var(--muted); max-width: 60ch; margin-top: 4px; }
.page-wrap { padding-block: 32px 24px; }
.empty-state { text-align: center; padding: 56px 16px; }

/* Comments */
.comments { margin-top: 28px; }
.comments ol { list-style: none; padding-left: 0; }
.comments .children { list-style: none; padding-left: 20px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comments input[type="text"], .comments input[type="email"], .comments input[type="url"], .comments textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.comments input[type="submit"] { font: inherit; font-weight: 600; padding: 10px 18px; border: 0; border-radius: var(--radius); background: var(--night); color: var(--night-ink); cursor: pointer; }

/* Footer */
.site-footer { background: var(--night); color: var(--night-ink); margin-top: 48px; border-top: 4px solid var(--gold); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px; padding-block: 36px 24px; }
.foot-grid h2 { font-size: 19px; font-weight: 700; color: var(--gold); margin-bottom: 10px; }
.foot-grid p, .foot-grid address { font-style: normal; color: #c9c8d6; font-size: 15px; line-height: 1.8; margin: 0 0 8px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--night-ink); text-decoration: none; }
.foot-grid a:hover { color: var(--gold); text-decoration: underline; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); padding-block: 16px 22px; font-size: 14px; color: #a9a8bb; }

/* Responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-main { min-height: 320px; }
}
@media (max-width: 720px) {
  .masthead-top { padding-block: 14px; }
  .head-actions .btn { padding: 8px 12px; font-size: 14px; }
  .nav-toggle { display: block; }
  .nav-band ul { display: none; flex-direction: column; padding-bottom: 8px; }
  .nav-band.open ul { display: flex; }
  .nav-band a { padding: 10px 0; border-bottom: 0; border-left: 3px solid transparent; padding-left: 12px; }
  .nav-band a:hover, .nav-band .current-menu-item > a { border-left-color: var(--gold); }
  .nav-band .sub-menu { position: static; display: flex; box-shadow: none; padding-left: 12px; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .next { text-align: left; }
  .entry-content { font-size: 17px; }
  .hero-main .txt { padding: 20px; }
  .mini { grid-template-columns: 88px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Other-sites strip under the main menu */
.sites-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.sites-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-block: 12px; }
.sites-label { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--kumkum); flex: 0 0 auto; }
.sites-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 320px; min-width: 0; }
.sites-list li { flex: 1 1 260px; min-width: 0; }
.site-link { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 8px 14px; background: var(--bg); line-height: 1.5; }
.site-link:hover { border-color: var(--gold); background: var(--surface); }
.site-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.site-desc { display: block; font-size: 14px; color: var(--muted); }
.site-host { display: block; font-size: 13px; color: var(--link); overflow-wrap: anywhere; }
