/* ============================================================
   Sustainable Energy Ireland — Archive 2002
   Reconstructed CSS for irish-energy.ie/sei-archive-2002/
   Original design: Labyrinth, a BT company (2002)
   Archive reconstruction: irish-energy.ie
   ============================================================ */

/* --- Colour Palette (matched from original source) --- */
:root {
  --teal-primary:    #00798C;
  --teal-dark:       #008B9A;
  --teal-darker:     #005663;
  --orange-accent:   #FF9A00;
  --orange-title:    #EC581C;
  --blue-secondary:  #31AACE;
  --blue-dark:       #2E698C;
  --purple-visited:  #514D80;
  --grey-toolbar:    #57595B;
  --black:           #000000;
  --white:           #ffffff;
  --bg-page:         #ffffff;
  --font-stack:      Verdana, Arial, Helvetica, sans-serif;
  --font-size-base:  9pt;
  --max-width:       820px;
  --sidebar-width:   170px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-stack);
  font-size: var(--font-size-base);
  color: var(--black);
  background-color: #f0f0f0;
}

/* --- Archive Banner (above all site chrome) --- */
.archive-banner {
  width: 100%;
  background-color: #fffbe6;
  border-bottom: 2px solid #e8c84a;
  padding: 7px 14px;
  font-family: var(--font-stack);
  font-size: 8pt;
  color: #333;
  text-align: center;
  line-height: 1.5;
}

.archive-banner a {
  color: var(--teal-primary);
  text-decoration: underline;
}

.archive-banner a:hover {
  color: var(--orange-title);
}

/* --- Page Wrapper --- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--white);
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  width: 100%;
  background-color: var(--white);
  padding: 0;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 14px 0 14px;
}

/* Logo */
.header-logo img {
  display: block;
  width: 160px;
  height: auto;
}

.header-logo-placeholder {
  display: block;
  width: 160px;
  height: 64px;
  background-color: #e8f5f7;
  border: 1px dashed var(--teal-primary);
  font-size: 7pt;
  color: var(--teal-primary);
  text-align: center;
  line-height: 64px;
}

/* Utility nav + search */
.header-utility {
  text-align: right;
  padding-top: 4px;
}

.header-utility .util-nav {
  font-family: var(--font-stack);
  font-size: 8.5pt;
  color: var(--grey-toolbar);
  margin-bottom: 5px;
}

.header-utility .util-nav a {
  color: var(--grey-toolbar);
  text-decoration: none;
}

.header-utility .util-nav a:hover {
  text-decoration: underline;
}

.header-utility .util-nav span.sep {
  margin: 0 4px;
  color: #999;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: flex-end;
}

.search-bar select,
.search-bar input[type="text"] {
  font-family: var(--font-stack);
  font-size: 8pt;
  border: 1px solid #999;
  padding: 2px 4px;
  height: 22px;
}

.search-bar select {
  width: 120px;
}

.search-bar input[type="text"] {
  width: 90px;
}

.search-bar .btn-go {
  background-color: var(--teal-primary);
  color: var(--white);
  font-family: var(--font-stack);
  font-size: 8pt;
  font-weight: bold;
  border: none;
  padding: 3px 8px;
  height: 22px;
  cursor: pointer;
}

.search-bar .btn-go:hover {
  background-color: var(--teal-dark);
}

.advanced-search-link {
  font-family: var(--font-stack);
  font-size: 8pt;
  color: var(--teal-primary);
  text-decoration: underline;
  display: block;
  text-align: right;
  margin-top: 2px;
}

.advanced-search-link:visited {
  color: var(--purple-visited);
}

/* Orange accent bar below logo */
.header-accent-bar {
  width: 18px;
  height: 18px;
  background-color: var(--orange-accent);
  margin: 6px 0 0 14px;
}

