/*
Theme Name: Scholara v4.10
Theme URI: https://www.nunotrindade.com
Author: Nuno Verdelho Trindade
Author URI: https://www.nunotrindade.com
Description: A fast worpress theme for scholars homepages.
Version: 4.10.0
License: Copyright Nuno Verdelho Trindade All Rights Reserved
Text Domain: nuno.verdelho.trindade
*/
:root { --text:#222; --muted:#555; --muted2:#6c757d; --line:#e6e6e6; --blue1:#0d6efd; --blue2:#0aa1ff; --container-max:1100px; }
html,body{margin:0;padding:0}
body{font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif;color:var(--text);background:#fff;}
.container{max-width:var(--container-max);margin:0 auto;padding:0 16px;}
/* Header */
.site-header{background:linear-gradient(90deg,var(--blue1),var(--blue2));color:#fff;position:sticky;top:0;z-index:1000;box-shadow:0 1px 0 rgba(0,0,0,.06)}
.navbar{display:flex;align-items:center;justify-content:space-between;height:58px}
.brand{font-weight:700;color:#fff;text-decoration:none;font-size:20px}
.primary-menu{list-style:none;margin:0;padding:0;display:flex;gap:22px}
.primary-menu a{color:#fff;text-decoration:none;font-weight:600}
.primary-menu a:hover{opacity:.9;text-decoration:underline}
.menu-toggle{display:none;background:none;border:0;color:#fff;font-size:24px}
@media (max-width:740px){
  .navbar{height:auto;padding:10px 0;flex-wrap:wrap}
  .menu-toggle{display:block;order:2;margin-left:auto}
  .primary-menu{display:none;flex-direction:column;gap:10px;width:100%;margin-top:8px}
  .primary-menu.open{display:flex}
}
/* Headings */
.heading{margin:24px 0 16px}
.heading h1{font-size:clamp(24px,2.8vw,34px);margin:0 0 6px;font-weight:700}
.heading h2{font-size:clamp(14px,1.4vw,16px);margin:0;color:#eef;opacity:.95}
.section-title{font-size:clamp(18px,2.1vw,24px);margin:22px 0 10px;font-weight:700}
/* Publication/Item rows */
.pub-card{display:grid;grid-template-columns:100px 1fr;gap:14px;padding:14px 0;border-bottom:1px solid var(--line);align-items:start;}
.pub-card:last-child{border-bottom:0}
.pub-thumb img{width:100%;height:auto;border:1px solid #ddd;background:#fafafa;display:block}
.pub-title{font-size:clamp(16px,1.6vw,18px);margin:0 0 4px}
.pub-title a{color:#0d6efd;text-decoration:none}
.pub-title a:hover{text-decoration:underline}
.meta{font-size:clamp(13px,1.4vw,14px);color:var(--muted)}
.actions{margin-top:6px;font-size:clamp(13px,1.4vw,14px);color:var(--muted2)}
.actions a{margin-right:12px;color:var(--muted2);text-decoration:none}
.actions a:hover{text-decoration:underline}
.cite-block{margin-top:8px;border-left:3px solid var(--line);padding-left:10px}
.cite-block h6{margin:10px 0 4px;font-size:13px;color:#444}
.cite-block textarea{width:100%;min-height:110px;font:13px/1.35 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:#222;border:1px solid #ddd;background:#fdfdfd;padding:6px}
.hidden{display:none}
.kw{margin-top:8px}
.kw a{display:inline-block;padding:2px 8px;border:1px solid var(--line);border-radius:999px;margin:0 6px 6px 0;font-size:12px;color:#333;text-decoration:none}
.kw a:hover{background:#f4f4f4}
/* Utilities */
.center{display:flex;align-items:center;justify-content:center;text-align:center}
.hero{padding:14vh 0}
.mt-2{margin-top:.5rem}.mt-3{margin-top:1rem}
/* Footer hidden */

@media (max-width: 600px){ .pub-card{grid-template-columns:80px 1fr; gap:10px; padding:12px 0;} .container{padding:0 12px;} }
@media (max-width: 460px){ .pub-card{grid-template-columns:70px 1fr;} }

/* Footer */
.site-footer{background:#f5f5f5;border-top:1px solid var(--line);padding:12px 0;margin-top:40px;font-size:14px;color:var(--muted)}
.footer-inner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;}
.footer-right a{color:var(--blue1);text-decoration:none}
.footer-right a:hover{text-decoration:underline}


.archive-subtitle{font-size:15px;color:var(--muted);margin-top:4px;margin-bottom:16px}

/* Larger publication thumbnails */
.post-type-archive-publication .pub-thumb img,
.single-publication .pub-thumb img{
  width:250px;
  height:auto;
  max-width:100%;
}
@media (max-width: 480px){
  .post-type-archive-publication .pub-card{ grid-template-columns: 120px 1fr; }
  .post-type-archive-publication .pub-thumb img{ width:120px; }
  .single-publication .pub-thumb img{ width:180px; }
}

/* Force 250px width for publication thumbnails */
.post-type-archive-publication img.attachment-medium,
.single-publication img.attachment-medium {
  width: 250px;
  height: auto;
  max-width: 100%;
}
@media (max-width: 480px){
  .post-type-archive-publication img.attachment-medium { width: 120px; }
  .single-publication img.attachment-medium { width: 180px; }
}




/* Tighten publication image rules, avoid affecting admin bar */
#wpadminbar img { width:auto !important; height:32px !important; max-width:none !important; }

/* Make the left column 250px on publication archive + single */
.post-type-archive-publication .pub-card,
.single-publication .pub-card { grid-template-columns: 250px 1fr; }

/* Ensure only the thumbnail inside the card is resized */
.post-type-archive-publication .pub-card .pub-thumb img,
.single-publication .pub-card .pub-thumb img {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
}

@media (max-width: 640px){
  .post-type-archive-publication .pub-card,
  .single-publication .pub-card { grid-template-columns: 160px 1fr; }
  .post-type-archive-publication .pub-card .pub-thumb img,
  .single-publication .pub-card .pub-thumb img { width:100% !important; }
}
@media (max-width: 460px){
  .post-type-archive-publication .pub-card,
  .single-publication .pub-card { grid-template-columns: 120px 1fr; }
}

/* Archive: publications thumbnails 200px */
.post-type-archive-publication .pub-card .pub-thumb img {
  width: 100% !important;
  height: auto !important;
}

/* Single publication: keep 250px */
.single-publication .pub-card { grid-template-columns: 250px 1fr; }
.single-publication .pub-card .pub-thumb img {
  width: 100% !important;
  height: auto !important;
}

@media (max-width: 640px){
  .post-type-archive-publication .pub-card { grid-template-columns: 140px 1fr; }
  .single-publication .pub-card { grid-template-columns: 180px 1fr; }
}
@media (max-width: 460px){
  .post-type-archive-publication .pub-card { grid-template-columns: 120px 1fr; }
  .single-publication .pub-card { grid-template-columns: 140px 1fr; }
}

/* v4.6.7 — Precise archive thumbnail sizing at ~150px */
.post-type-archive-publication .pub-card { grid-template-columns: 150px 1fr; }
.post-type-archive-publication .pub-card .pub-thumb img { width:100% !important; height:auto; max-width:none; }

@media (max-width: 640px){
  .post-type-archive-publication .pub-card { grid-template-columns: 130px 1fr; }
}
@media (max-width: 460px){
  .post-type-archive-publication .pub-card { grid-template-columns: 110px 1fr; }
}

/* v4.6.8 — Fix admin bar avatar size */
#wpadminbar .ab-item img,
#wpadminbar .ab-item .avatar,
#wpadminbar .quicklinks .ab-avatar,
#wpadminbar .quicklinks img,
#wpadminbar .avatar {
  width: 26px !important;
  height: 26px !important;
  max-width: none !important;
  border-radius: 50%;
}







/* --- Publications: different fixed-cap thumbnails --- */

/* ARCHIVE view (list of publications) */
:root { --pub-thumb-archive: 150px; } /* adjust to your desired archive cap */

.post-type-archive-publication .pub-card {
  display: grid;
  grid-template-columns: var(--pub-thumb-archive) 1fr;
  gap: 16px;
  align-items: start;
}

.post-type-archive-publication .pub-card .pub-thumb {
  width: var(--pub-thumb-archive);
  max-width: 100%;
}

.post-type-archive-publication .pub-card .pub-thumb img {
  display: block;
  width: 100%;
  max-width: var(--pub-thumb-archive);
  height: auto;
  object-fit: cover;
}

/* SINGLE view (one publication) */
:root { --pub-thumb-single: 250px; } /* adjust to your desired single cap */

.single-publication .pub-card {
  display: grid;
  grid-template-columns: var(--pub-thumb-single) 1fr;
  gap: 16px;
  align-items: start;
}

.single-publication .pub-card .pub-thumb {
  width: var(--pub-thumb-single);
  max-width: 100%;
}

.single-publication .pub-card .pub-thumb img {
  display: block;
  width: 100%;
  max-width: var(--pub-thumb-single);
  height: auto;
  object-fit: cover;
}

/* Stack layout on narrow screens; images shrink but never exceed their cap */
@media (max-width: 560px) {
  .post-type-archive-publication .pub-card,
  .single-publication .pub-card {
    grid-template-columns: 1fr;
  }

  .post-type-archive-publication .pub-card .pub-thumb,
  .single-publication .pub-card .pub-thumb {
    width: min(100%, var(--pub-thumb-archive)); /* for archive */
  }
  .single-publication .pub-card .pub-thumb {
    width: min(100%, var(--pub-thumb-single)); /* for single */
  }

  .post-type-archive-publication .pub-card .pub-thumb img,
  .single-publication .pub-card .pub-thumb img {
    width: 100%;
    max-width: 100%;
  }
}

/* Wrap long text in both views */
.post-type-archive-publication .pub-card,
.single-publication .pub-card,
.post-type-archive-publication .pub-card p,
.single-publication .pub-card p,
.post-type-archive-publication .pub-card a,
.single-publication .pub-card a {
  overflow-wrap: anywhere;
  word-break: break-word;
}





/* ----- Supplemental Material: 560px cap, LEFT aligned ----- */
.supplemental {
  max-width: 560px;   /* never exceed 560px */
  width: 98%;        /* allow shrinking */
  margin: 1.6rem 0;   /* no auto centering */
  text-align: left;   /* resist parent text centering */
  display: block;
}

/* If parent uses grid/flex and centers children, pin this to the left/top */
.post-type-archive-publication .pub-card .supplemental,
.single-publication .pub-card .supplemental {
  justify-self: start; /* CSS Grid */
  align-self: start;   /* Grid/Flex */
}

/* Gutenberg/embeds sometimes add centered margins—neutralize them inside supplemental */
.supplemental figure,
.supplemental .wp-block-embed,
.supplemental .wp-block-embed__wrapper,
.supplemental .aligncenter {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Media: fill container width but never overflow */
.supplemental img,
.supplemental iframe,
.supplemental video,
.supplemental .embed {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

/* Optional: maintain a default 16:9 for iframes if they don’t provide height */
.supplemental iframe,
.supplemental .embed {
  aspect-ratio: 16 / 9;
}

/* Tables: scroll instead of expanding page width */
.supplemental table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}


/* =========================
   Single Software page
   ========================= */

/* Remove thumbnail frame on software pages (card image) */
.single-software .pub-thumb img {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* Keep article content from overflowing horizontally */
.single-software .entry-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Content images: shrink to fit the container, but NEVER upscale past HTML width */
.single-software .entry-content img,
.single-software .entry-content .wp-block-image img,
.single-software .entry-content figure img {
  display: block;
  height: auto;
  max-width: 100%;         /* lets big images shrink on small screens */
  /* intentionally no 'width' here, so HTML width (e.g., 598) is respected */
}



/* Images WITHOUT a width attribute may be fluid full-width */
.single-software .entry-content img:not([width]),
.single-software .entry-content .wp-block-image img:not([width]),
.single-software .entry-content figure img:not([width]) {
  width: 100%;
}

/* Responsive embeds & video */
.single-software .entry-content iframe,
.single-software .entry-content video,
.single-software .entry-content .wp-block-embed__wrapper {
  max-width: 100%;
  width: 100%;
  height: auto;
}

/* Tables: scroll horizontally instead of breaking layout */
.single-software .entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

/* WordPress alignment helpers */
.single-software .entry-content .alignleft  { float: left;  margin: 0 1rem .5rem 0; max-width: 50%; }
.single-software .entry-content .alignright { float: right; margin: 0 0 .5rem 1rem; max-width: 50%; }
.single-software .entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }

@media (max-width: 640px) {
  .single-software .entry-content .alignleft,
  .single-software .entry-content .alignright {
    float: none;
    max-width: 100%;
    margin: 0 0 .75rem 0;
  }
}


/* Allow the right column in the grid to shrink instead of overflowing */
.single-software .pub-card > * { min-width: 0; }

/* Content: responsive down; never upscale past HTML width */
.single-software .entry-content img,
.single-software .entry-content figure img,
.single-software .entry-content .wp-block-image img {
  display: block;
  max-width: 100%;
  height: auto;
  /* no 'width' here so width="598" is honored */
}

/* Make only images WITHOUT a width attribute fluid full-width */
.single-software .entry-content img:not([width]),
.single-software .entry-content figure img:not([width]),
.single-software .entry-content .wp-block-image img:not([width]) {
  width: 100%;
}

/* Hash line styling */
.single-software .download-hash {
  display: block;
  margin: 0 0 0.5rem 2.2rem;
  color: #667085;
  font-size: .8rem;
  line-height: 1.2;
}

/* Make very long hashes wrap instead of overflowing */
.single-software .download-hash .hash-text {
  display: inline;           /* inline wraps naturally */
  max-width: 100%;
  white-space: normal;       /* just in case */
  overflow-wrap: anywhere;   /* preferred */
  word-break: break-word;    /* fallback */
}

/* Ensure the grid column can shrink (prevents right-edge overflow) */
.single-software .pub-card > * { min-width: 0; }



/* Para remover border do thumb na área software*/
/* Software archive & single: remove thumb border */
.post-type-archive-software .pub-thumb img,
.single-software .pub-thumb img {
  border: none !important;
  box-shadow: none !important;
  background: none !important; /* optional: removes the light gray bg */
}

/* Remove border around keyword chips on software pages */
.post-type-archive-software .pub-thumb img,
.tax-software_keyword .pub-thumb img {
  border: none !important;
  box-shadow: none !important;
  background: none !important; /* optional: removes the light gray bg */
}













/* =========================
   Research archive: card grid
   ========================= */
.post-type-archive-research .research-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(358px, 358px)); /* fixed 350px */
  gap: 12px;
  justify-content: center;  /* center leftover space */
}

@media (max-width: 1024px){
  .post-type-archive-research .research-grid{
    grid-template-columns: repeat(auto-fit, minmax(358px, 358px)); /* fixed 350px */
  }
}
@media (max-width: 640px){
  .post-type-archive-research .research-grid{
    grid-template-columns: repeat(auto-fit, minmax(358px, 358px)); /* fixed 350px */
  }
}

.post-type-archive-research .research-card{
  border:1px solid var(--line);
  border-radius:5px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
  transition:transform .15s ease, box-shadow .15s ease;
  height:100%;
}
.post-type-archive-research .research-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}

.post-type-archive-research .card-link{
  display:grid;
  grid-template-rows:auto 1fr;
  text-decoration:none;
  color:inherit;
  height:100%;
}

.post-type-archive-research .card-thumb img,
.post-type-archive-research .thumb-placeholder{
  width:100%;
  aspect-ratio:16/9;      /* consistent heights like your mockup */
  object-fit:cover;
  display:block;
  background:#f5f6f7;
  border-bottom:1px solid var(--line);
}

.post-type-archive-research .card-body{ padding:14px 16px 16px; }
.post-type-archive-research .card-title{
  margin:0 0 6px;
  font-size:18px;
  font-weight:700;
  color:var(--text);
}
.post-type-archive-research .card-excerpt{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}


/* Research archive – fix stretched thumbs */
.post-type-archive-research .card-thumb{
  aspect-ratio: 16/9;      /* define the box’s shape */
  overflow: hidden;        /* crop overflow */
}

.post-type-archive-research .card-thumb img{
  width: 100%;
  height: 100%;            /* fill the box’s height */
  object-fit: cover;       /* no distortion; crop instead */
  display: block;
}









/* Research archive – card thumbnail sizing & centering */
.post-type-archive-research .card-thumb{
  aspect-ratio: 16/9;     /* fixed box */
  overflow: hidden;
}

.post-type-archive-research .card-thumb img{
  width: 100%;
  height: 100%;           /* fill the box */
  object-fit: cover;      /* crop without distortion */
  object-position: 50% 50%; /* equal crop top/bottom + left/right */
  display: block;
}






/* Research archive — light gray, less-bold titles */
.post-type-archive-research .pub-title{
  
  font-weight: 600 !important;      /* less bold (400 normal, 500 medium) */
  /*margin: -10px -15px -10px -10px;*/
}

/* Keep underline on hover of the whole card link 
.post-type-archive-research .card-link:hover .pub-title{
  color: #0d6efd !important;
  text-decoration: underline;
}*/





/*Garantir que os links dentro dos artigos são azul claro*/

body.single-research .entry-content a,
body.single-software .entry-content a,
body.single-publication .entry-content a,
body.single-research .pub-card a,
body.single-software .pub-card a,
body.single-publication .pub-card a,
body.single-research .supplemental a,
body.single-software .supplemental a,
body.single-publication .supplemental a,
body.single-research .actions a,
body.single-software .actions a,
body.single-publication .actions a {
  color: #1e90ff;
  text-decoration:none;
}

body.single-research .entry-content a:hover,
body.single-software .entry-content a:hover,
body.single-publication .entry-content a:hover,
body.single-research .pub-card a:hover,
body.single-software .pub-card a:hover,
body.single-publication .pub-card a:hover,
body.single-research .supplemental a:hover,
body.single-software .supplemental a:hover,
body.single-publication .supplemental a:hover,
body.single-research .actions a:hover,
body.single-software .actions a:hover,
body.single-publication .actions a:hover {
  color: #1c86ee; /* Slightly darker for hover */
  text-decoration:underline;
}