/**
 * Header Shortcode Styles
 * 
 * @package    Matilde_Saunders
 * @subpackage Matilde_Saunders/assets/css/shortcodes
 */

/* ==========================================================================
   Header Shortcode Styles
   ========================================================================== */

.ms-header {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  /* overflow: hidden; */
  border-bottom: 1px solid var(--e-global-color-primary, #e60002);
  background-color: #e6e6e6;
  gap: 10px;
}

.ms-header-logo {
  display: flex;
  align-items: flex-end;
  height: 50px;
  max-width: 230px;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: -3px;
}

.ms-header-logo img {
  height: 50px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

/* ==========================================================================
   Navigation Header Styles
   ========================================================================== */

.ms-header-nav {
  width: 100%;
  /* position: relative; */
  z-index: 1000;
  /* margin-bottom: -1px; */
}

.ms-header-nav a {
  text-decoration: none;
}

.ms-nav-menu {
  display: flex;
  list-style: none;
  max-width: 920px;
  margin: 0;
  margin-left: auto;
  padding: 0;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  background-color: #e6e6e6;
}

.ms-nav-item {
  font-family: "Lexend Giga", sans-serif;
  /* height: 100%;
  height: -webkit-fill-available;
  height: -moz-available; Firefox */
}

.ms-nav-item-contact {
  margin-top: auto;
}

.ms-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 0.5rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  color: var(--e-global-color-secondary, #2f3b4b);
}

.ms-nav-link:hover {
  color: var(--e-global-color-primary, #e60002);
  text-decoration: none;
}

.ms-dropdown-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.ms-dropdown-arrow svg {
  fill: white;
}

.ms-nav-dropdown.active .ms-nav-link {
  background-color: var(--e-global-color-primary, #e60002);
  color: white;
}

.ms-nav-dropdown.active .ms-dropdown-arrow {
  transform: rotate(180deg);
}

.ms-nav-dropdown.active .ms-nav-link:hover {
  color: white;
}

.ms-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0%;
  border-top: 2px solid var(--e-global-color-primary, #e60002);
  border-bottom: 2px solid var(--e-global-color-primary, #e60002);
  background-color: #e6e6e6;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 200px;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
  display: none;
  /* Hide by default to prevent FOUC */
  font-family: "Inter", Sans-serif;
}

.ms-dropdown-menu.active {
  display: flex;
  /* Show when active */
  flex-direction: column;
  opacity: 1;
  visibility: visible;
}

.breadcrumb-container {
  border: 2px solid var(--e-global-color-primary, #e60002);
  border-top: none;
  width: 100%;
  padding: 0px 8px;
  background-color: #e6e6e6;
  color: var(--e-global-color-text, #596f7e);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 12px;
  text-align: left;
}

.breadcrumb-container a {
  color: var(--e-global-color-primary, #e60002);
}

.ms-dropdown-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #333333;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.ms-dropdown-link:hover {
  background-color: #f8f9fa;
  color: #333333;
  text-decoration: none;
}

.ms-header-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  /* padding: 4rem 2rem; */
  text-align: center;
}

.ms-header-content {
  max-width: 800px;
  margin: 0 auto;
}

.ms-header-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ms-header-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0 0 2.5rem 0;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.ms-header-button {
  margin-top: 2rem;
}

.ms-header-button .ms-btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ms-header-button .ms-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: #ffffff;
}

.ms-header-button .ms-btn-primary:active {
  transform: translateY(0);
}

/* DROPDOWN MENU */

.ms-dropdown-menu-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--e-global-color-secondary, #2f3b4b);
  text-align: start;
  width: 100%;
}

.ms-dropdown-menu-description {
  font-size: 12px;
  font-weight: 400;
  color: var(--e-global-color-text, #596f7e);
  text-align: start;
}

/* MENU WWS */
.ms-dropdown-menu-wws-1,
.ms-dropdown-menu-wws-2,
.ms-dropdown-menu-wws-3,
.ms-dropdown-menu-wws-4 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 24px;
  justify-content: flex-start;
  align-items: flex-start;
}

.ms-dropdown-menu-wws-1 {
  width: 20%;
  border-left: 2px solid var(--e-global-color-primary, #e60002);
}

.ms-dropdown-menu-wws-2 {
  width: 30%;
  border-left: 2px solid var(--e-global-color-primary, #e60002);
}

.ms-dropdown-menu-wws-3 {
  width: 30%;
  border-left: 2px solid var(--e-global-color-primary, #e60002);
}

.ms-dropdown-menu-wws-2 .ms-description-text,
.ms-dropdown-menu-wws-3 .ms-description-text,
.ms-dropdown-menu-wws-3 .ms-favorite-title-link,
.ms-dropdown-menu-wws-2 .ms-favorite-title-link {
  text-align: start !important;
}

.ms-dropdown-menu-wws-4 {
  background-color: var(--e-global-color-secondary, #2f3b4b);
  width: 20%;
  color: white;
  font-size: 14px;
  text-align: start !important;
}

/* Red left border to separate section 3 from 4 only on desktop */
@media (min-width: 1025px) {
  .ms-dropdown-menu-wws-4 {
    border-left: 2px solid var(--e-global-color-primary, #e60002);
  }
}

/* MENU SERVICES */

/* MENU ITEM WITH ICON */
.ms-menu-item-icon {
  display: flex;
  flex-direction: column;
  max-width: 250px;
  margin: 0 auto !important;
  cursor: pointer;
  gap: 10px;
  width: 100%;
}

/* Alinear elementos dentro de wws-2 y wws-3 */
.ms-dropdown-menu-wws-2 .ms-menu-item-icon,
.ms-dropdown-menu-wws-3 .ms-menu-item-icon,
.ms-dropdown-menu-wws-3 .ms-dropdown-menu-one-item {
  flex: 1;
}

/* Center elements with max-width inside wws-2 and wws-3 */
.ms-dropdown-menu-wws-2>div[style*="max-width"],
.ms-dropdown-menu-wws-3>div[style*="max-width"] {
  margin: 0 auto;
}

.ms-menu-item-icon p {
  font-family: "Inter", Sans-serif;
}

.ms-menu-item-icon .ms-menu-item-icon-image {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.ms-menu-item-icon .ms-menu-item-icon-image img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

.ms-menu-item-icon .ms-menu-item-icon-image svg {
  margin-left: auto;
}

.ms-menu-item-icon .ms-menu-item-icon-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--e-global-color-secondary, #2f3b4b);
  text-align: start;
  line-height: 1.2;
}

.ms-menu-item-icon .ms-menu-item-icon-description {
  font-size: 12px;
  font-weight: 400;
  color: var(--e-global-color-text, #596f7e);
  text-align: start;
  /* Limit to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* QUICK LINKS */
.ms-dropdown-menu-quick-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--e-global-color-primary, #e60002);
  padding: 0.8rem;
  color: white;
  width: 100%;
}

.ms-dropdown-menu-quick-links p {
  font-size: 18px;
  font-weight: 600;
  text-align: start;
}

.ms-dropdown-menu-quick-links ul {
  display: flex;
  padding: 0 20px;
  flex-direction: column;
}

.ms-dropdown-menu-quick-links ul li {
  list-style: disc;
  text-align: start;
}

.ms-dropdown-menu-quick-links ul li a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

/* EDUCATION POSTS */
.ms-dropdown-menu-education-posts-container {
  display: flex;
  gap: 24px;
  width: 100%;
  padding: 0 24px;
  justify-content: space-evenly;
}

.ms-education-post-item {
  display: flex;
  /* padding: 16px; */
  color: var(--e-global-color-secondary, #2f3b4b);
  text-align: start;
  width: 50%;
  gap: 14px;
  align-items: center;
  flex-direction: column;
  max-width: 280px;
  position: relative;
}

.ms-education-post-item img {
  aspect-ratio: 3 / 1;
  height: 100px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: all 0.3s ease;
  width: 100%;
}

.ms-education-post-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.ms-education-post-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--e-global-color-secondary, #2f3b4b);
  text-align: start;
  line-height: 1.2;
  transition: all 0.3s ease;
}

.ms-education-post-item:hover .ms-education-post-title {
  opacity: 0.8;
}

.ms-education-post-title svg {
  width: 40px;
  transition: all 0.3s ease;
}

.ms-education-post-item:hover .ms-education-post-title svg {
  transform: translateX(3px);
}

/* Disable hover effects on mobile and tablet for Education images */
@media (max-width: 1024px) {
  .ms-education-post-item img {
    filter: grayscale(0%);
  }

  .ms-education-post-item:hover img {
    filter: grayscale(0%);
    transform: none;
  }

  .ms-education-post-item:hover .ms-education-post-title {
    opacity: 1;
  }

  .ms-education-post-item:hover .ms-education-post-title svg {
    transform: none;
  }
}

.ms-education-post-item-content {
  display: flex;
  gap: 10px;
}

.ms-education-post-category {
  background-color: var(--e-global-color-secondary, #2f3b4b);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
  font-weight: 600;
}

.ms-dropdown-menu-education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: row;
  width: 100%;
  height: 100%;
}

.ms-dropdown-menu-one-item {
  display: flex;
  align-items: center;
  gap: 2em;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--e-global-color-secondary, #2f3b4b);
  text-decoration: none;
  margin-top: auto;
  border-top: 2px solid var(--e-global-color-primary, #e60002);
  width: 100%;
  flex: 1;
  height: 100%;
  max-width: 100%;
}

.ms-dropdown-menu-one-item:hover {
  background-color: var(--e-global-color-primary, #e60002);
  color: white;
}

.ms-dropdown-menu-one-item:hover svg {
  fill: white;
}

/* Animation Effects */
.ms-header-title {
  animation: fadeInUp 0.8s ease-out;
}

.ms-header-subtitle {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.ms-header-button {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .ms-header-title {
    text-shadow: 0 0 0 transparent;
  }

  .ms-header-button .ms-btn-primary {
    border: 2px solid currentColor;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

  .ms-header-title,
  .ms-header-subtitle,
  .ms-header-button {
    animation: none;
  }

  .ms-header-button .ms-btn-primary {
    transition: none;
  }
}

/* ==========================================================================
   Mobile Menu Styles
   ========================================================================== */

/* Mobile Menu Toggle Button */
.ms-mobile-menu-toggle {
  display: none;
  align-self: center;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 !important;
  margin-top: 4px;
  margin-right: 4px;
  background-color: transparent !important;
  box-shadow: none !important;
  gap: 4px;
  color: var(--e-global-color-secondary, #2f3b4b);
}

.ms-mobile-menu-toggle svg {
  fill: var(--e-global-color-secondary, #2f3b4b);
}

/* Mobile Menu Overlay */
.ms-mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ms-mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu */
.ms-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100svh;
  background-color: #f5f5f5;
  z-index: 1002;
  transition: right 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 7%;
}

.ms-mobile-menu-overlay.active .ms-mobile-menu {
  right: 0;
}

/* Mobile Menu Header */
.ms-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--e-global-color-primary, #e60002);
  width: 100%;
}

.ms-mobile-logo {
  height: 30px;
  margin-bottom: -1px;
}

.ms-mobile-logo img {
  height: 100%;
  /* width: 100%; */
  object-fit: fill;
}

.ms-logo-icon {
  width: 40px;
  height: 40px;
  background-color: #e60001;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  border-radius: 4px;
}

.ms-logo-text {
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ms-mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #666;
  background-color: transparent !important;
  box-shadow: none !important;
}

.ms-mobile-menu-close svg {
  margin-bottom: -6px;
}

/* Mobile Menu Content */
.ms-mobile-menu-content {
  position: relative;
  height: calc(100% - 80px);
  overflow: hidden;
}

/* Mobile Menu Lists */
.ms-mobile-menu-list,
.ms-mobile-submenu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
  will-change: transform;
}

.ms-mobile-submenu {
  transform: translateX(100%);
  z-index: 10;
}

.ms-mobile-submenu.active {
  transform: translateX(0);
}

.ms-mobile-menu-list.slide-out {
  transform: translateX(-100%);
}

/* Mobile Menu Items */
.ms-mobile-menu-item,
.ms-mobile-submenu-item {
  border-bottom: 2px solid #e60001;
  border-left: 2px solid var(--e-global-color-primary, #e60002);
  border-right: 2px solid var(--e-global-color-primary, #e60002);
}

.ms-mobile-menu-link,
.ms-mobile-submenu-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
  background-color: #e6e6e6;
  transition: all 0.2s ease;
  font-family: "Lexend Giga", Sans-serif;
  gap: 10px;
}

.ms-mobile-menu-link:hover,
.ms-mobile-submenu-link:hover {
  background-color: #e0e0e0;
  color: #333;
  text-decoration: none;
}

.ms-mobile-contact {
  background-color: var(--e-global-color-primary, #e60002) !important;
  color: white !important;
}

.ms-mobile-contact:hover {
  background-color: #cc0001 !important;
  color: white !important;
}

.ms-mobile-where-are-we {
  background-color: var(--e-global-color-secondary, #2f3b4b) !important;
  color: white !important;
  text-transform: uppercase !important;
}

.ms-mobile-arrow {
  color: #666;
  transform: rotate(270deg);
  transition: transform 0.2s ease;
}

.ms-mobile-submenu .ms-mobile-submenu-description {
  font-size: 14px;
  color: var(--e-global-color-text, #596f7e);
  text-align: start;
  padding: 14px;
  border-left: 2px solid var(--e-global-color-primary, #e60002);
  border-right: 2px solid var(--e-global-color-primary, #e60002);
  width: 100%;
  max-width: 100%;
}

/* Mobile Submenu Header */
.ms-mobile-submenu-header {
  display: flex;
  align-items: center;
  background-color: #e60001;
  border-bottom: 1px solid #e60001;
  gap: 1rem;
  font-size: 12px;
  padding: 10px;
}

.ms-mobile-back-btn {
  background: none !important;
  border: none !important;
  cursor: pointer;
  box-shadow: none !important;
  padding: 0 !important;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ms-mobile-back-btn svg {
  transform: rotate(90deg);
}

.ms-mobile-submenu-title {
  color: white;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ms-mobile-submenu-link {
  background-color: #f5f5f5;
  padding-left: 2.5rem;
}

/* Tablet Responsive (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .breadcrumb-container {
    padding: 0px;
  }

  .fbc-page .fbc-wrap .fbc-items {
    padding: 0;
  }

  .ms-mobile-menu-content {
    overflow: hidden;
  }

  .ms-header-logo {
    margin-bottom: -3px;
  }

  .ms-mobile-menu-toggle {
    display: flex;
  }

  .ms-header-nav {
    display: none;
  }

  .ms-menu-item-icon {
    max-width: 100%;
    width: 100%;
    padding: 14px;
    border-bottom: 2px solid var(--e-global-color-primary, #e60002);
    border-left: 2px solid var(--e-global-color-primary, #e60002);
    border-right: 2px solid var(--e-global-color-primary, #e60002);
  }

  .ms-menu-item-icon br {
    display: inline;
    line-height: 0;
    font-size: 0;
  }

  .ms-menu-item-icon br::before {
    content: " ";
    font-size: 18px;
    line-height: 1.2;
  }

  .ms-menu-item-icon .ms-menu-item-icon-title {
    font-size: 18px;
  }

  .ms-menu-item-icon .ms-menu-item-icon-image {
    align-items: center;
  }

  .ms-dropdown-menu-education-posts-container {
    flex-direction: column;
    width: 100%;
    border-left: 2px solid var(--e-global-color-primary, #e60002);
    border-right: 2px solid var(--e-global-color-primary, #e60002);
    padding: 14px 0;
  }

  .ms-education-post-item {
    flex-direction: column;
    width: 80%;
    max-width: 100%;
    margin: 0 auto;
    align-items: flex-start;
  }

  .ms-education-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 1;
    filter: grayscale(0%);
  }

  .ms-education-post-category {
    text-align: center;
  }

  .ms-dropdown-menu-education-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .ms-dropdown-menu-one-item {
    border: 2px solid var(--e-global-color-primary, #e60002);
    border-top: none;
    padding: 14px;
    justify-content: space-between;
  }
}

/* Mobile Responsive (max-width: 767px) */
@media (max-width: 767px) {
  .fbc-page .fbc-wrap .fbc-items {
    padding: 0;
  }

  .breadcrumb-container {
    padding: 0px;
  }

  .ms-header-logo {
    margin-bottom: -3px;
  }

  /* Keep mobile menu content with hidden overflow */
  .ms-mobile-menu-content {
    overflow: hidden;
  }

  .ms-mobile-menu-toggle {
    display: flex;
  }

  .ms-header-nav {
    display: none;
  }

  .ms-menu-item-icon {
    max-width: 100%;
    width: 100%;
    padding: 14px;
    border-bottom: 2px solid var(--e-global-color-primary, #e60002);
    border-left: 2px solid var(--e-global-color-primary, #e60002);
    border-right: 2px solid var(--e-global-color-primary, #e60002);
  }

  .ms-menu-item-icon br {
    display: inline;
    line-height: 0;
    font-size: 0;
  }

  .ms-menu-item-icon br::before {
    content: " ";
    font-size: 18px;
    line-height: 1.2;
  }

  .ms-menu-item-icon .ms-menu-item-icon-title {
    font-size: 18px;
  }

  .ms-menu-item-icon .ms-menu-item-icon-image {
    align-items: center;
  }

  .ms-dropdown-menu-education-posts-container {
    flex-direction: column;
    width: 100%;
    border-left: 2px solid var(--e-global-color-primary, #e60002);
    border-right: 2px solid var(--e-global-color-primary, #e60002);
    padding: 14px 0;
  }

  .ms-education-post-item {
    flex-direction: column;
    width: 80%;
    max-width: 100%;
    margin: 0 auto;
    align-items: flex-start;
  }

  .ms-education-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 1;
    filter: grayscale(0%);
  }

  .ms-education-post-category {
    text-align: center;
  }

  .ms-dropdown-menu-education-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .ms-dropdown-menu-one-item {
    border: 2px solid var(--e-global-color-primary, #e60002);
    border-top: none;
    padding: 14px;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {

  .ms-mobile-menu-link,
  .ms-mobile-submenu-link {
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
  }

  .ms-logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .ms-logo-text {
    font-size: 1rem;
  }
}