/*
  Theme Name: Cardiff University Theme 2025 (BETA)
  Theme URI: https://git.cardiff.ac.uk/dev-team/web-mobile/cu-wordpress/wordpress-theme-cardiff-research
  GitLab Theme URI: https://git.cardiff.ac.uk/dev-team/web-mobile/cu-wordpress/wordpress-theme-cardiff-research
  Author: Cardiff University IT Development Team
  Author URI: https://blogs.cardiff.ac.uk/development
  Description: Cardiff University Corporate WordPress theme for Blogs, Sites & Research Sites
  Version: 0.3.6
  Text Domain: cardiffuni
*/


/* Site header */

/* #content.subsite.content {#
  padding-top: 0 !important;
} */

/* #panel-right {
  margin-top:  -10px; 
} */


/* Make sure embeds and iframes fit their containers. */
 embed,
iframe,
object {
  width: 100%;
  height:100%;  
}

iframe {  
  position: relative;
  aspect-ratio: 16 / 9;
  
}

/* video */

.wp-video, .wp-video-shortcode{
  aspect-ratio: 16 / 9;  
  width: 100% !important;  
  height: auto;
}

.video{
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  width: 100%; 
  padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 )*/  
}

.widget.widget_media_video {
  margin-bottom: 20px !important;
}

.video iframe{
  
  position: absolute; 
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;  
}

/* Gallery */

.gallery{
  display: flex;  
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start; 
  
}

figure.gallery-item{
  margin-left: 0;
  margin-right: 1% !important;
  flex-basis: content;  
  margin-top: 0 !important;
  margin-bottom: 1% !important;
}


figure.gallery-item img{
  width: 100% !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;  
}

.gallery-columns-2 figure{
  flex-basis: 49%; 
}

.gallery-columns-3 figure{
  flex-basis: 32%;   
}

.gallery-columns-4 figure{
  flex-basis: 24%;  
}
.gallery-columns-5 figure{
  flex-basis: 19%;  
}

.gallery-columns-6 figure{
  flex-basis: 16%; 
}
 
@media(max-width: 480px){

  figure.gallery-item{
    flex-basis: 100%;    
  }  
}


.ar-4-3{  
  padding-top: 75%; /* 4:3 Aspect Ratio */
}

/* .ar-16-9{  
  padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 )
} */

/** Removing left and right margins from figure if embedded video*/
figure.is-type-video{
  margin:0 0 1.25rem;
}

.profile-image .rounded-circle{
  width:120px;
  height: 120px;
  object-fit: cover !important;
}

.comment-navigation .nav-next,
.posts-navigation .nav-next,
.post-navigation .nav-next {
  float: right;
  text-align: right;
  width: 50%;
}

.comment-navigation .nav-previous,
.posts-navigation .nav-previous,
.post-navigation .nav-previous {
  float: left;
  text-align: left;
  width: 50%;
}

.post-thumbnail {
  margin-top: 1.5em;
  display: inline-block;
}

/** Sidebar search input and submit button */


.search-bar {
  margin-top:0;  
}

#search-submit, .hinput.search-submit{
    
  display:inline-block;
  
}

#search-form label.title-search-label{ 
  font-weight:normal;  
  font-family: franklin_gothic_fs_bookRg,Arial,"Helvetica Neue",sans-serif;
}

.sidebar-search-form{
  display:flex;
  flex-wrap: wrap;
}

.sidebar-search-form-input{
  flex-basis: 100%;
}

.sidebar-search-form-submit{
  flex-basis:22%;
  max-width:48px;
}


form.edit-mode{
  position: fixed;
  z-index: 99999;
  top: 43px;
  right: 100px;
}


/** Fixing bug with wp_list_comments - hiding ol **/ 
ol.comment-list {
  list-style: none;
  margin:0;
}

/** Hide text for screen readers */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.clear-both{
  clear: both;
}


.pagination-container{
  width:100%; 
  display:block; 
  text-align: center;
  padding-top:30px;
  margin-top:20px;  
}

.taxonomy-description.lead{
  margin-bottom:0px !important;
}

.teaser-category {
  display: -ms-flexbox;
  display: inherit;  
}




/** Figure and image settings */

figure.image img {
  width: 100%;
}

#the-content  img.alignright {
  float: right !important;
  margin-left: 2%;
}

#the-content  img.alignleft {
  float: left !important;
  margin-right: 2%;
}

#the-content figure {
object-fit: contain !important;
margin-top:6px;
margin-bottom: 6px;	
}

#the-content figure img{
object-fit: contain !important
}

#the-content  figure.image.align-right {
  float: right;
  display: inline-block;
  margin-left: 2%;
  max-width: 66% !important;	
}

#the-content figure.image.align-left {
  float: left;
  display: inline-block;
  max-width: 66% !important;		
  margin-right: 2%;		
}

#the-content  figure img {	
  height: auto !important;
}

/* icons */

.icon-small {
  padding:8px; 
  content:" ";
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center 13px;
}


h2.box-title, h2.widget-title { margin-top:0 !important;}
section.cu-widget h2:after{display:none;}

/* .teaser-larger .teaser-body {
  font-size: 1.2rem;
} */


.thumb-hide{
  display:none;
}

.thumb-top{
  width: 100%;
  margin: 10px 0px 30px 0;
}


/* Edit link */

.edit-link:before {
  content: '🖉';    
}

.edit-link {

  display:block;
  width:40px; height: 40px;

  position:fixed;
  top: 30%;
  right: 16%;
  background: #ddd;
  color: #333;
  text-decoration: none !important;
  opacity: 0.5;
  font-weight: 600;
  font-size: 18px;
  line-height: 40px !important;  
  /* padding: 16px; */
  text-align: center;
  border: 1px solid #aaaaaa;
  border-radius: 50px;
  z-index: 999;
}

.edit-link:hover, .edit-link:hover { 
  opacity: 1.0;
}


/* Related documents */
.related-document .url:before{ 
  content:"🔗";    
  font-size: 0.8em;    
}


/* Site footer */

.footer-1-area h2, .footer-2-area h2{
  font-family: marr_sans_med,Arial,Helvetica Neue,sans-serif;
  line-height: 1.5rem;
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: .625rem;
  letter-spacing: 0;
}


@media (min-width: 980px){ 

  .thumb-left{           
      float: left;            
      width: 40%;
      margin: 5px 20px 15px 0;
      /* top  right bottom   left */
  }

  .thumb-right{           
      float:right;
      width: 40%;            
      margin: 5px 5px 15px 20px;
      /* top  right bottom   left */
  } 
}

/** Jetpack bits and pieces */


/** Hide the smiley face that jetpack insists on adding to the footer */
img#wpstats{display:none;}

/** Misc Jetpack widget style */
ul.jetpack-social-widget-list {
  list-style-type: none;
  list-style-position: outside;
}


/** Navigation */

.nav-section .navbar .nav .nav-item.last-item {
  padding-right: 10px!important;
}



@media (max-width: 480px){
  body.research .nav-breadcrumb {display:none;} 
}

.nav-global-mobile {
  z-index: 9999; 
  display:block !important;
  visibility: visible !important;
  position:fixed; 
  width: 100% !important;
}

.nav-global-mobile .nav-panel {       
  display:none;
}

.nav-global-mobile .nav-panel.active {
  display:block;  
}