/*
Theme Name: Inspire Malayali
Theme URI: https://example.com
Author: Inspire Malayali
Author URI: https://example.com
Description: A classic newspaper-style theme for Inspire Malayali, built for comfortable daily news reading with Mollywood, Kollywood, Tollywood, Bollywood, Business and Sports categories, plus an Event Gallery.
Version: 1.0
Requires at least: 5.9
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: inspire-malayali
*/

* { box-sizing: border-box; }

:root {
  --ink: #1a1a1a;
  --ink2: #2a2a2a;
  --ink3: #5a5a5a;
  --paper: #faf9f4;
  --paper2: #f1efe6;
  --border: #d8d4c8;
  --red: #b91c1c;
  --ff-head: 'Playfair Display', Georgia, serif;
  --ff-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink2);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

a { color: var(--ink); text-decoration-color: var(--red); }
img { max-width: 100%; height: auto; display: block; border-radius: 0; }

/* ===================== READABLE ARTICLE TEXT ===================== */
article p,
.entry-content p,
.post-content p {
  font-family: var(--ff-body);
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink2);
  margin-bottom: 1.3em;
  max-width: 680px;
}

article, .entry-content, .post-content {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

article a, .entry-content a {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1px;
}

blockquote {
  font-family: var(--ff-head);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink2);
  border-left: 3px solid var(--ink);
  padding-left: 20px;
  margin: 1.5em 0;
}

/* ===================== HEADLINES ===================== */
h1, h2, h3,
.entry-title, .post-title {
  font-family: var(--ff-head);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

.entry-title, .post-title { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }

/* ===================== HEADER / MASTHEAD ===================== */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.header-top {
  text-align: center;
  padding: 22px 16px 14px;
}

.site-title {
  font-family: var(--ff-head);
  font-weight: 900;
  font-size: 40px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.site-title a { text-decoration: none; color: var(--ink); }
.site-title span { color: var(--red); }

.site-description {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-top: 4px;
}

/* ===================== NAVIGATION ===================== */
.main-navigation {
  background-color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow-x: auto;
}

.main-navigation li { white-space: nowrap; }

.main-navigation a {
  display: block;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(250,249,244,0.8);
  padding: 14px 16px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: #fff;
  border-bottom-color: var(--red);
}

.social-links {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.social-links a {
  font-size: 18px;
  color: rgba(250,249,244,0.8);
}
.social-links a:hover { color: #fff; }

/* ===================== LAYOUT CONTAINERS ===================== */
.site-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 8px;
}

.section-header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 24px;
  margin: 0;
}

/* ===================== NEWS / ARCHIVE CARDS ===================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
  list-style: none;
  padding: 0;
}

.news-card {
  background: var(--paper);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.news-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--paper2);
  overflow: hidden;
}

.news-card-img img { width: 100%; height: 100%; object-fit: cover; }

.news-card-body { padding: 12px 14px 14px; }

.news-card-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.news-card-title {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 6px;
}

.news-card:hover .news-card-title {
  text-decoration: underline;
  text-decoration-color: var(--red);
}

.news-card-meta {
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--ink3);
}

/* ===================== CATEGORY BLOCKS ===================== */
.category-title {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 19px;
  color: var(--paper);
  background: var(--ink);
  display: inline-block;
  padding: 6px 18px;
  margin-bottom: 16px;
}

/* ===================== EVENT GALLERY ===================== */
.event-gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
}

.event-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--paper2);
  display: block;
}

.event-card img { width: 100%; height: 100%; object-fit: cover; }

.event-card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(26,26,26,0.82);
  color: var(--paper);
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
}

/* ===================== SIDEBAR / WIDGETS ===================== */
.widget {
  margin-bottom: 28px;
}

.widget-title {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--ink);
  color: rgba(250,249,244,0.75);
  margin-top: 56px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding: 36px 24px 24px;
}

.footer-about h3,
.footer-social h3 {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--paper);
  margin-bottom: 10px;
}

.footer-about p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 480px;
}

.footer-social-icons { display: flex; gap: 14px; }

.footer-social-icons a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(250,249,244,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--paper);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.footer-social-icons a:hover {
  background: var(--red);
  border-color: var(--red);
}

.footer-bottom {
  border-top: 1px solid rgba(250,249,244,0.15);
  text-align: center;
  font-size: 12px;
  padding: 14px 0;
}

/* ===================== ACCESSIBILITY / FOCUS ===================== */
a:focus, button:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
  .event-gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-title { font-size: 30px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .event-gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .site-content { padding: 24px 16px 8px; }
  article p, .entry-content p { font-size: 17px; }
  .entry-title, .post-title { font-size: 24px; }
}
