* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue-primary: #1565C0;
    --blue-dark: #0D47A1;
    --blue-darker: #0a3d8f;
    --blue-light: #1E88E5;
    --blue-bg: #E3F2FD;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-mid: #e0e0e0;
    --gray-text: #616161;
    --gray-dark: #333333;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.18);
}

body {
    font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
    color: var(--gray-dark);
    background: var(--gray-light);
    line-height: 1.6;
}

/* Remove qualquer espaçamento que o contêiner pai possa estar herdando do sistema global */
.main {
    padding: 60px 0 !important;
    margin: 0 !important;
    width: 100%;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: var(--white);
    border-bottom: 1px solid var(--gray-mid);
    padding: 0.8rem 2rem;
}

.breadcrumb-inner {
    max-width: 1280px;
    margin: 0 auto;
    font-size: 0.82rem;
    color: var(--gray-text);
}

.breadcrumb-inner a {
    color: var(--blue-primary);
    text-decoration: none;
}

.breadcrumb-inner a:hover {
    text-decoration: underline;
}

.breadcrumb-inner span {
    margin: 0 0.4rem;
    color: #999;
}

/* ===== HERO BANNER ===== */
.hero-banner {
    position: relative;
    height: 340px;
    overflow: hidden;
    background: var(--blue-dark);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.hero-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 71, 161, 0.95) 0%, rgba(13, 71, 161, 0.4) 60%, rgba(13, 71, 161, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
}

.hero-banner-overlay .container-hero {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 0.3rem 0.9rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
}

.hero-banner-overlay h2 {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-banner-overlay p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 300;
}

/* ===== CONTENT AREA ===== */
.content-wrapper {
    align-items: flex-start;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    min-width: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.content-header {
    background: var(--blue-primary);
    color: var(--white);
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.content-header i {
    font-size: 1rem;
}

.content-body {
    padding: 2rem 1.5rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-light);
}

.info-item {
    background: var(--gray-light);
    border-left: 3px solid var(--blue-primary);
    padding: 0.8rem 1rem;
    border-radius: 0 4px 4px 0;
}

.info-item label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-text);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.info-item value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-dark);
}

/* City Photo in Content */
.city-photo-block {
    float: right;
    margin: 0 0 1.2rem 1.5rem;
    max-width: 240px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 3px solid var(--white);
    outline: 1px solid var(--gray-mid);
}

.city-photo-block img {
    width: 100%;
    display: block;
}

.city-photo-block .caption {
    background: var(--blue-dark);
    color: var(--white);
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    text-align: center;
    font-weight: 500;
}

/* History Text */
.history-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.85;
    text-align: justify;
    margin-bottom: 1.2rem;
    text-indent: 2rem;
}

.history-text:first-of-type {
    text-indent: 0;
}

.clear {
    clear: both;
}

/* ===== MAP SECTION ===== */
.map-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-light);
}

.map-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-container {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-mid);
}

.map-container img {
    width: 100%;
    display: block;
}

.map-caption {
    background: var(--gray-light);
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    color: var(--gray-text);
    text-align: center;
    border-top: 1px solid var(--gray-mid);
}

/* ===== ETYMOLOGY SECTION ===== */
.etymology-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-light);
}

.etymology-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etymology-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.etym-card {
    border: 1px solid var(--gray-mid);
    border-radius: 6px;
    padding: 1.2rem;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.etym-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--blue-primary);
}

.etym-card.preferred {
    border-color: var(--blue-primary);
    background: var(--blue-bg);
}

.etym-badge {
    display: inline-block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-bottom: 0.6rem;
}

.etym-card:first-child .etym-badge {
    background: #FFF3E0;
    color: #E65100;
}

.etym-card.preferred .etym-badge {
    background: var(--blue-primary);
    color: var(--white);
}

.etym-card h5 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 0.3rem;
}

.etym-card p {
    font-size: 0.85rem;
    color: var(--gray-text);
    line-height: 1.5;
}

.etym-card .tag-probable {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--blue-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== SOURCES ===== */
.sources-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-light);
}

.sources-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.source-item {
    background: var(--gray-light);
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: var(--gray-text);
    line-height: 1.5;
    border-left: 3px solid var(--blue-primary);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 100px;
    /* distância do topo ao rolar */
    align-self: flex-start;
    overflow-y: auto;
    /* caso sidebar fique maior que a tela */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Scroll bonito opcional */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #1565C0;
    border-radius: 10px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar-card-header {
    background: var(--blue-primary);
    color: var(--white);
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card-body {
    padding: 1.2rem;
}

/* City Image Sidebar */
.sidebar-city-img {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.sidebar-city-img img {
    width: 100%;
    display: block;
}

.sidebar-city-caption {
    font-size: 0.75rem;
    color: var(--gray-text);
    text-align: center;
    padding-top: 0.4rem;
}

/* Quick Info */
.quick-info-list {
    list-style: none;
}

.quick-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.82rem;
}

.quick-info-list li:last-child {
    border-bottom: none;
}

.quick-info-list li .label {
    color: var(--gray-text);
    font-weight: 400;
}

.quick-info-list li .value {
    color: var(--gray-dark);
    font-weight: 600;
    text-align: right;
}

/* Timeline Sidebar */
.timeline-mini {
    list-style: none;
}

.timeline-mini li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.82rem;
    color: var(--gray-text);
}

.timeline-mini li:last-child {
    border-bottom: none;
}

.timeline-mini li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue-primary);
}

.timeline-mini li::after {
    content: '';
    position: absolute;
    left: 3.5px;
    top: calc(50% + 8px);
    width: 1px;
    height: calc(100% - 8px);
    background: var(--gray-mid);
}

.timeline-mini li:last-child::after {
    display: none;
}

.timeline-mini .year {
    font-weight: 700;
    color: var(--blue-dark);
    display: block;
    font-size: 0.78rem;
}

/* Download Button */
.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--blue-primary);
    color: var(--white);
    border: none;
    border-radius: 5px;
    padding: 0.75rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
    text-decoration: none;
}

.btn-download:hover {
    background: var(--blue-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .etymology-cards {
        grid-template-columns: 1fr;
    }

    .nav-links {
        justify-content: center;
    }

    .nav-links li a {
        padding: 0.6rem 0.7rem;
        font-size: 0.7rem;
    }

    .hero-banner {
        height: 250px;
    }

    .hero-banner-overlay h2 {
        font-size: 1.8rem;
    }

    .city-photo-block {
        float: none;
        max-width: 100%;
        margin: 0 0 1.2rem 0;
    }
}

@media (max-width: 600px) {
    .header-top {
        padding: 0 1rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .content-body {
        padding: 1.2rem 1rem;
    }

    .logo-text h1 {
        font-size: 0.95rem;
    }

    .hero-banner {
        height: 200px;
    }

    .hero-banner-overlay h2 {
        font-size: 1.4rem;
    }

    .hero-banner-overlay {
        padding: 1.5rem;
    }
}