/* 
   High-End Editorial Portal Design - Algodres Online
   Aesthetics: Refined, Institutional, Sharp, Authentic
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --header-height: 100px;
    --sidebar-width: 320px;

    /* Professional Muted Palette - Editorial Focus */
    --primary: #121416;
    --primary-alt: #2a2d30;
    --accent: #9a7d5a;
    /* Burnished Bronze */
    --accent-hover: #bda282;

    --bg-body: #fdfdfd;
    /* Off-white paper feel */
    --bg-alt: #f1f3f5;
    --border: rgba(0, 0, 0, 0.08);

    --text-body: #2c2e30;
    --text-muted: #666c72;

    --radius: 0px;
    /* Sharp editorial edges for most elements */
    --radius-rounded: 0px;
    /* ALL Sharp edges as requested by client */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 17px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--text-body);
    background-color: var(--bg-body);
    line-height: 1.8;
    padding-top: var(--header-height);
    font-size: 1.05rem;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;

    /* Elegant Global Scrollbar - Webkit */
}

/* Custom Scrollbar (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    /* Very subtle track for better visibility of the bar path */
}

::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    /* Very Light Gray */
    border-radius: 0px;
    /* Sharp edges */
}

/* Base Layout for Secondary Pages */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body,
main,
section,
header,
footer,
div {
    max-width: 100%;
}

body {
    width: 100%;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

.layout-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* noise grain effect - constant but subtle */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/asfalt-dark.png");
    opacity: 0.015;
    pointer-events: none;
    z-index: 10000;
}

h1,
h2,
h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.15em;
    /* Match Menu */
    overflow-wrap: anywhere;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    overflow-wrap: anywhere;
}

/* --- Refined Header --- */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-body);
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    padding: 0 4rem;
    z-index: 2000;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.logo-text {
    display: inline-block;
    min-width: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 3rem;
    min-width: 0;
    flex: 1 1 auto;
}

.menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
}

.menu-btn i {
    font-size: 1.2rem;
}

.header-logo a {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    max-width: 70vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header-logo a::after {
    content: 'EST. 1096';
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: 20px;
    margin-left: 4px;
}

/* Header Middle Navigation */
.header-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.header-nav .nav-item {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    padding: 5px 0;
}

.header-nav .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.header-nav .nav-item:hover {
    color: var(--accent);
}

.header-nav .nav-item:hover::after {
    width: 100%;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    flex: 0 0 auto;
    min-width: 0;
}

.search-bar {
    border-bottom: 2px solid var(--border);
    padding: 6px 0;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-bottom-color: var(--primary);
}

.search-bar input {
    border: none;
    outline: none;
    padding: 0 10px;
    font-size: 1rem;
    font-family: inherit;
    width: 200px;
    background: transparent;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
}

.header-link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--primary-alt);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-link:hover {
    color: var(--accent);
}

.social-mini {
    display: flex;
    gap: 1.2rem;
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
}

.social-mini a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-mini a:hover {
    color: var(--primary);
}

.main-content {
    flex: 1;
    min-width: 0;
    background-color: var(--bg-body);
    padding: 0;
    padding-bottom: 8rem;
    /* Added space before footer */
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.content-section {
    width: 100%;
    margin: 0;
}

.centered-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    /* O texto em si à esquerda para leitura, mas o bloco no centro */
}

.centered-content p.lead-text {
    text-align: center;
    margin: 0 auto;
    width: 100%;
}

/* --- Clean Sidebar --- */
/* --- High-End Light Sidebar --- */
.sidebar {
    width: 420px;
    /* Adjusted width */
    background-color: var(--bg-body);
    color: var(--text-body);
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 0;
    z-index: 900;
    border-right: 1px solid var(--border);
    transform: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;

    /* Elegant Scrollbar Styling - Webkit only for sharp edges */
    /* scrollbar-width currently removed to ensure we can force sharp corners via webkit */
}

.sidebar::-webkit-scrollbar {
    width: 4px;
    /* Increased to make sharp edges visible */
}

.sidebar::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 0px !important;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 0px !important;
}

