/* Page-specific styles for especialistas.html */

/* Nav background to cover timeline when scrolling - only in section 3 */
body.scroll-section-three .fixed-nav {
    background-color: #FD4950 !important;
}

/* Brasil menu item always visible */
.menu .brasil-menu-item {
    opacity: 1 !important;
    visibility: visible !important;
    max-width: 300px;
    margin-right: 40px;
}

.menu .brasil-menu-item a {
    color: #FD4950 !important;
    font-family: "MD Nichrome", sans-serif !important;
    font-size: 25px !important;
    font-style: normal !important;
    font-weight: 500 !important;
    line-height: normal !important;
}

/* Section 1: Gradient background and nav colors like index with dark background */
.section-one {
    background: linear-gradient(180deg, #380131 16.94%, #FD4950 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.menu li a {
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    transition: color 0.25s ease;
}

/* Mobile hamburger and search - same color as menu */
.mobile-search-icon svg {
    color: #FDFFDA;
}

.hamburger-icon {
    color: #FDFFDA;
}

.mobile-hamburger-box {
    border-left-color: #FDFFDA;
}

.menu li a.active {
    color: #FDFFDA;
    font-weight: 800;
}

.logo svg path:not(:first-child) {
    fill: #FDFFC2;
}

.logo a {
    color: #FDFFDA;
}

.search-icon {
    color: #380131;
}

.search input {
    background-color: #FDFFDA;
    color: rgba(56, 1, 49, 0.30);
}

.search input::placeholder {
    color: rgba(56, 1, 49, 0.30);
}

.nav-separator {
    background-color: #FD4950;
}

/* Logo size and color (same as index) */
.logo svg {
    width: 137.159px;
    height: 21.3px;
}

.logo svg path:first-child {
    fill: #FD4950;
}

/* Section two: background #380131, text should be light */
body.scroll-section-two .fixed-text {
    color: #FDFFDA;
}

/* Logo color in section two */
body.scroll-section-two .logo svg path:not(:first-child) {
    fill: #380131;
}

/* Logo color in section three (same as section two) */
body.scroll-section-three .logo svg path:not(:first-child) {
    fill: #380131;
}

/* Section 2: background #FD4950 */
.section-two {
    background-color: #FD4950;
}

/* Revert mobile menu colors for especialistas page (section 2 has #FD4950, not #FDFFDA) */
body.scroll-section-two .mobile-menu {
    background-color: #FDFFDA; /* Keep default light yellow */
}

body.scroll-section-two .mobile-menu li a {
    color: #380131; /* Keep default dark purple */
}

body.scroll-section-two .mobile-menu li:not(:last-child)::after {
    background-color: #380131; /* Keep default dark purple separator */
}

body.scroll-section-two .mobile-menu li a:hover {
    background-color: rgba(56, 1, 49, 0.05); /* Keep default hover */
}

body.scroll-section-two .section-two {
    background-color: #FD4950;
}

body.scroll-section-two .menu li a {
    color: #FDFFDA;
}

body.scroll-section-two .mobile-search-icon svg {
    color: #FDFFDA;
}

/* Hamburger uses nav-separator color (#FDFFDA) in section 2 */
body.scroll-section-two .hamburger-icon {
    color: #FDFFDA;
}

body.scroll-section-two .mobile-hamburger-box {
    border-left-color: #FDFFDA;
}

body.scroll-section-two .menu li a.active {
    color: #FDFFDA;
    font-weight: 800;
}

body.scroll-section-two .logo svg path:not(:first-child) {
    fill: #FDFFC2;
}

body.scroll-section-two .logo a {
    color: #FDFFDA;
}

body.scroll-section-two .search-icon {
    color: #380131;
}

body.scroll-section-two .search input {
    background-color: #FDFFDA;
    color: rgba(56, 1, 49, 0.30);
}

body.scroll-section-two .search input::placeholder {
    color: rgba(56, 1, 49, 0.30);
}

body.scroll-section-two .nav-separator {
    background-color: #FDFFDA;
}

/* Brasil menu item doesn't change in section 2 */
body.scroll-section-two .menu .brasil-menu-item a {
    color: #380131 !important;
}

/* Section 3: same background and colors as section 2 */
.section-three {
    background-color: #FD4950;
}

body.scroll-section-three .section-three {
    background-color: #FD4950;
    display: block;
    align-items: normal;
    justify-content: normal;
}

/* Revert mobile menu colors for especialistas page section 3 (has #FD4950, not #FDFFDA) */
body.scroll-section-three .mobile-menu {
    background-color: #FDFFDA; /* Keep default light yellow */
}

body.scroll-section-three .mobile-menu li a {
    color: #380131; /* Keep default dark purple */
}

body.scroll-section-three .mobile-menu li:not(:last-child)::after {
    background-color: #380131; /* Keep default dark purple separator */
}

body.scroll-section-three .mobile-menu li a:hover {
    background-color: rgba(56, 1, 49, 0.05); /* Keep default hover */
}

body.scroll-section-three .menu li a {
    color: #FDFFDA;
}

body.scroll-section-three .mobile-search-icon svg {
    color: #FDFFDA;
}

/* Hamburger uses nav-separator color (#FDFFDA) in section 3 */
body.scroll-section-three .hamburger-icon {
    color: #FDFFDA;
}

body.scroll-section-three .mobile-hamburger-box {
    border-left-color: #FDFFDA;
}

body.scroll-section-three .menu li a.active {
    color: #FDFFDA;
    font-weight: 800;
}

body.scroll-section-three .logo svg path:not(:first-child) {
    fill: #FDFFC2;
}

body.scroll-section-three .logo a {
    color: #FDFFDA;
}

body.scroll-section-three .search-icon {
    color: #380131;
}

body.scroll-section-three .search input {
    background-color: #FDFFDA;
    color: rgba(56, 1, 49, 0.30);
}

body.scroll-section-three .search input::placeholder {
    color: rgba(56, 1, 49, 0.30);
}

body.scroll-section-three .nav-separator {
    background-color: #FDFFDA;
}

/* Brasil menu item doesn't change in section 3 */
body.scroll-section-three .menu .brasil-menu-item a {
    color: #380131 !important;
}

/* Section 3 Layout - Two columns */
.section-three-layout {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 100px;
    height: 100vh;
    box-sizing: border-box;
    align-items: start;
}

.filter-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    padding-top: 147px;
}

