/*
Theme Name: Divi Child Theme
Version: 3.0
Description: Divi Child Theme for In Transit Studios
Authors: The Intransit Studios Team
Client: 
Template: Divi
Author URL: https://intransitstudios.com
*/

/******************************************/
/*-------  CUSTOM CSS STARTING FROM HERE ------- */
/******************************************/

.et_pb_text .wp-block-button__link.wp-element-button {
    color: white !important;
}



.post-type-archive-directory div#et-main-area {
    margin-top: 75px;
}


#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
}

#loading-spinner img {
    width: 50px; /* Adjust size as needed */
    height: 50px;
}


/* Grid Container */
.directory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 equal columns */
    gap: 20px; /* Space between cards */
    padding: 20px;
}

/* Individual Cards */
.directory-item {
    background-color: #fff;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    overflow: hidden; /* Ensure image fits within card */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card Hover Effect */
.directory-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
}

.directory-item:hover {
    transform: none; /* No lift effect on hover for the entire card */
    box-shadow: none; /* No stronger shadow on hover */
}

/* Card Image */
.directory-photo {
    overflow: hidden; /* Ensures image doesn't overflow the container when scaled */
}
a.directory-photo {
    width: 100% !important;
}

.directory-info h3 {
    padding: 0 !important;
}

.directory-photo img {
    width: 100%; /* Full width */
    height: 350px; /* Fixed height */
    object-fit: cover; /* Ensures image covers the area without stretching */
    border-bottom: 2px solid #f0f0f0; /* Border at the bottom of the image */
    transition: transform 0.3s ease; /* Smooth zoom effect */
}

/* Image Hover Effect */
.directory-photo img:hover {
    transform: scale(1.1); /* Zoom the image on hover */
}

/* Card Content */
.directory-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* Ensures that content takes up equal space */
}

/* Heading Style */
.directory-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

/* Job Title and Other Text */
.directory-info p {
    font-size: 1em;
    color: #666;
    margin-bottom: 5px;
}

/* Contact Information Style */
.directory-info a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

.directory-info a:hover {
    text-decoration: underline;
}
/* Container for the directory filter */
.directory-filter {
    padding: 20px;
/*    display: flex; */
    justify-content: flex-start;
    align-items: center;
    gap: 15px; /* Space between the search input and the select dropdown */
}

/* Search Input Field */
#directory_name {
    padding: 10px 15px;
    font-size: 16px;
    width: 100%;
    max-width: 300px; /* Maximum width for the input field */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Select Dropdown Field */
#directory_department {
    padding: 10px 15px;
    font-size: 16px;
    width: 100%;
    max-width: 300px; /* Maximum width for the select dropdown */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    outline: none;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23666"><path fill-rule="evenodd" d="M10 12l-6-6h12l-6 6z" clip-rule="evenodd"/></svg>'); /* Custom dropdown arrow */
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
}

/* On hover/focus for both fields */
#directory_name:hover, 
#directory_name:focus,
#directory_department:hover, 
#directory_department:focus {
    border-color: #0073aa; /* Change border color on hover and focus */
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2); /* Stronger shadow on focus */
}

/* Placeholder text styling */
#directory_name::placeholder {
    color: #999;
    font-style: italic;
}

/* General styles for menu links */
#menu-top-menu li a {
  position: relative;
  color: #333; /* Default link color */
  text-decoration: none;
  padding: 10px 15px;
  display: inline-block;
  transition: color 0.3s ease; /* Smooth color transition */
}

/* Hover effect for changing text color */
#menu-top-menu li a:hover {
  color: #e4002b; /* Change link color on hover */
}

/* Underline animation */
#menu-top-menu li a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #e4002b;
  visibility: hidden;
  transform: scaleX(0);
  transition: all 0.3s ease-in-out;
}

/* Display underline on hover */
#menu-top-menu li a:hover::after {
  visibility: visible;
  transform: scaleX(1);
}

/* Submenu hover effect */
#menu-top-menu li:hover > ul {
  display: block;
}

/* Submenu styling */
#menu-top-menu .sub-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

#menu-top-menu .sub-menu li {
  width: 200px;
}

#menu-top-menu .sub-menu li a {
  padding: 10px;
  color: #333;
  display: block;
}

#menu-top-menu .sub-menu li a:hover {
  background-color: #f0f0f0;
  color: #e4002b;
}
/* Main menu item hover effect - Dark Red (Maroon) */
#menu-main-menu > .menu-item:hover > a {
    color: #800000 !important; /* Maroon color for main menu items on hover */
}

/* Submenu hover effect - Light Pink */
#menu-main-menu .sub-menu li:hover > a {
    color: #ffd1d1 !important; /* Submenu text color on hover */
}

/* Dropdown arrow hover effect */
#menu-main-menu .menu-item a .dropdown-arrow {
    transition: all 0.3s ease; /* Smooth transition for dropdown arrow */
}

#menu-main-menu .menu-item:hover > a .dropdown-arrow {
    color: #800000 !important; /* Arrow color matches main menu hover color */
}

