/*
Theme Name: Nhiếp ảnh Sơn La
Theme URI: https://nhiepanh.sonla.org.vn/
Author: Chi hội Nhiếp ảnh Sơn La
Description: Tạp chí ảnh hiện đại dành cho Chi hội Nhiếp ảnh Sơn La.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sonla-photo-news
*/

:root {
  --ink: #17201d;
  --muted: #68736e;
  --paper: #f7f7f3;
  --white: #fff;
  --green: #123d32;
  --green-2: #1e5b49;
  --lime: #c9d66b;
  --orange: #e76f3c;
  --sand: #eae5d8;
  --line: #dfe2dc;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(17, 45, 36, .09);
  --wrap: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--orange); }
.site-wrap { width: min(calc(100% - 48px), var(--wrap)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.topline { background: var(--green); color: rgba(255,255,255,.7); font-size: 12px; }
.topline-inner { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topline-right { display: flex; gap: 20px; }
.topline a:hover { color: #fff; }

.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 124px; display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.brand { display: flex; align-items: center; gap: 17px; }
.brand-mark { width: 66px; height: 66px; flex: 0 0 auto; }
.brand-overline { display: block; margin-bottom: 3px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.brand-name { display: block; color: var(--green); font-size: clamp(29px, 3.5vw, 43px); font-weight: 850; line-height: 1.04; letter-spacing: -.045em; }
.brand-subtitle { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.masthead-quote { max-width: 360px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.masthead-quote::before { content: "●"; margin-right: 9px; color: var(--lime); }

.nav-shell { position: sticky; z-index: 30; top: 0; background: var(--green); box-shadow: 0 8px 24px rgba(10,35,27,.12); }
.nav-inner { min-height: 56px; display: flex; align-items: center; gap: 24px; }
.primary-nav { flex: 1; }
.primary-nav ul { display: flex; align-items: center; gap: 5px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: 18px 13px; color: rgba(255,255,255,.86); font-size: 12px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--lime); }
.nav-home { color: var(--lime) !important; }
.menu-toggle { display: none; border: 0; background: transparent; color: #fff; font-size: 25px; cursor: pointer; }
.nav-search { flex: 0 0 auto; }
.nav-search-form { display: flex; align-items: center; min-height: 36px; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; }
.nav-search-form input { width: 145px; border: 0; outline: 0; padding: 8px 4px 8px 15px; color: #fff; background: transparent; font: inherit; font-size: 12px; }
.nav-search-form input::placeholder { color: rgba(255,255,255,.55); }
.nav-search-form button { border: 0; padding: 8px 13px; color: #fff; background: transparent; cursor: pointer; }

.breaking { background: var(--sand); border-bottom: 1px solid #ddd7c8; }
.breaking-inner { min-height: 42px; display: flex; align-items: center; overflow: hidden; }
.breaking-label { flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; color: #fff; background: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.breaking-item { min-width: 0; padding-left: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 650; }

.main-content { padding: 34px 0 75px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .75fr); gap: 22px; }
.hero-main {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  min-height: 530px; overflow: hidden; border-radius: var(--radius); background: var(--green); box-shadow: var(--shadow);
}
.hero-main > a { min-width: 0; overflow: hidden; }
.hero-main img, .hero-main .photo-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.hero-main:hover img { transform: scale(1.025); }
.hero-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 48px); color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--orange); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 19px; height: 3px; border-radius: 5px; background: currentColor; }
.hero-content .eyebrow { color: var(--lime); }
.hero-title {
  display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5;
  font-size: clamp(27px, 2.7vw, 36px); font-weight: 820; line-height: 1.14; letter-spacing: -.035em;
}
.hero-title a:hover { color: var(--lime); }
.hero-excerpt { display: -webkit-box; margin: 18px 0 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; color: rgba(255,255,255,.72); font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 600; }
.hero-content .meta { margin-top: 22px; color: rgba(255,255,255,.56); }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.hero-side { display: grid; grid-template-rows: repeat(2, 1fr); gap: 22px; }
.side-feature {
  display: grid; grid-template-columns: 45% 1fr; min-height: 254px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.side-feature > a { min-width: 0; overflow: hidden; }
.side-feature img, .side-feature .photo-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.side-feature:hover img { transform: scale(1.035); }
.side-feature-content { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 22px; }
.side-feature .eyebrow { margin-bottom: 8px; }
.side-feature h2 {
  display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  font-size: clamp(18px, 1.65vw, 23px); font-weight: 780; line-height: 1.25; letter-spacing: -.025em;
}

.section { padding-top: 64px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-title { margin: 0; color: var(--green); font-size: clamp(26px, 3vw, 36px); font-weight: 820; line-height: 1.1; letter-spacing: -.035em; }
.section-title::before { content: ""; display: inline-block; width: 9px; height: 27px; margin-right: 12px; border-radius: 5px; vertical-align: -3px; background: var(--lime); }
.section-link { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }

.activity-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 34px; }
.lead-card { display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.lead-card-media { min-height: 360px; overflow: hidden; }
.lead-card-media img, .lead-card-media .photo-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.lead-card:hover img { transform: scale(1.025); }
.lead-card-body { align-self: center; padding: 36px; }
.card-title { margin: 5px 0 13px; font-size: 27px; font-weight: 790; line-height: 1.23; letter-spacing: -.025em; }
.card-excerpt { display: -webkit-box; margin: 0 0 19px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--muted); font-size: 14px; }
.news-stack { display: grid; align-content: start; }
.stack-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 0 0 17px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.stack-item:last-child { margin-bottom: 0; }
.stack-thumb { width: 120px; height: 86px; overflow: hidden; border-radius: 9px; background: #dfe4df; }
.stack-thumb img, .stack-thumb .photo-placeholder { width: 100%; height: 100%; object-fit: cover; }
.stack-item h3 { display: -webkit-box; margin: 1px 0 7px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 16px; font-weight: 750; line-height: 1.3; }

.contest-band { margin-top: 68px; padding: 61px 0 67px; background: var(--sand); }
.contest-band .section-title { color: var(--green); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.photo-card { min-width: 0; }
.photo-card-media { display: block; position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 13px; background: var(--green); }
.photo-card-media img, .photo-card-media .photo-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.photo-card:hover img { transform: scale(1.04); }
.photo-card-body { padding: 15px 2px 0; }
.photo-card h3 { display: -webkit-box; margin: 7px 0 10px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 18px; font-weight: 750; line-height: 1.32; letter-spacing: -.015em; }

.columns-layout { display: grid; grid-template-columns: 1.32fr .68fr; gap: 45px; }
.portrait-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.portrait-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.portrait-card .photo-card-media { border-radius: 0; aspect-ratio: 5/4; }
.portrait-card .photo-card-body { padding: 22px 23px 24px; }
.portrait-card h3 { font-size: 22px; -webkit-line-clamp: 2; }
.talk-list { padding: 0 22px; border-radius: var(--radius); background: var(--green); }
.talk-item { display: grid; grid-template-columns: 43px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.talk-item:last-child { border: 0; }
.talk-number { color: var(--lime); font-size: 21px; font-weight: 850; line-height: 1.3; }
.talk-item h3 { display: -webkit-box; margin: 0 0 5px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.35; }
.talk-item h3 a:hover { color: var(--lime); }
.talk-item .meta { color: rgba(255,255,255,.45); }

.member-cta { margin-top: 68px; overflow: hidden; border-radius: var(--radius); color: #fff; background: var(--green); }
.member-cta-inner { min-height: 225px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 35px; padding: 42px 6%; position: relative; }
.member-cta-inner::after { content: ""; position: absolute; width: 190px; height: 190px; right: 24%; border: 38px solid rgba(201,214,107,.08); border-radius: 50%; }
.member-cta h2 { margin: 0 0 9px; font-size: clamp(27px,4vw,40px); font-weight: 820; line-height: 1.15; letter-spacing: -.035em; }
.member-cta p { max-width: 690px; margin: 0; color: rgba(255,255,255,.66); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid var(--lime); border-radius: 999px; color: var(--green); background: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.button:hover { color: var(--lime); background: transparent; }

.archive-header { padding: 42px 0 30px; border-bottom: 1px solid var(--line); }
.archive-kicker { color: var(--orange); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.archive-title { margin: 7px 0 8px; color: var(--green); font-size: clamp(36px,6vw,62px); font-weight: 850; line-height: 1.08; letter-spacing: -.045em; }
.archive-description { max-width: 720px; color: var(--muted); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px 24px; padding-top: 38px; }
.archive-grid .photo-card h3 { font-size: 21px; }
.pagination { margin-top: 42px; }
.pagination .nav-links { display: flex; gap: 7px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; background: #fff; }
.pagination .current { color: #fff; background: var(--green); }

.article-shell { display: grid; grid-template-columns: minmax(0, 820px) minmax(250px, 1fr); gap: 55px; align-items: start; }
.article-header { margin-bottom: 28px; }
.article-title { margin: 10px 0 17px; color: var(--green); font-size: clamp(36px,5vw,58px); font-weight: 850; line-height: 1.12; letter-spacing: -.045em; }
.article-featured { margin-bottom: 30px; overflow: hidden; border-radius: var(--radius); }
.article-content { font-size: 18px; line-height: 1.82; }
.article-content > p:first-child { font-size: 20px; font-weight: 650; }
.article-content h2, .article-content h3 { color: var(--green); line-height: 1.3; }
.article-content img { margin: 28px auto; border-radius: 10px; }
.sidebar-box { margin-bottom: 28px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.sidebar-title { margin: 0 0 14px; padding-bottom: 11px; border-bottom: 3px solid var(--lime); color: var(--green); font-size: 19px; font-weight: 800; }
.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-list li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; line-height: 1.4; }

.site-footer { color: rgba(255,255,255,.65); background: #0c2c23; }
.footer-main { display: grid; grid-template-columns: 1.25fr .75fr .8fr; gap: 55px; padding: 58px 0 45px; }
.footer-brand { color: #fff; font-size: 25px; font-weight: 820; line-height: 1.22; letter-spacing: -.03em; }
.footer-heading { margin: 0 0 15px; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.footer-main p { margin: 8px 0; font-size: 13px; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-links li { margin-bottom: 8px; font-size: 13px; }
.footer-bottom { padding: 17px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 11px; }

.photo-placeholder { position: relative; min-height: 100%; overflow: hidden; background: linear-gradient(145deg, #315f4f, #102c23); }
.photo-placeholder::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: -8%; height: 70%; opacity: .65; background: linear-gradient(150deg, transparent 49%, #587463 50% 64%, transparent 65%), linear-gradient(30deg, transparent 47%, #1e4437 48% 70%, transparent 71%); }
.photo-placeholder::after { content: "NHIẾP ẢNH SƠN LA"; position: absolute; right: 18px; bottom: 13px; color: rgba(255,255,255,.35); font-size: 9px; font-weight: 800; letter-spacing: .12em; }

@media (max-width: 1060px) {
  .masthead-quote { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .side-feature { min-height: 230px; }
  .activity-layout, .columns-layout, .article-shell { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 10px 24px 18px; background: var(--green); box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav a { padding: 11px 4px; }
  .nav-search { margin-left: auto; }
  .hero-main { grid-template-columns: 1fr; }
  .hero-main > a { min-height: 390px; }
  .hero-content { min-height: 310px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .topline-right, .brand-subtitle { display: none; }
  .masthead-inner { min-height: 102px; }
  .brand-mark { width: 55px; height: 55px; }
  .brand-overline { font-size: 8px; letter-spacing: .09em; }
  .brand-name { font-size: 27px; }
  .nav-search-form input { display: none; }
  .hero-main > a { min-height: 290px; }
  .hero-content { min-height: auto; padding: 28px 24px 30px; }
  .hero-title { font-size: 29px; -webkit-line-clamp: 3; }
  .hero-excerpt { -webkit-line-clamp: 3; }
  .hero-side, .lead-card, .portrait-grid { grid-template-columns: 1fr; }
  .side-feature { grid-template-columns: 42% 1fr; min-height: 190px; }
  .side-feature-content { padding: 17px; }
  .side-feature h2 { font-size: 18px; -webkit-line-clamp: 4; }
  .lead-card-media { min-height: 280px; }
  .lead-card-body { padding: 27px 24px; }
  .card-grid, .archive-grid { grid-template-columns: 1fr; }
  .member-cta-inner { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 30px; }
  .footer-links { columns: 1; }
}