.sidebar::-webkit-scrollbar-button {
    display: none;
    border-radius: 0px !important;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darker for better focus on menu */
    backdrop-filter: blur(5px);
    z-index: 2400;
    /* Just below sidebar */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body.sidebar-active .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-header {
    padding: 2rem 2.5rem;
    /* Reduced padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg-body);
}

.sidebar-header .close-sidebar {
    display: none !important;
}

.sidebar-logo {
    height: 35px;
    /* Slightly smaller */
    object-fit: contain;
    display: block;
}

.sidebar-nav {
    padding: 4rem 2.5rem 2rem 2.5rem;
    /* Increased top spacing to match group gaps */
    flex: 1;
}

.nav-group {
    margin-bottom: 3rem;
    opacity: 1;
    transform: none;
}

/* Stagger targets for JS to potentially handle or CSS nth-child */
body.sidebar-active .nav-group:nth-child(1) {
    transition-delay: 0.1s;
}

body.sidebar-active .nav-group:nth-child(2) {
    transition-delay: 0.2s;
}

body.sidebar-active .nav-group:nth-child(3) {
    transition-delay: 0.3s;
}

body.sidebar-active .nav-group:nth-child(4) {
    transition-delay: 0.4s;
}

body.sidebar-active .nav-group:nth-child(5) {
    transition-delay: 0.5s;
}

.nav-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav ul li {
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.nav-link {
    display: flex;
    align-items: flex-end;
    padding: 12px 0;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85rem;
    /* Match header nav style */
    color: var(--primary);
    font-weight: 700;
    /* Match header nav style */
    text-transform: uppercase;
    letter-spacing: 0.15em;
    /* Match header nav style */
    line-height: 1.4;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    width: 100%;
}

.nav-link:hover {
    color: var(--accent);
    padding-left: 15px;
}

.nav-link .link-index {
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--accent);
    font-size: 0.75rem;
    margin-right: 1.5rem;
    margin-bottom: 4px;
    opacity: 0.6;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.nav-link.active {
    color: var(--accent);
    font-weight: 700;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 50%;
    width: 15px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.nav-link:hover::before {
    transform: scaleX(1);
}



/* Explicit Container Centering */
.container {
    max-width: 1400px;
    /* Slightly wider for modern screens */
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-section {
    position: relative;
    height: calc(100vh - var(--header-height));
    min-height: 600px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center horizontally */
    padding: 0 2rem;
    /* Left-aligned content */
    overflow: hidden;
    text-align: center;
    /* Center text */
}

.hero-section,
.hero-video,
.hero-bg {
    max-width: 100%;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
    z-index: 1;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }

    .hero-bg {
        display: block;
        background-color: var(--primary);
        opacity: 0.5;
        background-image: url('../imagens/mainfoto.jpg');
    }
}

.hero-bg {
    /* Kept for potential secondary usage, but suppressed in hero if video is present */
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 5;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 900px;
}

.hero-content .section-index {
    color: #fff;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.hero-content h1 {
    color: #fff;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: 0.1em;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
}

.hero-lead {
    font-size: 1.15rem;
    margin: 0 auto 3.5rem auto;
    /* Centered margin */
    max-width: 650px;
    opacity: 0.9;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 20px 50px;
    background: transparent;
    color: var(--primary);
    /* Visible on light backgrounds */
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    border: 1px solid var(--primary);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* White version for Hero */
.hero-content .cta-button {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.hero-content .cta-button:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}


/* Secondary Button Generic */
.cta-button.secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.cta-button.secondary:hover {
    background: var(--primary);
    color: #fff;
}

/* Secondary Button SPECIFIC for Hero (Dark Background) */
.hero-content .cta-button.secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(4px);
}

.hero-content .cta-button.secondary:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}



/* --- Section Styling --- */
.content-section {
    padding: 0.5rem 4rem;
}

.section-header {
    margin-bottom: 6rem;
    position: relative;
    text-align: center;
    /* Centralizado */
}

.section-header h2 {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: 0.05em;
    /* Unificado */
    font-weight: 600;
    text-transform: uppercase;
    font-family: 'IBM Plex Sans', sans-serif;
    margin: 0;
}

.section-index {
    display: block;
    font-size: 0.7rem;
    font-family: 'IBM Plex Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 700;
}

.section-header::after {
    display: none;
    /* remove old big numbers */
}

.section-header.s-1::after {
    content: '01';
}

.section-header.s-2::after {
    content: '02';
}

/* --- Editorial Flow (Asymmetric Layout) --- */
.editorial-flow {
    display: flex;
    flex-direction: column;
    gap: 12rem;
    margin-top: 4rem;
}

.ed-item {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 8rem;
    align-items: center;
}

.ed-item.reversed {
    grid-template-columns: 1fr 1.2fr;
}

.ed-item.reversed .ed-image {
    order: 2;
}

.ed-item.reversed .ed-content {
    order: 1;
    text-align: right;
    align-items: flex-end;
}

.ed-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-alt);
    border-radius: var(--radius-rounded);
    /* Rounded corners only here */
}