/* --- Hero Banner --- */
.hero-banner {
  width: 100%;
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Fallback when banner image not available */
.hero-banner-fallback {
  width: 100%;
  height: 90px;
  background: linear-gradient(to right, #2a7a7a 0%, #00798C 45%, #008B9A 60%, #005663 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 24px;
}

.hero-banner-fallback .hero-text {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-style: italic;
  font-size: 15pt;
  color: var(--white);
  text-align: right;
  line-height: 1.3;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* ============================================================
   MAIN LAYOUT — Sidebar + Content
   ============================================================ */

.main-layout {
  display: flex;
  align-items: flex-start;
  padding: 0;
  width: 100%;
}

/* ============================================================
   LEFT SIDEBAR
   ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 10px 0 10px 14px;
  font-family: var(--font-stack);
  font-size: 9pt;
}

/* Sidebar section block */
.sidebar-section {
  margin-bottom: 10px;
}

/* New to Site / Events box headers */
.sidebar-box-header {
  background-color: var(--orange-title);
  color: var(--white);
  font-weight: bold;
  font-size: 8.5pt;
  padding: 4px 8px;
  margin-bottom: 4px;
  border-radius: 0 6px 0 0;
}

.sidebar-box {
  margin-bottom: 12px;
}

.sidebar-box .item {
  margin-bottom: 8px;
  padding: 0 2px;
}

.sidebar-box .item-date {
  font-weight: bold;
  color: var(--black);
  font-size: 8.5pt;
  display: block;
}

.sidebar-box .item-title a {
  color: var(--teal-primary);
  text-decoration: none;
  font-size: 8.5pt;
}

.sidebar-box .item-title a:visited {
  color: var(--purple-visited);
}

.sidebar-box .item-title a:hover {
  text-decoration: underline;
}

/* --- Sidebar Navigation (inner pages) --- */
.sidenav {
  width: 100%;
}

.sidenav-section {
  margin-bottom: 2px;
}

/* Top-level nav section header */
.sidenav-header {
  background-color: var(--teal-dark);
  color: var(--white);
  font-weight: bold;
  font-size: 9pt;
  padding: 3px 0 3px 4px;
  display: block;
  text-decoration: none;
  width: 100%;
}

.sidenav-header:hover {
  background-color: var(--teal-primary);
}

/* Active/current section */
.sidenav-header.active {
  background-color: var(--teal-primary);
}

/* Secondary nav items (bold sub-items) */
.sidenav-secondary {
  display: flex;
  align-items: center;
  padding: 2px 0 2px 2px;
  gap: 4px;
}

.sidenav-secondary::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  background-color: var(--teal-primary);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  flex-shrink: 0;
}

.sidenav-secondary a {
  color: var(--black);
  text-decoration: none;
  font-weight: bold;
  font-size: 8.5pt;
}

.sidenav-secondary a:hover {
  text-decoration: underline;
}

/* Tertiary nav items (indented sub-sub-items) */
.sidenav-tertiary {
  padding: 1px 0 1px 22px;
}

.sidenav-tertiary a {
  color: var(--orange-title);
  text-decoration: none;
  font-size: 8.5pt;
}

.sidenav-tertiary a:visited {
  color: var(--purple-visited);
}

.sidenav-tertiary a:hover {
  text-decoration: underline;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.main-content {
  flex: 1;
  padding: 12px 14px 14px 16px;
  min-width: 0;
}

/* Page title */
.page-title {
  font-weight: bold;
  color: var(--orange-title);
  font-size: 10pt;
  margin: 0 0 14px 0;
}

/* --- Homepage 3-column content layout --- */
.home-columns {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 16px;
  align-items: start;
}

.home-main-col {
  /* left column — About Us, At Home, In Business, Schools */
}

.home-right-col {
  /* right column — Technologies, Publications */
}

/* Homepage content blocks */
.home-block {
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.home-block-text-only {
  margin-bottom: 18px;
}

.home-block-img {
  width: 60px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
  border: 0;
}

/* Placeholder for missing images */
.img-placeholder {
  width: 60px;
  height: 48px;
  background-color: #e8eeef;
  border: 1px solid #B1D1D4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6pt;
  font-style: italic;
  color: #999;
  text-align: center;
  line-height: 1.2;
}

.home-block-body h3,
.home-block-text-only h3 {
  margin: 0 0 5px 0;
  font-size: 9pt;
  font-weight: bold;
}

.home-block-body h3 a,
.home-block-text-only h3 a {
  color: var(--orange-title);
  text-decoration: none;
}

.home-block-body h3 a:visited,
.home-block-text-only h3 a:visited {
  color: var(--purple-visited);
}

.home-block-body h3 a:hover,
.home-block-text-only h3 a:hover {
  text-decoration: underline;
  color: var(--orange-title);
}

.home-block-body p,
.home-block-text-only p {
  margin: 0;
  font-size: 9pt;
  line-height: 1.4;
}

.home-block-body p a,
.home-block-text-only p a {
  color: var(--teal-primary);
  text-decoration: none;
}

.home-block-body p a:hover,
.home-block-text-only p a:hover {
  text-decoration: underline;
}

/* Right column boxes */
.right-box {
  margin-bottom: 12px;
}

.right-box-header {
  background-color: #B1D1D4;
  color: var(--black);
  font-weight: bold;
  font-size: 8.5pt;
  padding: 4px 8px;
  margin-bottom: 5px;
  border-radius: 0 6px 0 0;
}

.right-box p {
  font-size: 8.5pt;
  margin: 0 0 5px 0;
  line-height: 1.4;
}

.right-box p a {
  color: var(--teal-primary);
  text-decoration: none;
}

.right-box p a:hover {
  text-decoration: underline;
}

.right-box-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ccc;
  margin-bottom: 6px;
}

.right-box-img-placeholder {
  width: 100%;
  height: 50px;
  background-color: #d0d8da;
  border: 1px solid #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7pt;
  color: #666;
  margin-bottom: 6px;
}

/* Christmas link */
.christmas-link {
  font-size: 8.5pt;
  color: var(--teal-primary);
  text-decoration: none;
  display: block;
  margin-top: 8px;
}

.christmas-link:hover {
  text-decoration: underline;
}

/* Horizontal divider */
.content-rule {
  border: none;
  border-top: 1px solid #ccc;
  margin: 10px 0;
}

/* --- Inner page body text --- */
.body-text {
  font-size: 9pt;
  line-height: 1.5;
  color: var(--black);
}

.body-text h2 {
  font-size: 10pt;
  color: var(--teal-primary);
  font-weight: bold;
  margin: 14px 0 6px 0;
}

.body-text h3 {
  font-size: 9pt;
  color: var(--blue-dark);
  font-weight: bold;
  margin: 10px 0 4px 0;
}

.body-text p {
  margin: 0 0 10px 0;
}

.body-text a {
  color: var(--teal-primary);
  text-decoration: none;
}

.body-text a:visited {
  color: var(--purple-visited);
}

.body-text a:hover {
  text-decoration: underline;
}

.body-text ul {
  margin: 0 0 10px 0;
  padding-left: 20px;
}

.body-text li {
  margin-bottom: 4px;
}

/* "more..." link style */
a.more-link {
  color: var(--teal-primary);
  text-decoration: none;
  font-size: 9pt;
}

a.more-link:hover {
  text-decoration: underline;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  width: 100%;
}

/* Teal bar above footer content */
.footer-teal-bar {
  background-color: var(--teal-primary);
  height: 18px;
  width: 100%;
}

.footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 14px 14px 14px;
  gap: 16px;
}

/* NDP / EU logos area */
.footer-logos {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.footer-logos img {
  height: 44px;
  width: auto;
}

.footer-logo-placeholder {
  width: 54px;
  height: 44px;
  background-color: #ddd;
  border: 1px solid #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6.5pt;
  color: #666;
  text-align: center;
}

.footer-funded-text {
  font-family: var(--font-stack);
  font-size: 7.5pt;
  color: var(--black);
  line-height: 1.4;
  max-width: 200px;
}

/* Footer nav + copyright */
.footer-right {
  text-align: right;
}

.footer-nav {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.footer-nav a {
  background-color: var(--orange-title);
  color: #ffffff !important;
  font-family: var(--font-stack);
  font-size: 7.5pt;
  font-weight: bold;
  text-decoration: none;
  padding: 3px 10px 4px 10px;
  display: inline-block;
  border-radius: 0 0 6px 0;
}

.footer-nav a:link,
.footer-nav a:visited,
.footer-nav a:hover,
.footer-nav a:active {
  color: #ffffff !important;
}

.footer-nav a:hover {
  background-color: #c94410;
}

.footer-copyright {
  font-family: var(--font-stack);
  font-size: 8pt;
  color: var(--black);
  line-height: 1.5;
}

.footer-copyright a {
  color: var(--black);
  text-decoration: underline;
}

.footer-copyright a:hover {
  color: var(--teal-primary);
}

/* ============================================================
   GENERAL LINK STYLES
   ============================================================ */

a {
  font-family: var(--font-stack);
  font-size: 9pt;
}

a:link {
  color: var(--teal-primary);
}

a:visited {
  color: var(--purple-visited);
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   STUB PAGE NOTICE
   ============================================================ */

.stub-notice {
  background-color: #f5f5f0;
  border-left: 3px solid var(--teal-primary);
  padding: 10px 14px;
  margin: 14px 0;
  font-size: 8.5pt;
  color: #444;
  line-height: 1.5;
}

.stub-notice strong {
  color: var(--teal-primary);
}

/* ============================================================
   SCHEMA / SEO — visually hidden
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================================
   MOBILE NAV — hamburger elements (hidden on desktop)
   ============================================================ */

/* Mobile header bar — logo + hamburger on one row */
.mobile-header-bar {
  display: none;
}

/* Hamburger button */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--teal-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animated X state */
.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Full-width slide-down nav drawer */
.mobile-nav-drawer {
  display: none;
  background-color: var(--teal-dark);
  width: 100%;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mobile-nav-drawer.open {
  max-height: 600px;
}

/* Main nav links in drawer */
.mobile-nav-drawer nav a {
  display: block;
  color: var(--white);
  font-family: var(--font-stack);
  font-size: 11pt;
  font-weight: bold;
  text-decoration: none;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mobile-nav-drawer nav a:visited {
  color: var(--white);
}

.mobile-nav-drawer nav a:hover,
.mobile-nav-drawer nav a:active {
  background-color: var(--teal-primary);
  color: var(--white);
}

/* Utility strip at bottom of drawer */
.mobile-nav-utility {
  background-color: var(--teal-darker);
  padding: 10px 18px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.mobile-nav-utility a {
  color: rgba(255,255,255,0.8);
  font-family: var(--font-stack);
  font-size: 9pt;
  text-decoration: none;
}

.mobile-nav-utility a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Mobile search bar inside drawer */
.mobile-nav-search {
  padding: 10px 18px 14px;
  background-color: var(--teal-darker);
  display: flex;
  gap: 6px;
  align-items: center;
}

.mobile-nav-search input[type="text"] {
  flex: 1;
  font-family: var(--font-stack);
  font-size: 10pt;
  padding: 6px 8px;
  border: none;
  height: 34px;
}

.mobile-nav-search .btn-go {
  background-color: var(--orange-title);
  color: var(--white);
  font-family: var(--font-stack);
  font-size: 10pt;
  font-weight: bold;
  border: none;
  padding: 6px 14px;
  height: 34px;
  cursor: pointer;
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */

@media (max-width: 680px) {

  body {
    font-size: 16px;
  }

  :root {
    --font-size-base: 14px;
  }

  .page-wrapper {
    border: none;
  }

  /* Hide desktop header elements */
  .header-top {
    display: none;
  }

  .header-accent-bar {
    display: none;
  }

  /* Show mobile header bar */
  .mobile-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: var(--white);
    border-bottom: 1px solid #e0e0e0;
  }

  .mobile-header-bar .header-logo img {
    width: 120px;
    height: auto;
    display: block;
  }

  .mobile-header-bar .header-logo-placeholder {
    width: 120px;
    height: 48px;
    line-height: 48px;
  }

  /* Show hamburger */
  .hamburger-btn {
    display: flex;
  }

  /* Show drawer */
  .mobile-nav-drawer {
    display: block;
  }

  /* Hero */
  .hero-banner-fallback {
    height: 70px;
    padding-right: 12px;
  }

  .hero-banner-fallback .hero-text {
    font-size: 11pt;
  }

  /* Hide desktop sidebar entirely on mobile */
  .sidebar {
    display: none;
  }

  /* Main layout full width */
  .main-layout {
    flex-direction: column;
  }

  .main-content {
    padding: 12px 12px 16px 12px;
  }

  /* Homepage columns become single column */
  .home-columns {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-right-col {
    border-top: 1px solid #ddd;
    padding-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 12px;
  }

  .footer-right {
    text-align: left;
    width: 100%;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .footer-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .home-block-body h3 a,
  .home-block-text-only h3 a {
    font-size: 14px;
  }

  .archive-banner {
    font-size: 11px;
    text-align: left;
  }

  .archive-banner {
    font-size: 11px;
    text-align: left;
  }

}

@media (max-width: 400px) {
  .home-right-col {
    grid-template-columns: 1fr;
  }
}