.sidebar-title {
    color: #380131;
    font-family: "MD Nichrome", sans-serif;
    font-size: 60px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    margin-bottom: 30px;
}

.sidebar-text {
    color: #380131;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 30px;
}

.search-filter-container {
    margin-top: 0;
}

.filter-title {
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: 100%;
    letter-spacing: 0%;
    margin-bottom: 16px;
}

/* Filter options */
.filter-options {
    margin-top: 0;
    margin-left: 0;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(251, 120, 128, 0.3) transparent;
}

.filter-options::-webkit-scrollbar {
    width: 4px;
}

.filter-options::-webkit-scrollbar-track {
    background: transparent;
}

.filter-options::-webkit-scrollbar-thumb {
    background: rgba(251, 120, 128, 0.3);
    border-radius: 2px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 120, 128, 0.5);
}

.filter-option {
    width: 210px;
    height: 32px;
    border-radius: 16px;
    background: var(--ODDSGATE-BERRY, #6B025D);
    color: #380131;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
}

.filter-options-ano .filter-option {
    width: 88px;
}

.filter-option:hover {
    opacity: 0.9;
}

.filter-option.selected,
.filter-options-ano .filter-option.selected {
    background: #FB7880 !important;
    color: #FDFFDA !important;
}

.filter-input-container {
    margin-top: 0;
}

/* Search filter input styles for especialistas - using #380131 */
.filter-sidebar .filter-input-wrapper {
    position: relative;
    width: 208px;
    height: 32px;
}

.filter-sidebar .filter-input {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: #380131;
    color: rgba(253, 255, 218, 0.40);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    padding: 0 40px 0 16px;
    border: none;
    outline: none;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

.filter-sidebar .filter-input::placeholder {
    color: rgba(253, 255, 218, 0.40);
}

.filter-sidebar .filter-input:focus {
    opacity: 0.9;
}

.filter-sidebar .filter-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(253, 255, 218, 0.40);
    pointer-events: none;
}

.filter-sidebar .suggestions-list {
    width: 208px;
    height: 188px;
    border-radius: 0 0 15px 15px;
    background: rgba(56, 1, 49, 0.10);
    margin-top: -16px;
    margin-left: 0;
    padding: 0;
    padding-top: 25px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 12px;
    overflow-y: auto;
    box-sizing: border-box;
    position: relative;
}

.filter-sidebar .suggestion-item {
    color: #380131;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    padding: 8px 0;
    padding-left: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.filter-sidebar .suggestion-item:hover {
    opacity: 0.7;
}

.content-area {
    padding-top: 147px;
    padding-bottom: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100vh;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    box-sizing: border-box;
    /* Smooth scrolling */
    scroll-behavior: smooth;
}

/* Especialistas Grid Layout - 3 columns */
.especialistas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

.especialista-card {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.especialista-card:hover {
    transform: translateY(-4px);
    opacity: 0.9;
}

.especialista-image {
    width: 289px;
    height: 194px;
    object-fit: cover;
    border-radius: 21px;
    margin-bottom: 20px;
}

.especialista-content {
    display: flex;
    flex-direction: column;
}

.especialista-title {
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 21px;
    font-style: normal;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: 0%;
    margin-bottom: 12px;
}

.especialista-excerpt {
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 800;
    line-height: 100%;
    letter-spacing: 0%;
    margin-bottom: 16px;
}

.especialista-link {
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 100%;
    letter-spacing: 0%;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-offset: 0%;
    text-decoration-thickness: 0%;
    text-decoration-skip-ink: auto;
    transition: opacity 0.3s ease;
    align-self: flex-start;
}

.especialista-link:hover {
    opacity: 0.7;
}

.load-more-button {
    grid-column: 1 / -1;
    justify-self: center;
    background-color: #380131;
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    margin-top: 20px;
}

.load-more-button:hover {
    opacity: 0.9;
}

/* Bootstrap Breakpoints - Especialistas */

/* Add padding when timeline is present to allow items to scale */
.content-area:has(.timeline) {
    padding-left: 100px;
    padding-right: 100px;
}

.content-area::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.content-area .timeline {
    padding-top: 0;
    margin-top: 0;
}

.content-area:has(.timeline) {
    padding-top: 54px;
}

.content-title {
    color: #FD4950;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 48px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 30px;
    max-width: 789px;
}

.content-text {
    color: rgba(253, 73, 80, 0.8);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 40px;
    max-width: 419px;
}

.cta-button {
    background-color: #FDFFDA;
    color: #FD4950;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
    background-color: #FD4950;
    color: #FDFFDA;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding: 0;
    /* Add padding to allow items to scale without being cut */
    /* Top padding needs to be large enough to allow first item to be centered */
    padding-top: 400px;
    padding-bottom: 150px;
    /* Ensure timeline content can scale */
    min-height: 100%;
}

/* Vertical line - fixed to section 3 */
.timeline::before {
    content: '';
    position: fixed;
    left: var(--timeline-line-left, 50%);
    top: var(--timeline-line-top, 0);
    height: var(--timeline-line-height, 100vh);
    width: 2px;
    background-color: transparent;
    background-image: repeating-linear-gradient(
        to bottom,
        #FDFFDA 0,
        #FDFFDA 12px,
        transparent 12px,
        transparent 24px
    );
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    /* Hide until positioned correctly */
    opacity: 0;
    /* Smooth transition only after initial render */
    transition: left 0.3s ease, top 0.3s ease, height 0.3s ease, opacity 0.1s ease;
}

/* Show line when ready */
.timeline.line-ready::before {
    opacity: 1;
}

/* Disable transition on initial render */
.timeline.no-transition::before {
    transition: none;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 60px;
    transform-origin: center center;
    will-change: transform, opacity;
    /* Prevent items from being cut when scaling */
    overflow: visible;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Alternating layout */
.timeline-item:nth-child(odd) {
    justify-content: flex-start;
    padding-right: calc(50% + 30px);
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
    padding-left: calc(50% + 30px);
}

/* Timeline dot */
.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-color: #FB7880;
    border-radius: 50%;
    top: 20px;
    z-index: 2;
}

/* Card content */
.timeline-content {
    width: 100%;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    text-align: left;
}

.timeline-item:nth-child(even) .result-title,
.timeline-item:nth-child(even) .result-excerpt {
    text-align: left;
}

/* Keyword tag */
.result-keyword {
    display: inline-block;
    color: #FB7880;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0%;
    margin-bottom: 15px;
    margin-top: 0;
    padding: 0;
    border: none;
    text-transform: uppercase;
}

.result-title {
    color: #FDFFDA;
    font-family: "MD Nichrome", sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: right;
    margin-bottom: 12px;
    margin-top: 0;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-excerpt {
    color: #FFFFFF;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: right;
    margin-bottom: 10px;
    margin-top: 0;
    padding: 0;
}

.read-more-link {
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0%;
    text-decoration: none;
    margin-top: 0;
    padding: 0;
    display: inline-block;
    transition: opacity 0.3s ease, text-decoration 0.3s ease;
}

.read-more-link:hover {
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-offset: 0%;
    text-decoration-thickness: 1px;
    text-decoration-skip-ink: auto;
    opacity: 0.7;
}

.no-results {
    color: rgba(253, 255, 218, 0.6);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: center;
    padding: 60px 0;
}

/* Filter display */
.filter-display {
    color: #FDFFDA;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    margin-bottom: 40px;
    text-align: center;
}

/* Mobile pequeno (xs: < 576px) */
@media (max-width: 575px) {
    .section-three-layout {
        padding: 0 20px;
        grid-template-columns: 1fr;
        gap: 30px;
        height: auto;
        min-height: 100vh;
    }
    
    .filter-sidebar {
        position: relative;
        padding-top: 20px;
    }
    
    .sidebar-title {
        font-size: 36px;
        margin-bottom: 25px;
    }
    
    .sidebar-text {
        font-size: 14px;
    }
    
    .filter-title {
        font-size: 18px;
    }
    
    .filter-option,
    .filter-sidebar .filter-input-wrapper,
    .filter-sidebar .suggestions-list {
        width: 100%;
        max-width: 100%;
    }
    
    .especialistas-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .especialista-image {
        width: 100%;
        max-width: 289px;
        height: auto;
        aspect-ratio: 289/194;
    }
    
    .content-area:has(.timeline) {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .timeline-item:nth-child(odd) {
        padding-right: 20px;
    }
    
    .timeline-item:nth-child(even) {
        padding-left: 20px;
    }
    
    .content-title {
        font-size: 28px;
        max-width: 100%;
    }
    
    .content-text {
        font-size: 16px;
        max-width: 100%;
    }
}

/* Mobile grande / Tablet pequeno (sm: ≥ 576px) */
@media (min-width: 576px) and (max-width: 767px) {
    .section-three-layout {
        padding: 0 25px;
        grid-template-columns: 1fr;
        gap: 35px;
        height: auto;
        min-height: 100vh;
    }
    
    .filter-sidebar {
        position: relative;
        padding-top: 25px;
    }
    
    .sidebar-title {
        font-size: 42px;
        margin-bottom: 30px;
    }
    
    .filter-option,
    .filter-sidebar .filter-input-wrapper,
    .filter-sidebar .suggestions-list {
        width: 100%;
        max-width: 100%;
    }
    
    .especialistas-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .especialista-image {
        width: 100%;
        max-width: 289px;
        height: auto;
        aspect-ratio: 289/194;
    }
    
    .content-area:has(.timeline) {
        padding-left: 25px;
        padding-right: 25px;
    }
    
    .content-title {
        font-size: 32px;
        max-width: 100%;
    }
    
    .content-text {
        font-size: 17px;
        max-width: 100%;
    }
}

/* Tablet (md: ≥ 768px) */
@media (min-width: 768px) and (max-width: 991px) {
    .section-three-layout {
        padding: 0 30px;
        grid-template-columns: 280px 1fr;
        gap: 50px;
    }
    
    .sidebar-title {
        font-size: 48px;
    }
    
    .filter-option {
        width: 100%;
        max-width: 210px;
    }
    
    .filter-sidebar .filter-input-wrapper {
        width: 100%;
        max-width: 208px;
    }
    
    .filter-sidebar .suggestions-list {
        width: 100%;
        max-width: 208px;
    }
    
    .especialistas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }
    
    .especialista-image {
        width: 100%;
        max-width: 289px;
    }
    
    .content-area:has(.timeline) {
        padding-left: 50px;
        padding-right: 50px;
    }
    
    .content-title {
        font-size: 38px;
        max-width: 100%;
    }
    
    .content-text {
        font-size: 18px;
        max-width: 100%;
    }
}

/* Desktop pequeno (lg: ≥ 992px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .section-three-layout {
        padding: 0 35px;
        grid-template-columns: 320px 1fr;
        gap: 70px;
    }
    
    .sidebar-title {
        font-size: 54px;
    }
    
    .especialistas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (xl: ≥ 1200px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .section-three-layout {
        padding: 0 40px;
    }
    
    .especialistas-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop grande (xxl: ≥ 1400px) */
@media (min-width: 1400px) {
    .section-three-layout {
        padding: 0 calc((100vw - 1400px) / 2);
        max-width: none;
    }
}