.ed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2) contrast(1.1);
    transition: transform 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: var(--radius-rounded);
}

.ed-item:hover .ed-image img {
    transform: scale(1.1) rotate(1deg);
    filter: sepia(0);
}

.ed-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ed-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--accent);
    font-weight: 600;
}

.ed-content h3 {
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.ed-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.6;
}

.ed-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    /* More space for a cleaner feel */
    font-size: 0.9rem;
    color: var(--primary);
    position: relative;
    width: fit-content;
    padding-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.ed-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 1px;
    background: var(--accent);
    transition: var(--transition);
}

.ed-link:hover::after {
    width: 100%;
}

/* Clean Professional Discovery Button */
.btn-discover {
    font-style: normal;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.8rem;
    padding: 1.2rem 3rem;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 1rem;
}

.btn-discover::after {
    display: none;
}

.btn-discover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary);
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: -1;
}

.btn-discover:hover {
    color: #fff;
    border-color: var(--primary);
}

.btn-discover:hover::before {
    width: 100%;
}

.btn-discover:active {
    transform: scale(0.98);
}

.ed-item:hover .ed-link::after {
    width: 100%;
}

@media (max-width: 1100px) {

    .ed-item,
    .ed-item.reversed {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .ed-item.reversed .ed-image {
        order: 1;
    }

    .ed-item.reversed .ed-content {
        order: 2;
        text-align: left;
        align-items: flex-start;
    }

    .ed-content h3 {
        font-size: 2.5rem;
    }

    .editorial-flow {
        gap: 8rem;
    }
}

/* --- Culture Highlight Section (Ultra-Compact) --- */
.culture-highlight {
    padding: 4rem 0;
    background: #fdfdfd;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.culture-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    gap: 4rem;
    align-items: stretch;
    /* Match height of both columns */
}

.culture-image {
    position: relative;
    background: #000;
    overflow: hidden;
    border-radius: 0;
    /* Sharp corners as requested */
}

.culture-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    filter: contrast(1.05) saturate(0.9);
    transition: var(--transition);
    border-radius: 0;
}

.image-caption {
    position: absolute;
    bottom: -3rem;
    left: 0;
    display: flex;
    gap: 2rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.cap-label {
    font-weight: 700;
    color: var(--accent);
}

.culture-text {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.quote-wrapper {
    padding-left: 3rem;
    border-left: 1px solid var(--accent);
}

.ed-quote {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.7rem;
    font-style: italic;
    color: var(--primary);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.ed-quote::before {
    display: none;
    /* remove redundant as it has border now */
}

.lead-text {
    font-size: 1rem;
    /* Slightly smaller */
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 480px;
}

.contact-card {
    margin-top: 1rem;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-header {
    margin-bottom: 0;
}

.contact-header h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 700;
}

.contact-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.contact-body p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .culture-wrapper {
        grid-template-columns: 1fr;
        gap: 10rem;
    }

    .culture-image {
        max-width: 600px;
        margin: 0 auto;
    }
}

.minimal-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--accent);
}

.minimal-link:hover {
    color: var(--primary);
}

@media (max-width: 1200px) {
    .culture-wrapper {
        grid-template-columns: 1fr;
        gap: 6rem;
    }

    .culture-image {
        position: static;
        aspect-ratio: 16/9;
        box-shadow: 20px 20px 0px -10px var(--accent);
    }
}

@media (max-width: 768px) {
    .culture-highlight {
        margin-left: 0;
        padding: 6rem 1.5rem;
    }
}

/* --- Partners Section (Minimalist & Professional) --- */
.partners-section {
    padding: 6rem 0;
    background: #fff;
    border-top: 1px solid var(--border);
}

.partners-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-item {
    transition: var(--transition);
    opacity: 1;
    filter: none;
}

.partner-item:hover {
    opacity: 1;
    filter: none;
    transform: none;
}

.partner-item img {
    height: 58px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 768px) {
    .partners-section {
        padding: 4rem 1.5rem;
    }

    .partners-wrapper {
        gap: 3rem;
    }

    .partner-item img {
        height: 44px;
    }
}


/* --- Directory & Business Styles --- */
.directory-section {
    padding: 2rem 0 8rem 0;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    justify-content: center;
}

.biz-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 2.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.biz-card:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-5px);
}

.biz-name {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.6rem;
    color: var(--primary);
    line-height: 1.3;
    margin: 0;
}

