/*
 * Component: Region Header
 * Includes: Top Header, Main Header, Logo, Burger Toggle, Social List
 */

/* --- Top Header --- */
.wsdt-top-header {
  background-color: var(--color-primary);
  min-height: var(--top-header-height);
}

.wsdt-top-header .wsdt-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  min-height: var(--top-header-height);
}

/* Regions & Blocks Alignment Fix */
.wsdt-top-header .wsdt-region,
.wsdt-top-header .wsdt-block {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Mobile Fix for Top Header Center Alignment */
@media (max-width: 767px) {
  .wsdt-top-header .wsdt-container {
    justify-content: center;
    flex-direction: column;
    gap: var(--space-xs);
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
  }

  .wsdt-top-header .wsdt-region,
  .wsdt-top-header .wsdt-block {
    width: 100%;
    justify-content: center;
  }
}

/* Reset Margins inside Top Header */
.wsdt-top-header p,
.wsdt-top-header ul {
  margin: 0;
  padding: 0;
}

/* Contact Links in Header */
.wsdt-header-contact {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.wsdt-header-contact a {
  color: var(--link-dark-bg);
  font-size: var(--font-size-xs);
  transition: var(--transition-main);
}

.wsdt-header-contact a:hover {
  color: var(--link-dark-bg-hover);
  transform: translateY(-2px);
}

/* --- Main Header (Sticky) --- */
.wsdt-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-body);
  z-index: var(--z-header);
  transition: var(--transition-main);
  box-shadow: var(--shadow-card-idle);
  display: block;
}

body.is-scrolled .wsdt-header {
  top: 0;
  height: calc(var(--header-height) * 0.8);
  box-shadow: var(--shadow-card-hover);
}

/* Admin Toolbar Fix */
body.toolbar-fixed .wsdt-header {
  top: var(--drupal-displace-offset-top, 0) !important;
  z-index: 499; /* Below Drupal Toolbar */
}

.wsdt-header .wsdt-container {
  height: 100%;
}

.wsdt-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Logo Styling */
.wsdt-block-system-branding-block img {
  max-height: calc(var(--header-height) * 0.7);
  width: auto;
}

/* --- Social List (Global Component used in Header/Footer) --- */
.wsdt-social-list {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.wsdt-social-list li {
  width: var(--icon-wrapper-size);
  height: var(--icon-wrapper-size);
}

.wsdt-social-list a {
  width: 100%;
  height: 100%;
  transition: var(--transition-main);
  line-height: 1;
}

.wsdt-social-list a svg {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  fill: var(--link-dark-bg);
  transition: var(--transition-main);
}

.wsdt-social-list a:hover svg {
  fill: var(--link-dark-bg-hover);
}

.wsdt-social-list a:hover {
  transform: translateY(-3px);
}

/* --- Burger Toggle --- */
.wsdt-burger-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.wsdt-burger-line {
  width: 30px;
  height: 3px;
  background-color: var(--color-primary);
  transition: var(--transition-main);
}

/* --- Menu Visibility Control --- */
/* Hide Desktop Menu Globally (We use Burger on Desktop too) */
header.wsdt-header .wsdt-region--header-right nav:not(.wsdt-mobile-menu) {
  display: none !important;
}

.wsdt-region--header-right .wsdt-main-menu ul {
  display: none;
}
/*
 * Component: Region Footer
 * Includes: Main Footer Grid, Bottom Footer, Contact Info
 */

.wsdt-footer {
  background-color: var(--color-primary);
  color: var(--text-on-dark);
  padding-top: var(--space-xl);
  font-size: var(--font-size-base);
}

/* --- Main Footer Grid (Top Part) --- */
.wsdt-footer-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-xl);
}

@media (min-width: 1024px) {
  .wsdt-footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Typography & Headings --- */
.wsdt-footer h2 {
  color: var(--text-on-dark);
  font-size: var(--font-size-h3);
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
}

.wsdt-footer h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: calc(var(--space-xs) * -1);
  width: var(--decoration-line-width);
  height: var(--decoration-line-height);
  background-color: var(--color-secondary);
}

/* --- Lists & Menus --- */
.wsdt-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wsdt-footer li {
  margin: 0;
}

/* --- Link Animation: Underline Fill --- */
.wsdt-footer a {
  color: var(--text-on-dark-muted);
  text-decoration: none;
  position: relative;
  transition: var(--transition-main);
  display: inline-block;
  padding-bottom: var(--decoration-line-height);

  /* The Magic Line Effect */
  background-image: linear-gradient(
    to right,
    var(--color-secondary),
    var(--color-secondary)
  );
  background-size: 0% var(--decoration-line-height);
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: var(--transition-main);
}

