/*
Theme Name: Kolling Institute Theme
Author: University of Sydney WordPress Team
Description: Kolling Institute Theme V1.1
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 8
Text Domain: kolling-institute-theme
*/

/* ----------------------------------------
   GLOBAL
---------------------------------------- */
a { text-decoration: none; }
a:hover { text-decoration: underline; }

.wp-block-quote {
  border-left: 1px solid #686868 !important;
  margin: 2em 0 !important;
}

.post-categories { font-weight: 300; }


/* ----------------------------------------
   ADMIN BAR VARIABLE
---------------------------------------- */
:root { --admin-bar-h: 0px; }
body.admin-bar { --admin-bar-h: 32px; }
@media (max-width: 782px) {
  body.admin-bar { --admin-bar-h: 46px; }
}

/* ----------------------------------------
   DESKTOP HEADER (sticky + spacing)
---------------------------------------- */

header.wp-block-template-part:is(.is-header, .site-header, .wp-block-template-part) {
  position: sticky;
  top: var(--admin-bar-h);
  z-index: 1000;
  background-color: var(--wp--preset--color--accent-3);
  color: var(--wp--preset--color--base);
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
}


.wp-site-blocks:has(.desktop-header, .tablet-header, .mobile-header),
.wp-block-template-part:has(.desktop-header, .tablet-header, .mobile-header),
header:has(.desktop-header, .tablet-header, .mobile-header),
.wp-block-group:has(.desktop-header, .tablet-header, .mobile-header) {
  overflow: visible !important;
  transform: none !important;
}

.desktop-header, .tablet-header, .mobile-header  {
	padding: 25px;
}


/* inner row spacing and layout (moved from inline + block attributes) */
.desktop-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

  /* moved from inline: margins/padding */

  padding-inline: var(--wp--preset--spacing--30);
  gap: 0; /* matches blockGap: 0 */
}

/* Navigation typography & spacing (moved from block styling) */
.desktop-nav {
  --wp--style--block-gap: var(--wp--preset--spacing--40);
  font-size: 17px;
}

.desktop-nav.desktop-nav--center {
  font-size: 18px;
}

/* Ensure header links are readable on accent background */
.desktop-header a {
  color: var(--wp--preset--color--base);
  text-decoration: none;
}
.desktop-header a:hover { text-decoration: underline; }

/* Remove bold text from navigation links in the desktop header */
.desktop-header .wp-block-navigation a,
.desktop-header .wp-block-navigation__container a,
.desktop-header .wp-block-navigation-item a {
  font-weight: 400 !important;
}


/* If your theme applies restrictive overflow/transform on ancestors,
   it can break sticky. Neutralize common culprits. */
.wp-site-blocks,
.wp-block-template-part,
header,
.wp-block-group {
  overflow: visible !important;
  transform: none !important;
}


/* ------------------------- */
/*  MOBILE (0 → 949px)       */
/* ------------------------- */
@media screen and (max-width: 949px) {
  .desktop-header { display: none !important; }
  .tablet-header  { display: none !important; }
  .mobile-header  { display: block !important; }
}

/* ------------------------- */
/*  TABLET (950px → 1020px)  */
/* ------------------------- */
@media screen and (min-width: 950px) and (max-width: 1020px) {
  .desktop-header { display: none !important; }
  .mobile-header  { display: none !important; }
  .tablet-header  { display: block !important; }
}

/* ------------------------- */
/*  DESKTOP (1021px → ∞)     */
/* ------------------------- */
@media screen and (min-width: 1021px) {
  .mobile-header  { display: none !important; }
  .tablet-header  { display: none !important; }
  .desktop-header { display: block !important; }
}

/*mobile drop down icon*/
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
    display: block;
}

/* ----------------------------------------
   SEARCH
---------------------------------------- */
.wp-block-search {
    width: 130px;
}

.wp-block-search__button-inside .wp-block-search__inside-wrapper {
	display: flex !important;
    align-items: center !important;
    border: 2px solid #ffffff !important;
    border-radius: 4px !important;
    padding: 4px 6px !important;
    background: transparent !important;
    height: 34px !important;
}

.wp-block-search.aligncenter .wp-block-search__inside-wrapper {
	margin: auto;}
.wp-block-search .wp-block-search__input {
	border-radius: 3.125rem;}

.wp-block-search__button.has-icon {
    line-height: 0;
}