.biz-details {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.biz-contacts {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.biz-contact-item {
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-body);
}

.biz-contact-item i {
    color: var(--accent);
    width: 20px;
    text-align: center;
    font-size: 1rem;
    margin-top: 3px;
}

/* --- Industry Institutional Directory --- */
.directory-section {
    background-color: #ffffff;
    padding: 8rem 0;
}

.directory-compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    max-width: 1000px;
    margin: 0 auto;
}

.compact-biz-card {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    /* No hover effects as per request */
}

.card-count {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    font-weight: 800;
}

.biz-category-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.biz-title-refined {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    color: var(--primary);
}

.biz-contact-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.contact-item {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-item i {
    color: var(--accent);
    margin-right: 8px;
    font-size: 0.8rem;
}

.contact-item span {
    color: var(--primary);
    font-weight: 500;
}

/* Editorial Grid (for collections/galleries) */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ed-grid-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: var(--bg-alt);
}

.ed-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ed-grid-item:hover img {
    transform: scale(1.1);
}

.ed-grid-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    z-index: 2;
}

.ed-grid-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    z-index: 1;
}

.contact-item small {
    color: var(--accent);
    margin: 0 5px;
}

@media (max-width: 900px) {
    .directory-compact-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 4rem;
    }

    .compact-biz-card {
        padding: 4rem 0;
    }
}



.region-divider {
    grid-column: 1 / -1;
    margin-top: 5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Optional: if you want the divider itself centered in logic, but standard behavior is fine */
}

.region-divider h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 2.2rem;
    margin: 0;
    color: var(--primary);
}

.biz-count {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    font-weight: 700;
}

/* Page Hero Refinement - Centered */
.page-intro {
    margin-bottom: 5rem;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-intro h1 {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: 0.15em;
    /* Match Menu */
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 700;
}

.page-intro .lead-text {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-muted);
    line-height: 1.8;
}

.editorial-box {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 6rem auto;
}

.editorial-box>div {
    text-align: left;
    /* Keep internal text readable */
    border-left: none !important;
    border-top: 4px solid var(--accent);
    background-color: #f9fdfa;
    padding: 3rem;
}

.editorial-box h3 {
    text-align: center;
}

.editorial-box p {
    text-align: center;
    margin: 0 auto;
}


/* --- Tourism & Routes --- */
.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
    justify-content: center;
}

.route-card {
    background: #fff;
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.route-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.route-image-stack {
    height: 260px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: var(--primary);
}

.route-image-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.route-card:hover .route-image-stack img {
    transform: scale(1.1);
}

.route-info {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.route-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent);
    font-weight: 700;
}

.route-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
    line-height: 1.2;
}

