/* 
directory-new.css
Merged CSS combining css-custom.css (working styles) and directory.css improvements
For use on ufv.ca/directory
Created: November 2025
*/

/* ================================================
   CORE BUTTON FRAMEWORK (from css-custom.css)
   ================================================ */
.btn-t4,.staff-directory .button-list button.selected,.staff-directory .button-list button{display:inline-block;text-align:center;vertical-align:middle;user-select:none;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0);padding:.5rem 1.5rem;font-size:.875rem;letter-spacing:.025rem;font-weight:500;text-decoration:none !important;transition:color .3s ease-in-out,background-color .3s ease-in-out,border-color .3s ease-in-out,box-shadow .3s ease-in-out}

a.btn-t4-primary,a span.btn-t4-primary,.btn-t4-primary a,.staff-directory .button-list button.selected a{display:inline-block;text-align:center;vertical-align:middle;user-select:none;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0);padding:.5rem 1.5rem;font-size:.875rem;letter-spacing:.025rem;font-weight:500;text-decoration:none !important;transition:color .3s ease-in-out,background-color .3s ease-in-out,border-color .3s ease-in-out,box-shadow .3s ease-in-out;background-color:#02292e;color:#fff !important}

a.btn-t4-primary:hover,a span.btn-t4-primary:hover,.btn-t4-primary a:hover,.staff-directory .button-list button.selected a:hover{background-color:rgba(0,0,0,0);color:#02292e !important;border:2px solid #02292e}

a.btn-t4-primary:hover>svg,a span.btn-t4-primary:hover>svg,.btn-t4-primary a:hover>svg,.staff-directory .button-list button.selected a:hover>svg{fill:#02292e;transition:fill .3s ease-in-out}

a.btn-t4-primary>svg,a span.btn-t4-primary>svg,.btn-t4-primary a>svg,.staff-directory .button-list button.selected a>svg{fill:#fff;transition:fill .3s ease-in-out}

a.btn-t4-primary:focus,a span.btn-t4-primary:focus,.btn-t4-primary a:focus,.staff-directory .button-list button.selected a:focus{border:4px solid #b32573}

a.btn-t4-primary-outline,a span.btn-t4-primary-outline,.btn-t4-primary-outline a,.staff-directory .button-list button a{display:inline-block;text-align:center;vertical-align:middle;user-select:none;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0);padding:.5rem 1.5rem;font-size:.875rem;letter-spacing:.025rem;font-weight:500;text-decoration:none !important;transition:color .3s ease-in-out,background-color .3s ease-in-out,border-color .3s ease-in-out,box-shadow .3s ease-in-out;background-color:rgba(0,0,0,0);color:#02292e;border:2px solid #02292e}

a.btn-t4-primary-outline:hover,a span.btn-t4-primary-outline:hover,.btn-t4-primary-outline a:hover,.staff-directory .button-list button a:hover{background-color:#02292e;color:#fff !important}

a.btn-t4-primary-outline:hover>svg,a span.btn-t4-primary-outline:hover>svg,.btn-t4-primary-outline a:hover>svg,.staff-directory .button-list button a:hover>svg{fill:#fff;transition:fill .3s ease-in-out}

a.btn-t4-primary-outline>svg,a span.btn-t4-primary-outline>svg,.btn-t4-primary-outline a>svg,.staff-directory .button-list button a>svg{fill:#02292e;transition:fill .3s ease-in-out}

a.btn-t4-primary-outline:focus,a span.btn-t4-primary-outline:focus,.btn-t4-primary-outline a:focus,.staff-directory .button-list button a:focus{border:4px solid #b32573}

/* Additional button variants from css-custom.css */
a.btn-t4-secondary,a span.btn-t4-secondary,.btn-t4-secondary a{display:inline-block;text-align:center;vertical-align:middle;user-select:none;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0);padding:.5rem 1.5rem;font-size:.875rem;letter-spacing:.025rem;font-weight:500;text-decoration:none !important;transition:color .3s ease-in-out,background-color .3s ease-in-out,border-color .3s ease-in-out,box-shadow .3s ease-in-out;background-color:#b32573;color:#fff !important}

/* Container and Layout Utilities */
.container-t4 {
  max-width: 90%;
}

@media (min-width: 1400px) {
  .container-t4 {
    max-width: 1300px !important;
  }
}

.single-padding-divider {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* ================================================
   DIRECTORY SPECIFIC STYLES (from directory.css)
   ================================================ */

/* Search Results Layout */
.search-results-advanced {
    display: block; /* Removes grid or flex layout */
}

/* Staff Card Styling - FIXED flexbox conflicts */
.staff-card {
    width: 100% !important; /* Ensures each card takes full width */
    border: 1px solid #ccc !important;
    padding: 10px 20px 10px 30px; 
    background-color: #fff;
    /* Removed conflicting display: block that was breaking flexbox */
}

/* Search Input Styling */
.searchoptions-generic .search-form-container__input-search {
    border: 1px solid #00703c;
    color: #355458 !important;
    font-size: 1.5rem;
    font-weight: 600;
    width: 100%;
    height: unset;
    padding: 15px !important;
}

.searchoptions-generic .search-form-container__button > svg {
    fill: #00703c;
    -webkit-transform: scale(0.8);
    transform: scale(0.7);
}

/* See More Button */
.btn-see-more {
    background: #00703c;
    padding: 12px;
    padding-right: 30px !important;
    margin-top: 10px;
    margin-bottom: 20px !important;
    border-top-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Form Elements */
legend {
    text-transform: uppercase !important;
}

#checkboxes-campus legend, 
#checkboxes-department legend {
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #333 !important;
}

.checkbox label {
    margin-bottom: 15px !important;
    font-size: 14px !important;
}

/* Staff Card Icons */
.staff-card svg {
    color: #00703c !important;
    fill: #00703c !important;
    min-width: 20px !important;
}

.staff-card .card-heading {
    font-size: 24px !important;
    margin: 0px 0px 5px 0px;
}

.staff-card {
    border-bottom: none;
}

/* Pagination */
.pagination a {
    background-color: #00703c !important;
    border: 0px solid #ccc !important;
}

#search-results .pagination-box .pagination .currentpage {
    border: 1px solid #ccc;   
}

/* Department Text - CLEANED UP duplicate font-size */
.staff-card .card-department p {
    font-size: 16px;
    letter-spacing: -0.2px;
    font-family: 'Open Sans', sans-serif;
}

.checkbox {
    margin-left: 0px !important;
}

.staff-search-widget fieldset {
    border: none;
    padding: 0px !important;
    margin: 0px !important;
}

.staff-card--advanced {
    margin: 0px !important;
    margin-top: 20px !important;
    color: #333;
}

/* Filter Styling */
.staff-filter__title > span::before, .course-filter__title > span::before {
    background-color: #999;
    bottom: -1rem;
    height: 1px;
}

/* Directory Button States */
.staff-directory .button-list button.selected {
    background-color: #00703c;
    border: none !important;
}

.staff-directory .button-list button {
    border: 1px solid #999;
}

.staff-directory .button-list button:hover {
    background-color: #00703c;
    color: white;
}

.course-filter__title span {
    font-size: 16px;
    font-weight: 500;
}

/* Background Colors */
.staff-directory, 
.main-header-marketing {
    background-color: #fafafa !important;
}

/* Card Heading Enhancements */
.staff-card .card-heading {
    font-size: 2.5rem !important;
    font-weight: 600;
    line-height: 2.5;
    word-break: break-word;
    margin-bottom: 0;
    display: block;
    letter-spacing: -0.5px;
  color: #00703c !important;
}

#search-results .staff-card a {
    color: #000;
}

.staff-card--advanced {
    width: calc(50% - 0.5rem / 2);
}

/* Sidebar and Content Layout */
.inner__sidebar {
    border: none !important;
}

.search-results-advanced {
    padding: 0px !important;
    margin: 0px !important;
}

.single-padding-divider {
    padding: 0px 10px 0px 10px !important;
}

.staff hr {
    display: none;
}

.order-lg-1 {
    padding: 0px !important;
}

.general-content {
    padding: 0px !important;
    margin: 0px !important;
}

.boxed, .breadcrumb {
    background: inherit !important;
}

/* PROFILE PAGE SPECIFIC STYLES */
.staff__profile {
    padding: 0px !important;
    background: inherit !important;
}

.staff__profile h1,
.staff__profile h2,
.staff__profile h3, 
.staff__profile h4,
.staff__profile h5,
.staff__profile h6,
.staff h2,
.staff h3,
.staff h4,
.staff h5,
.staff h6 {    
    text-transform: unset; 
    margin-bottom: 30px;
}

.staff {
    margin-bottom: 100px;
}

.staff__contact-info,
.staff__title {
    padding: 0px !important;
    margin: 0px !important;
}

.staff__profile {    
    padding: 20px !important;
    margin: 0px !important;   
}

.staff .row {
    width: 70%;
    margin: auto;
    padding: 30px; /* Consolidated duplicate rule */
    background: #fff !important;
    border-radius: 5px; 
}

.staff-directory {
    background: #ebebeb !important;
}

/* Profile Typography Reset */
.staff h2,
.staff h3,
.staff h4,
.staff h5,
p.staff__role,
h1.staff__title {
    font-weight: 500 !important;
    font-style: normal !important;
    font-size: 20px !important;
    margin: 10px 0px 10px 0px;   
    padding: 0px;
}

h1.staff__title {
    font-weight: 500 !important;
    font-style: normal !important;
    font-size: 20px !important;
    margin: 0px 0px 5px 0px !important;   
    padding: 0px;
}

p.staff__role {
    font-weight: 400 !important; 
    font-size: 17px !important;
}

.staff__contact-info a {
    font-weight: 600;
    padding: 5px; 
}

.staff__profile {
    padding: 0px !important;
    margin: 0px !important;
}

/* Heading Hierarchy */
.staff h1 { font-size: 26px !important; }
.staff h2 { font-size: 22px !important; }
.staff h3 { font-size: 20px !important; }
.staff h4 { font-size: 19px !important; }
.staff h5 { font-size: 18px !important; }

.staff h1::before,
.staff h2::before,
.staff h3::before,
.staff h4::before,
.staff h5::before,
.staff h6::before {
    color: #666;
    font-weight: normal;
    font-size: 0.5em;
}

/* ================================================
   FLEXBOX LAYOUT - DESKTOP (Key improvement from directory.css)
   ================================================ */
.t4-department-profile-listing .staff-card,
.staff-directory-advanced .staff-card {
    display: flex;
    flex-direction: row-reverse; /* Image goes right */
    gap: 20px;
    padding: 10px 20px 10px 30px;
}

.t4-department-profile-listing .card-person,
.staff-directory-advanced .card-person {
    flex-shrink: 0;
    width: 150px; /* Fixed width for image */
}

.t4-department-profile-listing .card-content,
.staff-directory-advanced .card-content {
    flex: 1; /* Content takes remaining space */
}

.t4-department-profile-listing .staff-card--advanced .card-person img,
.staff-directory-advanced .staff-card--advanced .card-person img {
	width: 180px;
	height: 180px;
	object-fit: cover;
	display: block;
	margin: 0 auto;
	height: 100% !important;
	width: 100% !important;
	clip-path: none;
}

.t4-department-profile-listing .staff-profile-info,
.staff-directory-advanced .staff-profile-info {
    padding-top: 0px !important;
}

.t4-department-profile-listing .staff-profile-details,
.staff-directory-advanced .staff-profile-details {
    padding-bottom: 0px !important;
}

.t4-department-profile-listing .staff-card--advanced .card-person img,
.staff-directory-advanced .staff-card--advanced .card-person img {
	width: 180px;
	object-fit: cover;
	display: block;
	margin: 0 auto;
	border-radius: 15px;
	margin-top: 10px;
	padding: 10px;
}

/* ================================================
   IMPROVED MOBILE RESPONSIVE (Major improvement from directory.css)
   ================================================ */
@media (max-width: 768px) {
    .t4-department-profile-listing .staff-card,
    .staff-directory-advanced .staff-card {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .t4-department-profile-listing .card-person,
    .staff-directory-advanced .card-person {
        width: 120px !important;
        order: -1;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .t4-department-profile-listing .staff-card--advanced .card-person img,
    .staff-directory-advanced .staff-card--advanced .card-person img {
        width: 120px !important;
        height: 120px !important;
        margin: 10px auto !important;
        display: block !important;
        object-fit: cover !important;
        clip-path: circle(50%) !important;
    }
  
    .t4-department-profile-listing .staff .row,
    .staff-directory-advanced .staff .row {
        width: 95%;
        margin: auto;
        padding: 20px;
        background: #fff !important;
        border-radius: 5px;
    }
    
    .t4-department-profile-listing .card-content,
    .staff-directory-advanced .card-content {
        width: 100%;
        text-align: left;
    }
    
    .t4-department-profile-listing .staff-card .card-heading,
    .staff-directory-advanced .staff-card .card-heading {
        font-size: 1.8rem !important;
        text-align: left;
        margin-bottom: 10px;
    }
    
    .t4-department-profile-listing .card-body,
    .staff-directory-advanced .card-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .t4-department-profile-listing .card-department,
    .t4-department-profile-listing .card-email,
    .staff-directory-advanced .card-department,
    .staff-directory-advanced .card-email {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .t4-department-profile-listing .staff-card,
    .staff-directory-advanced .staff-card {
        padding: 15px !important;
        gap: 10px;
    }
    
    .t4-department-profile-listing .card-person,
    .staff-directory-advanced .card-person {
        width: 100px !important;
    }
    
    .t4-department-profile-listing .staff-card--advanced .card-person img,
    .staff-directory-advanced .staff-card--advanced .card-person img {
        width: 100px !important;
        height: 100px !important;
        margin: 5px auto !important;
    }
    
    .t4-department-profile-listing .staff-card .card-heading,
    .staff-directory-advanced .staff-card .card-heading {
        font-size: 1.5rem !important;
    }
    
    .t4-department-profile-listing .card-department p,
    .t4-department-profile-listing .card-email a,
    .staff-directory-advanced .card-department p,
    .staff-directory-advanced .card-email a {
        font-size: 14px !important;
    }
}

/* ================================================
   ADDITIONAL IMPROVEMENTS FROM css-custom.css
   ================================================ */

/* Staff Directory Layout */
.staff-directory {
    margin-bottom: 3rem;
}

.staff-directory .button-list form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.staff-directory .button-list button {
    border: 2px solid #02292E;
    line-height: 1;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.staff-directory .button-list button.selected {
    padding: 0;
    background-color: #02292e;
    color: #fff !important;
}

.staff-directory .button-list button:hover {
    background-color: #02292E;
    color: white;
}

/* Search and Form Improvements */
.searchoptions-generic .search-form-container {
    position: relative;
    margin: 3rem 0;
}

.searchoptions-generic .search-form-container .form-label {
    display: inline;
}

/* Staff Card Layout */
.staff-card {
    border-bottom: 1px solid #02292E;
    display: flex;
    flex-direction: column;
    padding: 0 0 1.5rem 0;
    margin-bottom: 1.5rem;
}

.staff-card svg {
    fill: #b32573;
    min-width: 16px;
}

.staff-card .card-person {
    display: flex;
    align-self: flex-start;
}

.staff-card .card-person img {
    margin-top: .5rem;
    margin-right: 1rem;
}

.staff-card .card-person:hover,
.staff-card .card-person:focus {
    text-decoration: none;
}

/* Card Content Layout */
.staff-card .card-role,
.staff-card .card-type,
.staff-card .card-department,
.staff-card .card-phone,
.staff-card .card-email {
    padding: .25rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-card .card-role p,
.staff-card .card-type p,
.staff-card .card-department p,
.staff-card .card-phone p,
.staff-card .card-email p {
    margin-bottom: 0;
}

/* ================================================
   CUSTOM ENHANCEMENTS
   ================================================ */

/* Better See More Button */
.btn-see-more {
    font-size: 1.25rem;
    padding: .5rem 2rem .5rem .5rem;
    position: relative;
    background-color: #02292e;
    color: #fff;
    transition: all .2s ease-in-out;
    line-height: normal;
    letter-spacing: .05rem;
    font-weight: 600;
}

.btn-see-more:focus, 
.btn-see-more:hover {
    color: #02292e;
    outline: 2px solid #02292e !important;
    background-color: #fff;
}

.btn-see-more:after {
    content: "";
    display: block;
    width: 13px;
    height: 13px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='800' height='800' viewBox='0 0 1024 1024' class='icon' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M903.232 256L960 306.432 512 768 64 306.432 120.768 256 512 659.072z' fill='%23fff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 13px;
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
}

.btn-see-more:focus:after, 
.btn-see-more:hover:after {
    background-image: url("data:image/svg+xml,%3Csvg width='800' height='800' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M903.232 256L960 306.432 512 768 64 306.432 120.768 256 512 659.072z' fill='%2302292e'/%3E%3C/svg%3E");
}

/* Staff Leave Indicators */
.staff__title span.staff__on-leave,
.program__img-card span.staff__on-leave,
.card-body span.staff__on-leave {
    display: inline-block;
    width: fit-content;
    font-weight: 600;
    background-color: #ebebeb;
    padding: 0.3em 0.7em;
    font-size: 1.25rem;
    vertical-align: top;
}

.card-body span.staff__on-leave {
    margin-top: 1rem;
}

/* Enhanced Link Styling */
#search-results .staff-card a:hover {
    color: #00703c;
}

#search-results .staff-card a[href^=tel]:hover,
.staff__contact-info a[href^=tel]:hover {
    text-decoration: underline;
}

/* Message Styling */
#searchResults p.message {
    padding-top: 2rem;
}

/* Department Profile Card Layout */
.program__img-card {
    display: flex;
    margin-bottom: 2rem;
}

.program__img-card:last-child {
    margin-bottom: 0;
}

.program__img-card__img {
    width: 250px;
    height: 250px;
}

.program__img-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

.program__img-card__block {
    width: calc(100% - 250px);
    padding: 2rem;
}

.program__img-card__name, 
.program__img-card__email {
    display: block;
}

/* Additional Mobile Responsive for Program Cards */
@media (max-width: 767px) {
    .program__img-card {
        display: block;
    }
    
    .program__img-card__img {
        width: 200px;
    }
    
    .program__img-card__block {
        background-color: transparent;
        width: auto;
        padding: 0;
        margin-top: 1rem;
    }
}

/* Program Card Content Layout */
.program__img-card span.program__img-card__other,
.program__img-card span.program__img-card__other span, 
.program__img-card span.program__img-card__name span {
    display: block;
}

.program__img-card span.program__img-card__email svg {
    vertical-align: sub;
}

/* Clear Button Enhancement */
button.staff-search-widget__clear:after {
    content: ' x';
    padding-left: .5rem;
}

/* Final Layout Adjustments */
.t4-department-profile-listing {
    padding-bottom: 4rem;
}

#searchResults .button-list button {
    font-size: 1.5rem !important;
}

span.card-heading {
    font-size: 3rem !important;
    color: #333;
}

.checkbox.d-none {
    display: none;
}

.staff-directory .general-content.single-padding-divider h2 {
    font-size: 2rem;
}

.staff__contact-info:first-of-type h2 {
    font-size: 2rem;
}

