/*
Theme Name: Open Data
Theme URI: https://example.com/opendata
Author: minoanDesign
Author URI: https://minoandesign.gr
Description: Ένα custom θέμα για open data, φτιαγμένο για WordPress.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opendata
*/

/* =General Styles */
@font-face {
  font-family: 'StoneSansSemiBold';
  src: url('assets/fonts/StoneSansITCHellenic-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'StoneSansBook';
  src: url('assets/fonts/StoneSansITCHellenic-Book.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body, p, span, li {
  font-family: 'StoneSansBook';
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'StoneSansSemiBold';
}

/* =Global Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'StoneSansBook';
  color: #333;
  background-color: #f8f8f8;
}

a {
  color: #1e73be;
  text-decoration: none;
}

/* Ουδέτερο container – ΧΩΡΙΣ flex */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =Header Styles */
.site-header {
  background-color: #1b4445;
  color: white;
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 100;
  border-bottom: 10px solid #143536;
  width: 100%;
}

/* Flex ΜΟΝΟ στο header */
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Alignment */
.logo {
  flex-shrink: 0;
}
.logo img {
  max-height: 90px;
  width: auto;
}

.site-title {
  font-size: 1.3rem !important;
  font-weight: bold;
  color: white;
}

.main-menu {
  display: flex;
  gap: 20px;
}
.main-menu .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.main-menu .menu li { margin: 0; }
.main-menu .menu li a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  transition: background-color 0.3s;
}
.main-menu .menu li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.main-menu .menu .current-menu-item > a,
.main-menu .menu .current_page_item > a,
.main-menu .menu .current-page-ancestor > a {
  color: white;
  font-weight: bold;
}
.main-menu .menu .current-menu-item > a::after,
.main-menu .menu .current_page_item > a::after,
.main-menu .menu .current-page-ancestor > a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 10px;
  right: 10px;
  height: 2px;
  background-color: #a0d5b3;
}
/* Underline for Active Menu Item */
.main-menu .menu li.current-menu-item a { text-decoration: underline; }

/* =Footer Styles */
.site-footer {
  background-color: #1b4445;
  color: white;
  padding: 20px;
  margin-top: 60px;
}

/* Flex ΜΟΝΟ στο footer – κάθετα: μενού πάνω, copyright κάτω */
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* βάλε center αν θες κεντραρισμένα */
  gap: 10px;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
}

.site-footer .footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;            /* μη σπρώχνει προς τα κάτω το copyright */
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-footer .footer-nav ul li { margin: 0; }