.wsdt-footer a:hover,
.wsdt-footer a.is-active {
  color: var(--text-on-dark);
  background-size: 100% var(--decoration-line-height);
  transform: translateX(var(--space-xs));
}

/* --- Contact Info Block Styling --- */
.wsdt-footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.wsdt-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-on-dark-muted);
}

/* --- Footer Bottom --- */
.wsdt-footer-bottom {
  border-top: 1px solid var(--border-on-dark);
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);

  /* Grid Setup */
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
  grid-template-areas:
    "copy"
    "credits"
    "social";
  text-align: center;
}

/* Assign Areas */
.wsdt-region--footer-bottom-copy {
  grid-area: copy;
}
.wsdt-region--footer-bottom-credits {
  grid-area: credits;
}
.wsdt-region--footer-bottom-social {
  grid-area: social;
}

/* Social Icons Styling Override for Footer */
.wsdt-footer-bottom .wsdt-social-list {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-direction: row !important; /* Override vertical stack if inherited */
}

/* Reset Footer Link Styles for Social Icons (No underline, no right move) */
.wsdt-footer-bottom .wsdt-social-list a {
  padding-bottom: 0;
  background-image: none;
}

.wsdt-footer-bottom .wsdt-social-list a:hover {
  transform: translateY(-3px); /* Move UP only */
  background-size: 0;
}

.wsdt-footer-bottom .wsdt-social-list svg {
  fill: var(--text-on-dark-muted);
  transition: var(--transition-main);
}

.wsdt-footer-bottom .wsdt-social-list a:hover svg {
  fill: var(--text-on-dark);
}

/* --- Desktop Layout for Bottom --- */
@media (min-width: 1024px) {
  .wsdt-footer-bottom {
    /* Row 1: Copy | Credits, Row 2: Social */
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "copy credits"
      "social social";
    row-gap: var(--space-lg);
  }

  .wsdt-region--footer-bottom-copy {
    justify-self: start;
    text-align: left;
  }

  .wsdt-region--footer-bottom-credits {
    justify-self: end;
    text-align: right;
  }

  .wsdt-region--footer-bottom-social {
    justify-self: center;
  }
}
/*
 * Page Style: Default Layout Structure
 */

/* Page Wrapper */
.wsdt-page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wsdt-main-content {
  flex: 1;
}

/* Main Content Grid (Sidebar support) */
.wsdt-content-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .wsdt-content-grid.has-sidebar-left {
    grid-template-columns: var(--sidebar-width) 1fr;
  }
  .wsdt-content-grid.has-sidebar-right {
    grid-template-columns: 1fr var(--sidebar-width);
  }
}

/* Content Area */
.wsdt-content-area {
  padding: var(--space-lg) 0;
  /* Fix for Grid Overflow */
  min-width: 0;
  width: 100%;
}

/* Region Spacing */
.wsdt-region--content .wsdt-block {
  margin-bottom: var(--space-lg);
}
/*
 * Component: Page Hero & Breadcrumbs
 */

/* --- Hero Container --- */
.wsdt-page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: var(--space-xl) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* --- Dark Overlay --- */
.wsdt-page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-dark);
  z-index: var(--z-normal);
}

/* --- Container Content --- */
.wsdt-page-hero .wsdt-container {
  position: relative;
  z-index: var(--z-normal); /* 1 πάνω από το overlay */
}

/* --- Page Title Styling --- */
.wsdt-page-hero h1 {
  color: var(--text-on-dark);
  font-family: var(--font-heading);
  font-size: var(--font-size-h1);
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-transform: none;
  letter-spacing: 1px;
  text-shadow: var(--shadow-text);
}

/* Διόρθωση για nested div */
.wsdt-page-hero h1 > div {
  display: inline-block;
}

/* --- BREADCRUMBS STYLING --- */

.wsdt-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.wsdt-breadcrumb li {
  color: var(--text-on-dark);
  opacity: 0.8;
  font-size: var(--font-size-base);
  display: flex;
  align-items: center;
}

.wsdt-breadcrumb a {
  color: var(--text-on-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition-main);
}

.wsdt-breadcrumb a:hover {
  color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
  opacity: 1;
}

.wsdt-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-sm);
  color: var(--text-on-dark);
  opacity: 0.5;
}

.wsdt-breadcrumb li:last-child {
  color: var(--text-on-dark);
  font-weight: 700;
  opacity: 1;
  cursor: default;
}
