* { box-sizing: border-box; margin: 0; padding: 0; }

/* Irish flag: green #169B62, white, orange #FF883E */
:root {
  --green: #169b62; --green-dark: #0b5d3b; --green-deep: #073d27; --green-soft: #e6f4ed;
  --orange: #ff883e; --orange-dark: #b34d0a;
  --text: #17231d; --muted: #5b6b62; --bg: #f3f6f4; --card: #ffffff; --line: #dde6e0;
}
body { font-family: 'Cairo', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Header */
.flag-stripe { height: 5px; background: linear-gradient(to right, var(--green) 33.3%, #fff 33.3% 66.6%, var(--orange) 66.6%); }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.topbar .container { display: flex; gap: 1.5rem; align-items: center; min-height: 40px; }
.ticker { display: flex; gap: 0.6rem; align-items: center; min-width: 0; }
.ticker b { background: var(--orange); color: var(--text); border-radius: 3px; padding: 0 0.6rem; white-space: nowrap; }
.ticker a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker a:hover { color: var(--green-dark); }
.masthead { background: var(--card); }
.masthead .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.logo { display: flex; align-items: center; gap: 0.9rem; }
.logo-flag { direction: ltr; display: flex; width: 58px; height: 42px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.logo-flag i { flex: 1; background: var(--green); }
.logo-flag i:nth-child(2) { background: #fff; }
.logo-flag i:nth-child(3) { background: var(--orange); }
.logo strong { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.2; color: var(--green-dark); }
.logo em { font-style: normal; color: var(--orange-dark); }
.slogan { color: var(--muted); font-weight: 600; }

/* Navigation */
.mainnav { background: var(--green-dark); color: #fff; position: sticky; top: 0; z-index: 10; }
.mainnav ul { display: flex; flex-wrap: wrap; }
.mainnav a { display: block; padding: 0.8rem 0.95rem; font-weight: 700; font-size: 0.95rem; }
.mainnav a:hover { background: var(--green-deep); }
.mainnav a[aria-current="page"] { background: var(--orange); color: var(--text); }
.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.menu-button { display: none; cursor: pointer; font-weight: 700; padding: 0.75rem 0; }

/* Media panel used by every card */
.media { display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--green), var(--green-deep)); }
.media img { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.media:has(img) { grid-template: 100% / 100%; }
.media.tone-0 { background: linear-gradient(135deg, #2bb67a, var(--green-dark)); }
.media.tone-2 { background: linear-gradient(135deg, var(--orange), #8f3c06); }
.media.tone-3 { background: linear-gradient(135deg, #3c5a4b, #10241a); }
.media-icon { font-size: 2.5rem; }

/* Mosaic */
.mosaic { display: grid; grid-template-columns: 1fr 2fr 1fr; grid-template-rows: 190px 190px; gap: 6px; margin-top: 1.25rem; }
.tile { position: relative; display: flex; border-radius: 10px; overflow: hidden; color: #fff; }
.tile:first-child { grid-column: 2; grid-row: 1 / span 2; }
.tile:nth-child(2) { grid-column: 1; grid-row: 1; }
.tile:nth-child(3) { grid-column: 1; grid-row: 2; }
.tile:nth-child(4) { grid-column: 3; grid-row: 1; }
.tile:nth-child(5) { grid-column: 3; grid-row: 2; }
.tile .media { position: absolute; inset: 0; align-content: start; padding-top: 1.25rem; }
.tile .media:has(img), .tile:first-child .media:has(img) { padding: 0; align-content: stretch; }
.tile:first-child .media { align-content: center; padding: 0 0 3rem; }
.tile:first-child .media-icon { font-size: 6rem; }
.tile-text { position: relative; align-self: flex-end; width: 100%; padding: 2rem 0.9rem 0.8rem; background: linear-gradient(transparent, rgba(0,0,0,0.75)); }
.tile strong { display: block; font-size: 1rem; line-height: 1.5; }
.tile:first-child strong { font-size: 1.75rem; }
.tile:hover strong { text-decoration: underline; }
.chip { display: inline-block; background: var(--orange); color: var(--text); font-size: 0.75rem; font-weight: 700; border-radius: 20px; padding: 0 0.7rem; margin-bottom: 0.35rem; }

/* Page columns: content on the right, sidebar on the left */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; margin-top: 1.5rem; align-items: start; }
.column { display: grid; gap: 1.5rem; }
.block, .widget, .article, .lead-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.block, .widget { padding: 1.25rem; }
.block-title { border-bottom: 3px solid var(--green); margin-bottom: 1.1rem; font-size: 1.1rem; }
.block-title span { display: inline-block; background: var(--green); color: #fff; padding: 0.1rem 1rem; border-radius: 6px 6px 0 0; }
.block-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.lead-card { display: flex; flex-direction: column; align-items: flex-start; border: 0; }
.lead-card > a:first-child { align-self: stretch; }
.lead-card .media { height: 190px; border-radius: 8px; }
.lead-card .media-icon { font-size: 4rem; }
.lead-card h3 { font-size: 1.2rem; line-height: 1.5; margin: 0.8rem 0 0.4rem; }
.lead-card h3 a:hover, .row:hover strong, .links a:hover { color: var(--green-dark); text-decoration: underline; }
.lead-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.8rem; }
.more, .btn { display: inline-block; background: var(--green-dark); color: #fff; font-weight: 700; border-radius: 30px; padding: 0.35rem 1.3rem; font-size: 0.9rem; }
.more { margin-top: auto; }
.more:hover { background: var(--green-deep); }
.rows { display: grid; gap: 0.9rem; align-content: start; }
.row { display: flex; gap: 0.8rem; align-items: center; }
.row .media { flex: 0 0 90px; height: 68px; border-radius: 6px; }
.row .media-icon { font-size: 1.7rem; }
.row strong { display: block; font-size: 0.92rem; line-height: 1.5; }
.row-label { display: block; font-size: 0.75rem; color: var(--orange-dark); font-weight: 700; }

/* Sidebar */
.sidebar { display: grid; gap: 1.5rem; }
.widget-community { background: var(--green-dark); border-color: var(--green-dark); color: #fff; text-align: center; scroll-margin-top: 70px; }
.widget-community h2 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.widget-community p { font-size: 0.95rem; margin-bottom: 1rem; }
.widget-community .btn { background: var(--orange); color: var(--text); }
.links li { border-bottom: 1px solid var(--line); }
.links li:last-child { border-bottom: 0; }
.links a { display: block; padding: 0.55rem 0; font-weight: 600; direction: ltr; text-align: right; }

/* Guide and news pages */
.article { padding: 1.75rem; display: block; }
.article-head { border-bottom: 3px solid var(--green); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.article-head h1 { font-size: 2rem; line-height: 1.4; color: var(--green-deep); }
.article-head p { color: var(--muted); }
.article-photo { width: 100%; height: 320px; object-fit: cover; border-radius: 10px; margin-bottom: 1.5rem; }
.content .card { margin-bottom: 1.5rem; }
.content h1 { margin-bottom: 1rem; color: var(--green-deep); }
.content h2 { font-size: 1.3rem; color: var(--green-dark); border-right: 5px solid var(--orange); padding-right: 0.7rem; margin-bottom: 0.7rem; }
.content p { margin-bottom: 0.8rem; }
.content ul { list-style: disc; margin: 0 1.5rem 0.8rem 0; }
.content li { margin-bottom: 0.4rem; }
.content .highlight { background: var(--green-soft); border-radius: 10px; padding: 1.25rem; }
.page-title { margin-top: 1.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.grid .lead-card { border: 1px solid var(--line); padding: 1rem; }
.empty { text-align: center; color: var(--muted); padding: 3rem 0; }

/* Footer */
footer { background: var(--green-deep); color: #fff; margin-top: 2.5rem; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; padding-top: 2rem; padding-bottom: 1.5rem; }
.footer-grid h2 { font-size: 1.2rem; }
.footer-grid p { max-width: 460px; opacity: 0.85; }
.footer-grid a:hover { color: var(--orange); }
.copyright { text-align: center; font-size: 0.85rem; opacity: 0.75; border-top: 1px solid rgba(255,255,255,0.15); padding: 0.9rem; }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .slogan, #today { display: none; }
  .logo strong { font-size: 1.5rem; }
  .menu-button { display: block; }
  .menu-toggle:focus-visible + .menu-button { outline: 3px solid var(--orange); }
  .mainnav ul { display: none; flex-direction: column; padding-bottom: 0.5rem; }
  .menu-toggle:checked ~ ul { display: flex; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 230px 150px 150px; }
  .tile:first-child { grid-column: 1 / span 2; grid-row: 1; }
  .tile:nth-child(2) { grid-column: 1; grid-row: 2; }
  .tile:nth-child(3) { grid-column: 2; grid-row: 2; }
  .tile:nth-child(4) { grid-column: 1; grid-row: 3; }
  .tile:nth-child(5) { grid-column: 2; grid-row: 3; }
  .tile:first-child strong { font-size: 1.3rem; }
  .tile:not(:first-child) strong { font-size: 0.85rem; }
  .tile:not(:first-child) .chip { display: none; }
  .tile .media { padding-top: 0.5rem; }
  .block-body { grid-template-columns: minmax(0, 1fr); }
  .article { padding: 1.1rem; }
  .article-photo { height: 200px; }
  .article-head h1 { font-size: 1.5rem; }
}
