/* Mega Menu Modal CSS - Full Viewport with Slide Animation */

.mega-menu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, top 0.3s ease;
}

/* Adjust mega menu modal overlay position when header is stuck */
.mega-menu-modal-overlay.header-is-stuck {
    top: 153px;
    height: calc(100% - 153px);
}

.mega-menu-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mega-menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), top 0.3s ease, height 0.3s ease;
}

/* Adjust mega menu modal position when header is stuck */
.mega-menu-modal.header-is-stuck {
    top: 153px;
    height: calc(100% - 153px);
}

/* In mobile, keep normal behavior */
@media (max-width: 951px) {
    .mega-menu-modal-overlay.header-is-stuck {
        top: 0;
        height: 100%;
    }
    
    .mega-menu-modal.header-is-stuck {
        top: 0;
        height: 100%;
    }
}

.mega-menu-modal-overlay.active .mega-menu-modal {
    transform: translateY(0);
}

.mega-menu-modal-content {
    display: flex;
    flex-direction: row;
    padding-top: 56px;
    padding-left: 134px;
    width: 100%;
    height: 100%;
    position: relative;
    max-width: 1536px;
    margin-right: 50px;
}

.mega-menu-modal-close {
    position: absolute;
    top: 6px;
    right: 12px;
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: #00262E;
}

.mega-menu-modal-close:hover {
    opacity: 0.7;
}

.logo-wrapper {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.logo-wrapper img {
  width: 200px;
  height: 77px;
}

.mega-menu-modal-links {
  display: flex;
  flex-direction: row;
  flex: 1;
  padding-top: 166px;
  width: 100%;
  max-width: 715px;
  height: 100%;
  max-height: 578px;
  margin-right: 100px;
}

.mega-menu-modal-left-links {
  display: flex;
  flex-direction: column;
  width: 45%;
  border-right: 1px solid #D2D2D2;
}

.mega-menu-link-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 28px;
  padding-right: 12px;
}

.mega-menu-modal-left-links .mega-menu-clickable {
  cursor: pointer;
  display: block;
  text-decoration: none;
  border-bottom: 5px solid transparent;
  transition: border-bottom 0.2s ease;
}

.mega-menu-modal-left-links .mega-menu-clickable .mega-menu-link {
  font-size: 24px;
  font-weight: 600;
  color: #003364;
  line-height: 100%;
  text-transform: uppercase;
  display: block;
}

.mega-menu-modal-left-links .mega-menu-clickable.active {
  border-bottom: 5px solid #F0D576 !important;
}

.mega-menu-modal-left-links .mega-menu-link-wrapper:first-child .mega-menu-clickable {
  border-bottom: 5px solid #F0D576;
}

.mega-menu-modal-left-links .mega-menu-link-wrapper:first-child .mega-menu-clickable.clicked {
  border-bottom: 5px solid transparent;
}

.mega-menu-chevron {
  font-size: 24px;
  color: #547B82;
  cursor: pointer;
  transition: opacity 0.2s ease;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mega-menu-chevron:hover {
  opacity: 0.7;
}

/* Mostra o chevron apenas quando o item estiver ativo */
.mega-menu-link-wrapper:has(.mega-menu-clickable.active) .mega-menu-chevron {
  opacity: 1;
  visibility: visible;
}

/* Estado inicial - primeiro item ativo */
.mega-menu-link-wrapper:first-child .mega-menu-chevron {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Remove chevron do primeiro item quando clicado */
.mega-menu-link-wrapper:first-child:has(.mega-menu-clickable.clicked) .mega-menu-chevron {
  opacity: 0 !important;
  visibility: hidden !important;
}

.mega-menu-modal-right-links {
  display: flex;
  flex-direction: column;
  width: 55%;
  padding-left: 54px;
}

.mega-menu-modal-right-links span {
  font-size: 32px;
  margin-bottom: 30px;
  font-weight: 500;
  color: #003364;
  text-decoration: none;
  line-height: 100%;
  text-transform: uppercase;
}

.mega-menu-modal-right-links a {
  font-size: 20px;
  font-weight: 400;
  color: #00262E;
  text-decoration: none;
  line-height: 24px;
  margin-bottom: 20px;
}

.mega-menu-modal-image {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  max-width: 510px;
  max-height: 880px;
}

.mega-menu-modal-image img {
  width: 100%;
  height: auto;
  max-width: 510px;
  max-height: 880px;
  object-fit: contain;
}

/* Guides and Reports Secondary Modal */
.guides-reports-modal {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10001;
    border-left: 1px solid #e0e0e0;
}

.guides-reports-modal.active {
    opacity: 1;
    visibility: visible;
}

.guides-reports-container {
    padding: 56px 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.guides-reports-container::-webkit-scrollbar {
    display: none;
}

.guides-reports-title {
    font-size: 32px;
    color: #003364;
    font-weight: 700;
    line-height: 100%;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.guides-reports-link {
    font-size: 20px;
    color: #003364;
    font-weight: 700;
    line-height: 100%;
    text-decoration: none;
    margin-bottom: 20px;
    display: block;
}

.guides-reports-link:hover {
    opacity: 0.7;
}

#guides-reports-trigger {
    cursor: pointer;
    position: relative;
    border-bottom: 3px solid transparent;
    transition: border-bottom 0.2s ease;
}

#guides-reports-trigger.active {
    border-bottom: 3px solid #F0D576;
}

#guides-reports-trigger::after {
    content: "›";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #547B82;
}

/* Responsive Design - Below 1280px */
@media (max-width: 1279px) {
    .mega-menu-modal-content {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px;
        padding-right: 40px;
        padding-bottom: 40px;
        overflow: auto;
    }
    
    .logo-wrapper {
        margin-bottom: 88px;
    }
    
    .mega-menu-modal-links {
        padding-top: 0;
        margin-right: 0;
        max-width: 100%;
    }
    
    .mega-menu-modal-image {
        margin-left: 0;
        margin-top: 40px;
        align-self: flex-start;
    }
    
    .guides-reports-modal {
        width: 100%;
        right: 0;
        top: 0;
    }

    .mega-menu-modal-left-links {
        width: 35%;
    }

    .mega-menu-modal-right-links {
        width: 65%;
    }
}