/* Το underline στα links (όχι στο ul) */
.site-footer .footer-nav ul li a {
  color: #fff;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}
.site-footer .footer-nav ul li a:hover { color: #ddd; }

/* =FRONT PAGE CSS */
.main-section {
  display: flex;
  justify-content: space-between;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.left-column {
  width: 48%;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
}
.left-column h2 {
  font-size: 2rem;
  color: #1b4445;
}
.left-column p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 20px 0;
}
.left-column .cta-button {
  background-color: #1b4445;
  color: white;
  padding: 10px 20px;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 5px;
}
.left-column .cta-button:hover { background-color: #8bc8a2; }

.right-column {
  width: 50%;
  padding: 20px;
  background-color: #f1f1f1;
  border-radius: 8px;
}
.right-column h3 {
  font-size: 1.4rem;
  color: #1b4445;
  margin-bottom: 20px;
}
.latest-datasets {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dataset-item {
  background-color: white;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.dataset-item h4 { font-size: 1.3rem; margin-bottom: 10px; }
.dataset-item a { color: #1b4445; text-decoration: none; font-weight: bold; }
.dataset-item a:hover { color: white; }

/* =Categories Section */
.categories-section {
  margin-top: 60px;
  text-align: center;
  max-width: 1200px;
  margin: 60px auto;
}
.categories-section h3 {
  font-size: 1.8rem;
  color: #1b4445;
  margin-bottom: 40px;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}
.category-item {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}
.category-item img { max-width: 50px; margin-bottom: 10px; }
.category-item p { font-size: 1.1rem; color: #1b4445; }
.category-item:hover {
  transform: translateY(-5px);
  background-color: #f0f0f0;
}

/* =Responsive Styles */
@media (max-width: 768px) {
  .main-section {
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .left-column, .right-column {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .dataset-item { flex-wrap: wrap; max-width: 100%; }
  .dataset-content { min-width: 0; }
}

/* =Categories Section with Icons */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.category-item {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.category-item i {
  font-size: 3rem;
  color: #1b4445;
  margin-bottom: 10px;
}
.category-item p { font-size: 1.1rem; color: #1b4445; }
.category-item:hover { transform: translateY(-5px); background-color: #f0f0f0; }
.category-item:hover i { color: #a0d5b3; }
.category-item:hover p { color: #8bc8a2; }

/* =Search Box */
.search-box {
  display: flex;
  align-items: center;
  margin-top: 20px;
}
.search-box input {
  padding: 10px;
  font-size: 1rem;
  width: 70%;
  border-radius: 5px;
  border: 1px solid #ddd;
  margin-right: 10px;
}
.search-box .search-button {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #1b4445;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}
.search-box .search-button:hover { background-color: #1d6260; }

/* =Responsive Styles for Search Box */
@media (max-width: 768px) {
  .search-box { flex-direction: column; align-items: flex-start; }
  .search-box input { width: 100%; margin-bottom: 10px; }
  .search-box .search-button { width: 100%; }
}

/* =Latest Datasets Section */
.latest-datasets { display: flex; flex-direction: column; gap: 20px; }

/* =Dataset Item */
.dataset-item {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  margin: 0;
}
.dataset-item:hover { transform: translateY(-5px); background-color: #f9f9f9; }

/* =Dataset Icon */
.dataset-icon { flex-shrink: 0; margin-right: 20px; }
.dataset-icon i {
  font-size: 3rem;
  color: #1b4445;
  vertical-align: middle;
}

/* =Dataset Content */
.dataset-content { flex-grow: 1; margin-top: 0; }
.dataset-content h4 {
  font-size: 1.4rem;
  color: #1b4445;
  margin-top: 0;
  margin-bottom: 10px;
}
.dataset-content p { font-size: 1rem; color: #666; margin-bottom: 15px; }
.dataset-content .cta-button {
  background-color: #1b4445;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.dataset-content .cta-button:hover { background-color: #1d6260; }

/* =Counter Section */
.counter-section { margin-top: 20px; display: flex; align-items: baseline; }
.counter-number {
  font-size: 9rem;
  color: #1b4445;
  font-weight: bold;
  margin-right: 10px;
}
.counter-label { font-size: 1.6rem; color: #666; font-weight: normal; }

/* Burger πάνω δεξιά */
.menu-toggle {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
  z-index: 999;
}

/* Mobile & Tablet Burger Menu Styles */
@media (max-width: 1024px) {
  .main-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 15px;
  }
  .main-menu.mobile-visible { display: flex; }
  .main-menu .menu { flex-direction: column; width: 100%; }
  .main-menu .menu li a {
    padding: 10px 0;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  .menu-toggle { display: block; }

  /* Σκοπευμένο ΜΟΝΟ για header container, όχι για ΟΛΑ τα containers */
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-title { margin-top: 10px; }
}

/* DATASETS RESULTS */
.datasets-wrapper {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  gap: 30px;
  font-family: 'StoneSansBook', serif;
}
.datasets-sidebar {
  width: 100%;
  max-width: 250px;
  flex-shrink: 0;
}
.datasets-sidebar h3 {
  margin-top: 0;
  color: #fff;
  font-size: 1.2em;
  margin-bottom: 15px;
  background-color: #1b4445;
  padding: 10px 15px;
  border-radius: 4px;
}
.datasets-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f9f9f9;
}
.datasets-sidebar li {
  margin: 0;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 15px;
  transition: background 0.3s;
}
.datasets-sidebar li:last-child { border-bottom: none; }
.datasets-sidebar li:hover { background-color: #eef6f6; }
.datasets-sidebar a {
  text-decoration: none;
  color: #2980b9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.datasets-sidebar .category-icon { font-size: 12px; color: #999; }
.datasets-sidebar ul ul {
  border: none;
  padding-left: 15px;
  margin-top: 5px;
  font-size: 0.9em;
  background-color: transparent;
}
.datasets-sidebar ul ul li {
  padding: 6px 10px;
  border: none;
  margin-bottom: 2px;
}

/* ✅ Highlight active category */
.category-link.active {
  background-color: #eaf7f7;
  font-weight: bold;
  border-left: 4px solid #1b4445;
}
.category-link.active {
  border-left-width: 0 !important;
  border-left-style: none !important;
  border-left-color: transparent !important;
}

.datasets-container { flex: 1; min-width: 0; }
.datasets-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #2c3e50;
  font-size: 2em;
}
.search-box { text-align: center; margin-bottom: 20px; }
.search-box input { padding: 8px; width: 300px; }
.search-button { padding: 8px 15px; background: #1b4445; color: #fff; border: none; cursor: pointer; }

.dataset {
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fdfdfd;
}
.dataset-category-meta {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  color: #666;
}
.file-type-summary {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  font-size: 0.9em;
  color: #444;
  flex-wrap: wrap;
}
.file-type-summary span {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eef6f6;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #d0e7e7;
}

@media screen and (max-width: 768px) {
  .datasets-wrapper { flex-direction: column; }
  .datasets-sidebar { width: 100%; max-width: none; margin-bottom: 30px; }
}

.category-link.active {
  background-color: #eaf7f7;
  font-weight: bold;
  border-left: 4px solid #1b4445;
}

/* Style for sort dropdown */
.search-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search-box select {
  padding: 8px;
  height: 38px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  border-radius: 4px;
  outline: none;
  vertical-align: middle;
}

.pagination { text-align: center; margin-top: 20px; }
.pagination-button {
  background-color: #1b4445;
  color: #fff;
  border: none;
  padding: 8px 12px;
  margin: 0 4px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s;
}
.pagination-button:hover { background-color: #145050; }

/* TABS BUTTON FRONT PAGE */
.content-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}
.tab-button {
  padding: 10px 15px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #666;
}
.tab-button.active {
  color: #1b4445;
  border-bottom: 3px solid #1b4445;
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.news-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}
.news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.news-date { color: #777; font-size: 0.9em; }

/* ===========================
   Desktop-only menu container (no wrap)
   =========================== */
@media (min-width: 1025px) {
  .site-header .main-menu {
    display: inline-block;
    background: #fff;
    border-radius: 12px;
    padding: 6px 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-left: 16px;
  }
  .site-header .main-menu .menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .site-header .main-menu .menu > li { flex: 0 0 auto; }
  .site-header .main-menu .menu a {
    white-space: nowrap;
    color: #000;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
  }
  .site-header .main-menu .menu a:visited { color: #000; }
  .site-header .main-menu .menu a:hover,
  .site-header .main-menu .menu a:focus {
    background: rgba(0,0,0,0.08);
    text-decoration: none;
  }
  .site-header .main-menu .menu .current-menu-item > a,
  .site-header .main-menu .menu .current_page_item > a,
  .site-header .main-menu .menu .current-page-ancestor > a {
    background: rgba(0,0,0,0.12);
    font-weight: 700;
    text-decoration: none;
  }
  .site-header .main-menu .menu .current-menu-item > a::after,
  .site-header .main-menu .menu .current_page_item > a::after,
  .site-header .main-menu .menu .current-page-ancestor > a::after {
    content: none !important;
  }
}

/* --- Desktop fine-tuning για τον τίτλο & λίγο “σφίξιμο” στο menu --- */
@media (min-width: 1025px) {
  .site-header .site-title {
    white-space: nowrap;
    font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  }
  .site-header .main-menu { padding: 4px 6px; margin-left: 12px; }
  .site-header .main-menu .menu a { padding: 6px 10px; }
}
