/* ==========================================================
   COSTA HARALAMBIS - Static HTML Site CSS
   This file only contains structural CSS for things that are
   genuinely new in the static conversion (search page, the static
   listing pages, mobile nav toggle, back-to-top button) or that
   GeneratePress generates dynamically per-page and so don't exist
   as static rules anywhere (translate flags, post-card grid).

   Base typography, colors, resets, and the Overlock font are all
   handled by the real theme files loaded before this one:
   main.min.css, fonts.css, style.min.css, featured-images.min.css,
   blog-style.min.css. Do not duplicate those rules here.
   ========================================================== */

img {
    max-width: 100%;
    height: auto;
    box-shadow: 5px 5px 5px lightgray;
}

/* Hide Google Translate's own top banner bar after switching language.
   Google injects this itself (and pushes the page down with an inline
   body style); both lines below are needed to fully suppress it. */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important;
}

/* Page wrapper width is controlled by the real .grid-container rule
   in style.min.css (1400px). No override needed here. */

/* --- HEADER --- */
.site-header {
    padding: 30px 40px 20px;
    text-align: center;
}

.site-branding { text-align: center; }

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

/* .main-title and .site-description are styled by the real
   theme CSS (style.min.css) loaded earlier - not duplicated here. */

/* --- TRANSLATE FLAGS --- */
#flags-wrapper {
    text-align: right;
    margin: 10px 28px 0;
}

#google_translate_element {
    margin-bottom: 4px;
}
#google_translate_element select.goog-te-combo {
    width: 143px;
    background: #fff;
    box-shadow: none !important;
    padding: 3px !important;
    height: auto !important;
    border: 1px solid lightgray !important;
    border-radius: 0 !important;
    font-size: 13px;
}

#flags {
    display: inline-block;
    overflow: hidden;
    text-align: right;
}

#flags ul {
    margin: 0;
    padding: 0;
    display: block;
    text-align: right;
}

#flags li {
    float: left !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: none !important;
    list-style: none !important;
}

#flags li:before {
    content: none !important;
    border: none !important;
    background: none !important;
}

#flags a,
.tool-container .tool-items a {
    display: inline-block;
    cursor: pointer;
}

/* Flag sizes - 22px used by the site */
#flags.size22 a {
    width: 22px !important;
    height: 17px !important;
    box-sizing: content-box;
    display: inline-block;
    margin: 1px;
}

.goog-te-gadget img { box-shadow: none !important; }

.translate-attribution {
    font-size: 11px;
    color: #666;
    font-family: Arial, sans-serif;
    margin-top: 2px;
    text-align: right;
}

/* Flag backgrounds for 22px (the 7 flags used: fr, en, de, it, es, el, km) */
#flags.size22 a[title="French"] { background: url('../flags-images/flags22.png') -117px -90px no-repeat; }
#flags.size22 a[title="German"] { background: url('../flags-images/flags22.png') -30px -119px no-repeat; }
#flags.size22 a[title="Italian"] { background: url('../flags-images/flags22.png') -59px -177px no-repeat; }
#flags.size22 a[title="English"] { background: url('../flags-images/flags22.png') -88px -351px no-repeat; }
#flags.size22 a[title="Spanish"] { background: url('../flags-images/flags22.png') -1px -322px no-repeat; }
#flags.size22 a[title="Greek"] { background: url('../flags-images/flags22.png') -59px -119px no-repeat; }
#flags.size22 a[title="Khmer"] { background: url('../flags-images/flags22.png') -1px -206px no-repeat; }

/* --- NAVIGATION --- */
.main-navigation {
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 0 40px;
    position: relative;
}

/* Real theme's .inside-navigation uses justify-content:space-between,
   which only centers content when there are two flex items (menu +
   search/social icon). This site has just the one menu, so without an
   override it sits flush left instead of centered. */
.main-navigation .inside-navigation {
    justify-content: center;
}

.main-nav { margin: 0; padding: 0; }