.route-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.route-action {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.btn-route-action {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 800;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.btn-route-action:hover {
    color: var(--accent);
}

.btn-route-action i {
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-route-action:hover i {
    transform: translateX(5px);
}

/* --- Centered Editorial Content --- */
.centered-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-body);
}

.centered-content p {
    margin-bottom: 1.5rem;
}

.float-right {
    float: right;
    margin: 0 0 2rem 2rem;
    max-width: 400px;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .float-right {
        float: none;
        margin: 0 0 2rem 0;
        width: 100%;
        max-width: 100%;
    }
}

/* --- Animations --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Global Image Styling */
img {
    border-radius: var(--radius);
    max-width: 100%;
    height: auto;
    transition: var(--transition);
}

video,
iframe {
    max-width: 100%;
}

table {
    width: 100%;
    max-width: 100%;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Specific Logos should have NO animations/shadows */
.header-logo-img,
.sidebar-logo,
.footer-logo-img {
    box-shadow: none !important;
    transform: none !important;
}

img:not(.header-logo-img):not(.sidebar-logo):not(.footer-logo-img):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.partner-item img:hover,
.footer-partners .partner-item img:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* Secondary Content Classes */
.content-text {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content-text p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.content-text h3 {
    margin: 4rem 0 2rem 0;
    font-size: 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .split-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    :root {
        --header-height: 80px;
        --sidebar-width: 85vw;
    }

    .top-header {
        padding: 0 1.5rem;
    }

    .header-logo a {
        font-size: 1.2rem;
        letter-spacing: 0.15em;
    }

    .header-logo a::after {
        display: none;
    }

    .container {
        padding: 0 2rem;
    }

    .header-actions {
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1rem;
        line-height: 1.7;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .header-container {
        display: grid;
        grid-template-columns: 44px 1fr auto;
        align-items: center;
        gap: 0.75rem;
    }

    .header-nav {
        display: none;
    }

    .social-mini {
        display: none;
    }

    .menu-btn {
        display: inline-flex;
        margin: 0;
    }

    .header-actions {
        gap: 0.75rem;
        order: 1;
        align-items: center;
        grid-column: 1;
        justify-self: start;
    }

    .header-left {
        gap: 1rem;
        min-width: 0;
        order: 2;
        margin-left: 0;
        grid-column: 3;
        justify-content: flex-end;
        justify-self: end;
    }

    .header-logo a {
        font-size: 1.05rem;
        letter-spacing: 0.08em;
        max-width: 140px;
        overflow: hidden;
        white-space: nowrap;
        justify-content: flex-end;
    }

    .header-logo {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        margin-left: 0;
    }

    .header-logo-img {
        max-width: 120px;
    }

    .header-logo-img {
        height: 36px;
    }

    .sidebar {
        display: block;
        position: fixed;
        left: 0;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        width: min(88vw, 380px);
        max-width: 100vw;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.12);
        z-index: 2500;
    }

    .sidebar-nav {
        padding: 2.5rem 1.75rem 2rem 1.75rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 10px 0;
    }

    body.sidebar-active .sidebar {
        transform: translateX(0);
    }

    .content-container {
        padding: 0;
    }

    .container {
        padding: 0 1rem;
    }

    .layout-container,
    .main-content,
    .content-section,
    .container,
    .content-container,
    .centered-content {
        max-width: 100%;
    }

    .table-responsive {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-overlay {
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        z-index: 1900;
    }

    .top-header {
        z-index: 2000;
    }

    body.sidebar-active {
        overflow: hidden;
    }

    .logo-text {
        display: none;
    }

    .top-header,
    .header-container,
    .header-left,
    .header-actions,
    .layout-container,
    .main-wrapper,
    .main-content {
        width: 100%;
        max-width: 100%;
    }

    .section-index {
        letter-spacing: 0.25em;
    }

    .nav-title {
        letter-spacing: 0.2em;
    }

    .page-intro {
        margin: 2.5rem auto 3rem auto;
        max-width: 100%;
        text-align: center;
    }

    .page-intro *,
    .section-header *,
    .section-header {
        text-align: center !important;
    }

    h1,
    h2,
    h3 {
        letter-spacing: 0.05em;
        line-height: 1.2;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: manual;
    }

    .page-intro h1 {
        font-size: 1.35rem;
    }

    .page-intro .lead-text {
        font-size: 1rem;
        letter-spacing: 0.02em;
        text-transform: none;
        font-weight: 500;
        max-width: 100%;
        text-align: center;
    }

    .section-header h2 {
        font-size: 1.7rem;
        letter-spacing: 0.02em;
        text-align: center;
    }

    .section-header {
        text-align: center;
    }

    .editorial-flow {
        gap: 5rem;
    }

    .ed-item,
    .ed-item.reversed {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ed-item .ed-content,
    .ed-item.reversed .ed-content {
        text-align: left;
        align-items: flex-start;
    }

    .ed-item.reversed .ed-image {
        order: 1;
    }

    .ed-item.reversed .ed-content {
        order: 2;
    }

    .directory-compact-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        max-width: 100%;
    }

    .compact-biz-card {
        padding: 2rem 0;
    }

    .biz-title-refined {
        font-size: 1.4rem !important;
    }

    .compact-biz-card {
        align-items: flex-start;
        text-align: left;
    }

    .biz-contact-row {
        align-items: flex-start;
    }

    .contact-item {
        text-align: left;
        justify-content: flex-start;
    }

    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        letter-spacing: 0.04em;
    }

    .hero-lead {
        font-size: 1rem;
        margin: 0 auto 2rem auto;
    }

    .cta-button {
        padding: 14px 28px;
        letter-spacing: 0.2em;
    }

    p,
    li,
    th,
    td,
    .nav-link {
        overflow-wrap: anywhere;
    }

    body * {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .top-header {
        padding: 0 1rem;
    }

    .header-logo a {
        max-width: calc(100vw - 88px);
    }

    .header-logo-img {
        height: 32px;
    }

    .page-intro h1 {
        font-size: 1.25rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .hero-content h1 {
        font-size: 1.45rem;
    }
}

/* --- Footer (Museum Archive Aesthetic) --- */
/* --- Simple Minimalist Footer --- */
.main-footer {
    padding: 2rem 0;
    background: var(--bg-body);
    color: var(--text-body);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    /* Extra explicit spacing */
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

.footer-simple-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand .footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    box-shadow: none;
    border-radius: 0;
}

.footer-brand .footer-logo-img:hover {
    transform: none;
}

.footer-brand h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0;
}

.footer-brand .tagline {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.footer-links {
    display: flex;
    gap: 2.5rem;
}

.footer-links a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    font-size: 1rem;
    color: var(--text-muted);
}

.footer-social a:hover {
    color: var(--primary);
}

.footer-partners {
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.footer-partners .partners-wrapper {
    gap: 4rem;
    opacity: 1;
}

.footer-partners .partner-item img {
    height: 52px;
}

.footer-copyright {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.footer-copyright a {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .footer-simple-row {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
}


/* --- Refined Editorial Components --- */
.page-intro {
    text-align: center;
    max-width: 900px;
    margin: 4rem auto 6rem auto;
    /* Spacing for secondary pages */
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.page-intro .section-index {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.6em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.page-intro h1 {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: 0.05em;
    /* Unificado para bater com section-header */
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 600;
}

.page-intro .lead-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: 700px;
    margin: 0 auto;
}

.section-header {
    margin: 6rem 0 3rem 0;
}

.section-header h2 {
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* --- Final Mobile Overrides (ensure centered titles) --- */
@media (max-width: 768px) {
    .page-intro,
    .page-intro * {
        text-align: center !important;
    }

    .section-header,
    .section-header * {
        text-align: center !important;
    }

    .page-intro h1 {
        font-size: 1.35rem !important;
        letter-spacing: 0.06em !important;
    }

    .page-intro .lead-text {
        font-size: 1rem !important;
        letter-spacing: 0.02em !important;
        text-transform: none !important;
        font-weight: 500 !important;
    }

    .section-header h2 {
        font-size: 1.7rem !important;
        letter-spacing: 0.02em !important;
    }
}

@media (max-width: 520px) {
    .page-intro h1 {
        font-size: 1.25rem !important;
    }

    .section-header h2 {
        font-size: 1.5rem !important;
    }
}

.main-editorial-content {
    padding-bottom: 10rem;
}

.cards-grid {
    margin-top: 4rem !important;
}

.modern-card {
    border: 1px solid var(--border);
    transition: var(--transition);
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft);
    border-color: var(--accent);
}

/* --- Sophisticated Reveal System --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.215, 0.61, 0.355, 1),
        transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: transform, opacity;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Specific Surgence for Vivências e Serviços (Editorial Flow) */
.editorial-flow .ed-item[data-reveal] {
    transform: none;
    /* Reset vertical to prioritize horizontal */
    opacity: 1;
    /* Handle opacity on children */
}

.editorial-flow .ed-item .ed-image {
    opacity: 0;
    transform: translateX(-80px);
    /* Appear from left */
    transition: all 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.editorial-flow .ed-item .ed-content {
    opacity: 0;
    transform: translateX(60px);
    /* Appear from right */
    transition: all 1.5s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
}

/* Reversed Layout Animation */
.editorial-flow .ed-item.reversed .ed-image {
    transform: translateX(80px);
    /* Appear from right */
}

.editorial-flow .ed-item.reversed .ed-content {
    transform: translateX(-60px);
    /* Appear from left */
}

/* Reveal State */
.editorial-flow .ed-item.revealed .ed-image,
.editorial-flow .ed-item.revealed .ed-content {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered text children reveal */
.editorial-flow .ed-item.revealed .ed-content>* {
    animation: fadeInSlideUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editorial-flow .ed-item.revealed .ed-content h3 {
    animation-delay: 0.3s;
}

.editorial-flow .ed-item.revealed .ed-content p {
    animation-delay: 0.4s;
}

.editorial-flow .ed-item.revealed .ed-content .ed-link {
    animation-delay: 0.5s;
}

/* --- Back To Top Button (Minimalist) --- */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 35px;
    height: 35px;
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 0;
    /* Sharp editorial edges */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 9000;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* --- Page Footer CTA --- */
.page-footer-cta {
    text-align: center;
    margin-top: 10rem;
    padding: 6rem 2rem;
    border-top: 1px solid var(--border);
}

.page-footer-cta .cta-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Global typography adjustment requested by client:
   remove extra spacing between letters across the site.
   :not(#__no_letter_spacing_override__) raises specificity so this
   override also wins against older !important tracking rules. */
html body:not(#__no_letter_spacing_override__),
html body:not(#__no_letter_spacing_override__) * {
    letter-spacing: normal !important;
}