/* Active main menu item effect */
#menu-main-menu > .menu-item.current-menu-item > a,
#menu-main-menu > .menu-item.current_page_item > a,
#menu-main-menu > .menu-item.active > a {
    color: #800000 !important; /* Maroon color for active main menu items */
}

/* Active submenu item effect */
#menu-main-menu .sub-menu .current-menu-item > a,
#menu-main-menu .sub-menu .current_page_item > a,
#menu-main-menu .sub-menu .menu-item.active > a {
    color: #ffd1d1 !important; /* Light pink color for active submenu items */
}

/* Highlight main menu item if any of its submenu items is active */
#menu-main-menu > .menu-item.current-menu-ancestor > a,
#menu-main-menu > .menu-item.current_page_ancestor > a {
    color: #800000 !important; /* Maroon color for main menu item if a submenu item is active */
}

/* Active dropdown arrow effect */
#menu-main-menu > .menu-item.current-menu-item > a .dropdown-arrow,
#menu-main-menu > .menu-item.current_page_item > a .dropdown-arrow,
#menu-main-menu > .menu-item.active > a .dropdown-arrow,
#menu-main-menu > .menu-item.current-menu-ancestor > a .dropdown-arrow,
#menu-main-menu > .menu-item.current_page_ancestor > a .dropdown-arrow {
    color: #800000 !important; /* Active arrow color */
}

/* Underline animation for main menu items */
#menu-main-menu .menu-item > a {
    position: relative;
    display: inline-block;
    padding-bottom: 5px; /* Adjust padding as needed */
}

#menu-main-menu .menu-item > a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #ffd1d1;
    transition: width 0.3s ease; /* Animation duration and easing */
}

#menu-main-menu > .menu-item:hover > a::after {
    width: 100%; /* Full width underline on hover for main menu */
}

/* Underline for active main menu and ancestor items */
#menu-main-menu > .menu-item.current-menu-item > a::after,
#menu-main-menu > .menu-item.current_page_item > a::after,
#menu-main-menu > .menu-item.active > a::after,
#menu-main-menu > .menu-item.current-menu-ancestor > a::after,
#menu-main-menu > .menu-item.current_page_ancestor > a::after {
    width: 100%; /* Full width for active or ancestor main menu items */
}

/* Underline animation for submenu items */
#menu-main-menu .sub-menu li > a {
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

#menu-main-menu .sub-menu li > a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #ffd1d1;
    transition: width 0.3s ease;
}

#menu-main-menu .sub-menu li:hover > a::after {
    width: 100%; /* Full width underline on hover for submenu */
}

/* Underline for active submenu items */
#menu-main-menu .sub-menu .current-menu-item > a::after,
#menu-main-menu .sub-menu .current_page_item > a::after,
#menu-main-menu .sub-menu .menu-item.active > a::after {
    width: 100%; /* Full width for active submenu items */
}





/* Full-width for smaller screens */
@media (max-width: 768px) {
    .directory-filter {
        flex-direction: column; /* Stack elements vertically on smaller screens */
        gap: 10px; /* Less space between elements */
    }

    #directory_name, 
    #directory_department {
        max-width: 100%; /* Full width for inputs on smaller screens */
    }
}

/* Container adjustments for smaller screens */
@media (max-width: 768px) {
    .search-filter-container {
        flex-direction: column; /* Stack the fields vertically on smaller screens */
        gap: 10px; /* Less space between fields */
    }

    .search-filter-container input[type="text"],
    .search-filter-container select {
        max-width: 100%; /* Full width on smaller screens */
    }
}


/* Responsive for Tablets (2 columns) */
@media (max-width: 768px) {
    .directory-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns for tablets */
        gap: 15px;
    }
}

/* Responsive for Small Screens (Mobile, 1 column) */
@media (max-width: 480px) {
    .directory-grid {
        grid-template-columns: 1fr; /* 1 column for mobile */
        gap: 10px;
    }
}


/* Grid Container */
.directory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 equal columns */
    gap: 20px; /* Space between cards */
    padding: 20px;
}

/* Individual Cards */
.directory-item {
    background-color: #fff;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    overflow: hidden; /* Ensure image fits within card */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card Hover Effect */
.directory-item:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Stronger shadow on hover */
}

/* Card Image */
.directory-photo img {
    width: 100%; /* Full width */
    height: 200px; /* Fixed height */
    object-fit: cover; /* Ensures image covers the area without stretching */
    border-bottom: 2px solid #f0f0f0; /* Border at the bottom of the image */
}

/* Card Content */
.directory-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* Ensures that content takes up equal space */
}

/* Heading Style */
.directory-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

/* Job Title and Other Text */
.directory-info p {
    font-size: 1em;
    color: #666;
    margin-bottom: 5px;
}

/* Contact Information Style */
.directory-info a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

.directory-info a:hover {
    text-decoration: underline;
}

/* Responsive for Tablets (2 columns) */
@media (max-width: 768px) {
    .directory-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns for tablets */
        gap: 15px;
    }
}

/* Responsive for Small Screens (Mobile, 1 column) */
@media (max-width: 480px) {
    .directory-grid {
        grid-template-columns: 1fr; /* 1 column for mobile */
        gap: 10px;
    }
}