.main-nav > ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav > ul > li > a {
    display: block;
    padding: 15px 18px;
    color: #3d3d3d;
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a {
    color: #1e73be;
}

/* Underline hover effect */
.main-nav > ul > li > a::after {
    content: "";
    position: absolute;
    right: 0;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    display: block;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: 0.3s width ease;
}

.main-nav > ul > li.current-menu-item > a::after,
.main-nav > ul > li > a:hover::after {
    width: 50%;
}

/* Dropdown submenu visibility, positioning, and hover reveal are
   handled entirely by the real theme CSS (main.min.css uses an
   off-screen + opacity technique, not display:none/block) - not
   duplicated or overridden here. Only the dropdown arrow indicator
   below is genuinely new. */

/* Dropdown arrow */
.main-nav > ul > li.menu-item-has-children > a::before {
    content: " ▾";
    font-size: 12px;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(0,0,0,0.2);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    margin: 8px 0;
}

/* --- PAGE HEADER (category/listing pages) --- */
.page-header {
    text-align: center;
    padding: 30px 0 10px;
}

/* .page-title uses the real h1 styling from style.min.css
   (Georgia, 36px, accent color) - not duplicated here. */
.page-title {
    margin-bottom: 10px;
}

.page-description {
    font-size: 18px;
    font-style: italic;
    font-weight: 700;
    color: #3d3d3d;
    margin-bottom: 5px;
}

/* Category/tag archive grid now uses GeneratePress's real
   .generate-columns / .generate-columns-container classes, styled by
   featured-images.min.css, blog-style.min.css, and additional-css.css.
   No custom grid CSS needed here. The real card spacing (negative margin
   on entry-header, 10px under the image, line-height on the excerpt)
   already comes from additional-css.css - not duplicated or overridden here. */

/* Read more */
.read-more-link {
    color: #1e73be;
    font-size: 14px;
}

/* additional-css.css sets entry-summary to a hardcoded line-height of
   26px; matching the rest of the site's 1.4 ratio reads tighter. */
.generate-columns .inside-article .entry-summary {
    line-height: 1.4;
}

/* --- SEPARATOR BETWEEN POSTS (one-column layout) --- */
.site-main > article:not(:last-child)::after {
    content: "";
    border-bottom: 1px solid rgba(0,0,0,0.3);
    display: block;
    max-width: 400px;
    margin: 0 auto 60px;
}

/* --- SINGLE POST / PAGE --- */
/* Width comes from the real .inside-article padding in style.min.css.
   No max-width override here. */

.entry-header {
    text-align: center;
}

.post-featured-image {
    margin-top: 3em;
    margin-bottom: 60px;
    text-align: center;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
}

.post-featured-image:hover { opacity: 0.95; }

.entry-title-single {
    font-size: 28px;
    font-weight: 700;
    color: #1e73be;
    line-height: 1.3;
    margin-bottom: 8px;
}

.entry-date {
    font-family: Georgia, serif;
    font-size: 110%;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 0.5em;
    color: #3d3d3d;
}

.entry-publication {
    font-family: Georgia, serif;
    font-size: 110%;
    font-weight: 700;
    margin-top: 4px;
    color: #3d3d3d;
}

.entry-lead {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    margin-top: 1.5em;
    margin-bottom: 1em;
}

.entry-content {
    margin-top: 3em;
}

.entry-content p { margin-bottom: 1.5em; }

/* PDF embed */
.pdf-embed-wrapper {
    margin: 30px 0;
    border: 1px solid rgba(0,0,0,0.1);
}

.pdf-embed-wrapper embed,
.pdf-embed-wrapper iframe {
    width: 100%;
    min-height: 600px;
    display: block;
}

.pdf-fullwindow-btn {
    display: inline-block;
    background: #1e73be;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 3px 3px 0 0;
}

.pdf-fullwindow-btn:hover {
    background: #155a94;
    text-decoration: none;
}

.pdf-mobile-viewer {
    display: none;
}

/* Copyright notice - matches real site: centered, italic, no border/box */
.article-copyright {
    text-align: center;
    font-style: italic;
    font-size: 16px;
    color: #555;
    margin: 20px 0 0;
}

/* .entry-meta / .cat-links / .tags-links styling, including the
   "dans:"/"par:" prefixes, comes from additional-css.css (the real
   site's manual customizer overrides) - not duplicated here. */

/* Post navigation - real site stacks prev/next centered, one per line,
   no border or flex layout. additional-css.css sets this to a smaller
   percentage (80%); explicit 16px here instead. */
.nav-previous, .nav-next {
    text-align: center;
}

.nav-previous .gp-icon, .nav-next .gp-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    color: #1e73be;
}