.wp-block-search__button {
	   padding: 0;
    margin: 0;
	width: 50px;
    border: none !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 16px !important;
    cursor: pointer;
    padding: 0 4px !important;
}

.wp-block-search__input {
    border: none !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 14px !important;
    width: 150px !important;
    padding: 0 6px !important;
}


input.wp-block-search__input::placeholder,
.wp-block-search__input::placeholder {
    color: #fff !important;
    opacity: 1;
}





/* removed the gap between the header the content*/
.no-gap {
	margin-block-start: 0;
}
/* ----------------------------------------
   RELATED LINKS
---------------------------------------- */
.break-terms a {
  display: block !important;
  margin-bottom: 1px;
  text-decoration: none !important;
  color: #007ed5;
}


/* ----------------------------------------
   PAGINATION
---------------------------------------- */
.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  padding: 12px;
  border: 1px solid #ccc;
  background-color: #fff;
  font-family: inherit;
}

.wp-block-query-pagination-numbers .current {
  background-color: #00558c;
  color: #fff;
  border: 1px solid #00558c;
  padding: 4px 8px;
}


/* ----------------------------------------
   TEAM BLOCKS
---------------------------------------- */
.team-member {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  margin-bottom: 1rem;
  box-sizing: border-box;
  padding-right: 40px;
}

.team-member-content {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

.team-member img {
  width: 180px;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  display: block;
}

.team-member-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: #007ed5;
}

/* Two-column layout on pages only */
@media (min-width: 901px) {
  body.page .team-block-page,
  body.page .team-block-post {
    display: flex;
    flex-wrap: wrap;
    gap: 4%;
  }
  
  body.page .team-member {
    flex: 0 0 48%;
    max-width: 48%;
  }

  body.single .team-member {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .team-block-page,
  .team-block-post {
    display: block;
  }

  .team-member {
    width: 100%;
    max-width: 100%;
  }
}


/* ----------------------------------------
   MOBILE / HANDHELD (<=768px)
---------------------------------------- */
@media (max-width: 768px) {
  html, body { -webkit-text-size-adjust: 100%; }

  body {
    font-size: 1rem;
    line-height: 1.5;
  }

  a, .wp-block-button__link, .wp-block-button a {
    padding: 10px 6px;
    display: inline-block;
  }

  :focus {
    outline: 3px solid rgba(8,127,225,0.25);
    outline-offset: 2px;
  }

  /* Search styles removed (now in theme.json) */

  .team-member {
    flex-direction: column;
    gap: 1rem;
    padding: 0 16px;
  }

  .team-member img {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
  }

  .wp-block-query-pagination a,
  .wp-block-query-pagination button,
  .wp-block-query-pagination .current {
    min-width: 44px;
    padding: 10px 12px;
  }

  p a, li a { text-decoration: underline; }

  .team-member { padding: 0; }


  /* MOBILE NAVIGATION */
  .wp-block-navigation,
  .wp-block-navigation__container,
  .wp-block-navigation__responsive-container {
    text-align: left;
    background: #007ed5 !important;
  }

  .wp-block-navigation a,
  .wp-block-navigation__container a,
  .wp-block-navigation__responsive-container a,
  .wp-block-navigation__link,
  .wp-block-navigation-item a {
    display: block;
    width: 80%;
    padding: 16px;
    box-sizing: border-box;
    font-size: 1.125rem;
    line-height: 1.5;
    color: white !important;
    background: #007ed5 !important;
    transition: background-color 180ms ease, color 180ms ease;
  }

  .wp-block-navigation a:hover,
  .wp-block-navigation a:focus {
    color: #fff !important;
    text-decoration: none;
  }

  .wp-block-navigation__overlay,
  .wp-block-navigation__responsive-container {
    background: #007ed5 !important;
    color: #fff !important;
  }

  .wp-block-navigation__responsive-container-close {
    margin: 20px !important;
  }

  .wp-block-navigation__container ul,
  .wp-block-navigation__container li {
    list-style: none;
    padding: 10px;
    width: 400px !important;
  }

  .wp-block-navigation__container li li a {
    padding-left: 40px;
    font-size: 1rem;
  }

  .swiper-button-next,
  .swiper-button-prev {
      display: none;
  }
}


/* ----------------------------------------
   DESKTOP HOVER ONLY
---------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration: underline; }
}