.nav-previous .gp-icon { margin-right: 6px; }
.nav-next .gp-icon { margin-left: 6px; }

.post-navigation a { color: #1e73be; text-decoration: none; }
.post-navigation a:hover { text-decoration: underline; }
.post-navigation { font-size: 16px !important; }

/* --- FULL LISTING (par dates) --- */
.listing-par-dates {
    font-family: Overlock, sans-serif;
    font-size: 20px;
    line-height: 1.4;
    counter-reset: listing;
}

.listing-par-dates .listing-item {
    display: block;
    margin-bottom: 3px;
    counter-increment: listing;
}

.listing-par-dates .listing-item::before {
    display: inline;
    content: counter(listing) ". ";
}

.listing-par-dates .listing-title-link {
    color: #1e73be;
    text-decoration: none;
}

.listing-par-dates .listing-title-link::after {
    content: " - ";
    color: #3d3d3d;
}

.listing-par-dates .listing-meta {
    font-size: 90%;
    color: #555;
    display: inline;
}

.listing-year-heading {
    font-size: 20px;
    font-weight: 700;
    color: #1e73be;
    margin: 30px 0 10px;
    text-align: center;
    font-style: italic;
}

/* --- LISTING PAR PUBLICATIONS --- */
.listing-par-publications ul {
    list-style: disc;
    margin-left: 20px;
    line-height: 1.4;
}

.listing-par-publications li a {
    color: #1e73be;
}

/* --- PAGINATION --- */
/* additional-css.css declares margin-top: 2em on this same rule, then
   immediately cancels it with margin: 0px further down - a bug in that
   file. !important needed here since it loads after costa.css. */
.nav-links {
    margin-top: 40px !important;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    color: #96C0CE;
    border: solid 1px #1e73be;
    background-color: #f9f9f9;
    display: block;
    padding: 12px;
}

.page-numbers {
    padding: 4px 10px;
    color: #1e73be;
}

.page-numbers.current {
    font-weight: 900;
    color: #96C0CE;
}

/* --- SEARCH PAGE --- */
.search-page {
    padding: 30px 0;
}

.search-page h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1e73be;
    text-align: center;
    margin-bottom: 30px;
}

.search-form-wrapper {
    background: #f9f9f9;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.search-field-group {
    flex: 1;
    min-width: 150px;
}

.search-field-group label {
    display: block;
    font-size: 13px;
    font-style: italic;
    color: #666;
    margin-bottom: 4px;
}

.search-field-group input[type="text"],
.search-field-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid lightgray;
    border-radius: 0;
    font-size: 15px;
    background: #fff;
}

.search-field-group input[type="text"]:focus,
.search-field-group select:focus {
    outline: none;
    border-color: #1e73be;
}

.search-submit-btn {
    background: #1e73be;
    color: #fff;
    border: 1px solid #1e73be;
    padding: 9px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-transform: uppercase;
}

.search-submit-btn:hover {
    background: #155a94;
}

#search-results {
    margin-top: 20px;
}

.search-result-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.search-result-item h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.search-result-item h3 a { color: #1e73be; }
.search-result-item h3 a:hover { text-decoration: underline; }

.search-result-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.no-results-msg {
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

/* --- HOMEPAGE --- */
.homepage-intro {
    padding: 30px 0;
    line-height: 1.8;
    font-size: 16px;
}

.homepage-intro p { margin-bottom: 1.5em; }

.homepage-bio {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 30px;
}

.homepage-bio img {
    width: 160px;
    flex-shrink: 0;
}

/* --- FOOTER --- */
.site-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-top: 40px;
    padding: 20px 40px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

.site-footer a { color: #1e73be; }

.footer-sep {
    margin: 0 6px;
    color: #ccc;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #3d3d3d;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 999;
}

.back-to-top.visible { opacity: 1; }
.back-to-top:hover { background: #f0f0f0; text-decoration: none; }

/* --- SIDEBAR (if used) --- */
.sidebar .widget {
    border: 1px solid rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.widget-title::after {
    content: "";
    border-bottom: 1px solid;
    display: block;
    width: 30px;
    padding-top: 10px;
}

/* --- STATIC PAGES (about page layout) --- */
/* Width comes from the real .inside-article padding in style.min.css.
   Line-height comes from the real theme's body rule (1.4) - not
   overridden here. */
.page-content {
    margin: 30px auto 0;
}

.page-content p { margin-bottom: 1.5em; }
.page-content a { color: #1e73be; }

/* The real .one-container .inside-article bottom padding (60px) exists
   to space an article from the next one in a list. These standalone
   page templates (homepage, sitemap, listing pages, single articles)
   are the only article on their page, and that padding was stacking
   with .site-content's own real bottom padding, doubling the gap
   before the footer. */
article.page .inside-article,
article.post .inside-article {
    padding-bottom: 0;
}

/* --- NOTICES / COPYRIGHT BLOCKS --- */
.copyright-notice {
    font-style: italic;
    font-size: 16px;
    color: #555;
    text-align: center;
    margin: 20px 0;
}

.rights-list {
    list-style: disc;
    margin-left: 30px;
    line-height: 1.4;
    font-size: 20px;
}

.rights-list li { margin-bottom: 10px; }

/* Sitemap's long article list: same spacing pattern as listing-par-dates,
   not the rights-list spacing (that's meant for the short copyright list). */
.sitemap-articles {
    list-style: disc;
    margin-left: 30px;
    font-size: 20px;
    line-height: 1.4;
}
.sitemap-articles li { margin-bottom: 3px; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .site-header { padding: 20px; }
    .main-title { font-size: 32px; }
    .main-navigation { padding: 0 20px; }

    .inside-navigation { flex-direction: column; }
    .main-navigation .main-nav > ul { display: none; flex-direction: column; }
    .main-navigation .main-nav > ul.open { display: flex; }
    .nav-toggle { display: block; }
    .main-nav { width: 100%; }

    .main-nav .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
    }

    /* Mobile browsers generally can't render an embedded PDF inline at all
       (no plugin fallback like desktop has), they just show a broken/empty
       box or an error. pdf-mobile-viewer.js renders the actual page(s)
       instead, plain, no buttons - "View full window" covers that need. */
    .pdf-embed-wrapper embed,
    .pdf-embed-wrapper iframe {
        display: none;
    }
    .pdf-mobile-viewer {
        display: block;
        margin-top: 6px;
    }
    .pdf-fullwindow-btn {
        border-radius: 3px;
        display: block;
        text-align: center;
        color: #fff !important;
        background: #1e73be !important;
    }
    .pdf-embed-wrapper {
        border: none;
    }

    .content-area { padding: 0 20px; }

    .search-fields { flex-direction: column; }

    .homepage-bio { flex-direction: column; }
    .homepage-bio img { width: 100%; max-width: 200px; }

    .main-nav > ul > li.social-icon { display: inline-block !important; }

    #flags-wrapper { text-align: center; }
    .translate-attribution { text-align: center; }
}

@media (max-width: 480px) {
    .main-title { font-size: 26px; }
    .site-description { font-size: 15px; }
}

