@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #707070;
    --border-color: #e5e5e5;
    --brand-blue: #002fa7; /* Klein Blue */
    --hover-bg: #f5f5f7;
    --sans-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono-font: 'JetBrains Mono', 'Fira Code', monospace;
    --container-max: 1400px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--sans-font);
    line-height: 1.6;
    padding: 2rem 1.5rem;
    -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
header {
    max-width: var(--container-max);
    margin: 0 auto 3rem auto;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Aligns logo and search bar vertically to the center */
}

.logo-section .logo-text-wrapper {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 1.1;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-img {
    height: 3.2rem; /* Increased logo size for better visual presence */
    width: auto;
    object-fit: contain;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-link:hover .logo-img {
    transform: scale(1.05); /* Interactive micro-animation */
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumbs a:hover {
    color: var(--brand-blue);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
    user-select: none;
}


/* Container & Grid Layout */
main {
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Fluid Wide-Screen Grid */
.grid-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Left side: Coordinates */
.data-display {
    border-right: 1px solid var(--border-color);
    padding-right: 3rem;
}

.spot-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.coordinate-block {
    margin-bottom: 2rem;
}

.coord-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.coord-val {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono-font);
    font-size: 2.6rem; /* Adjusted for better layout with badges */
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.coord-val * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.coord-val.secondary {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.coord-type-badge {
    font-size: 0.7rem;
    font-family: var(--sans-font);
    font-weight: 700;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.15rem 0.35rem;
    margin-right: 0.75rem;
    letter-spacing: 0.05em;
    background-color: var(--hover-bg);
    flex-shrink: 0;
    line-height: 1;
}

.coord-val.secondary .coord-type-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.25rem;
}

.coord-num-display {
    display: inline-block;
}

.copy-hint {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--brand-blue);
    background-color: rgba(0, 47, 167, 0.06);
    border: 1px solid rgba(0, 47, 167, 0.12);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    margin-left: 1rem;
    font-weight: 600;
    vertical-align: middle;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--sans-font);
    letter-spacing: 0;
}

.coord-val:hover .copy-hint {
    opacity: 1;
    background-color: rgba(0, 47, 167, 0.12);
    transform: scale(1.02);
}

.copy-hint:active {
    transform: scale(0.98);
}

.elevation-block {
    margin-top: 2rem;
}

.elevation-container {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.elevation-val {
    font-family: var(--mono-font);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.unit-switch {
    background-color: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
    display: flex;
    gap: 0.25rem;
}

.unit-btn {
    border: none;
    background: none;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 2px;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.unit-btn.active {
    background-color: #ffffff;
    color: var(--brand-blue);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Right side: Deep links matrix */
.deep-links-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.deep-link-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.map-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.map-btn:hover {
    border-color: var(--brand-blue);
    background-color: var(--hover-bg);
    transform: translateY(-1px);
}

.map-btn .arrow {
    font-family: var(--mono-font);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.map-btn:hover .arrow {
    transform: translateX(4px);
}

.map-btn.primary {
    background-color: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
}

.map-btn.primary:hover {
    background-color: #002380;
    border-color: #002380;
}

/* Nearby Section */
.section-nearby {
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.spot-card {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.spot-card:hover {
    border-color: var(--brand-blue);
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}

.card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-dist {
    font-size: 0.8rem;
    color: var(--brand-blue);
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-coords {
    font-family: var(--mono-font);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Administrative Directory Section */
.section-directory {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
    margin-bottom: 6rem;
}

.directory-columns {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.directory-col h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.directory-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.75rem;
}

.directory-links li {
    margin-bottom: 0;
}

.directory-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    background-color: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.directory-links a:hover {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
    background-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 47, 167, 0.05);
}

/* Grouped directory layout styling */
.grouped-directory {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.directory-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.directory-group-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    font-weight: 700;
    margin: 0;
}

.directory-group-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.directory-group-title a:hover {
    color: var(--brand-blue);
}

/* Copy success toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--text-primary);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Rich Footer styling */
footer {
    max-width: var(--container-max);
    margin: 6rem auto 0 auto;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.footer-col p {
    line-height: 1.6;
    margin: 0;
}

.footer-links-list,
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-list a,
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links-list a:hover,
.footer-links a:hover {
    color: var(--brand-blue);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.footer-brand img {
    height: 2.2rem; /* Increased size in footer to match new design */
    width: auto;
    object-fit: contain;
}

.footer-lang-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-lang-selector a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.footer-lang-selector a:hover, .footer-lang-selector a.active {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background-color: var(--hover-bg);
}

.footer-bottom {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info p {
    margin-bottom: 0.5rem;
}

/* Info Page Styles */
.info-container {
    max-width: 800px;
    margin: 0 auto 5rem auto;
    line-height: 1.8;
}

.info-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.info-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.info-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.info-body p {
    margin-bottom: 1.5rem;
}

.info-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.info-body li {
    margin-bottom: 0.5rem;
}

/* Hero Search Section */
.hero-search-section {
    text-align: center;
    padding: 5rem 1.5rem 4rem 1.5rem;
    background: radial-gradient(circle at top, #f5f8ff 0%, #ffffff 70%);
    border-radius: 16px;
    margin-bottom: 4rem;
    border: 1px solid rgba(0, 47, 167, 0.05);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

/* Search input elements */
.hero-search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.search-input-wrapper:focus-within {
    border-color: var(--brand-blue);
    box-shadow: 0 4px 24px rgba(0, 47, 167, 0.08);
}

.search-icon {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-right: 0.75rem;
    user-select: none;
}

.search-input-wrapper input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: var(--sans-font);
    color: var(--text-primary);
    padding: 0.5rem 0;
    background: transparent;
}

.search-input-wrapper input::placeholder {
    color: #a0a0a0;
}

.clear-search-btn {
    border: none;
    background: #f0f0f2;
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    transition: all 0.15s ease;
}

.clear-search-btn:hover {
    background: #e2e2e6;
    color: var(--text-primary);
}

/* Search Dropdown Panel */
.search-results-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none; /* Controlled by JS show class */
    text-align: left;
    padding: 0.5rem 0;
}

.search-results-panel.show {
    display: block;
    animation: slideDownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.15s ease;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover, .search-item.highlighted {
    background-color: var(--hover-bg);
}

.search-item.highlighted {
    border-left: 3px solid var(--brand-blue);
    padding-left: calc(1.25rem - 3px);
}

.item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-icon {
    font-size: 1.25rem;
}

.item-text {
    display: flex;
    flex-direction: column;
}

.item-main-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.item-sub-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.item-type-badge {
    font-size: 0.7rem;
    background: #f0f0f2;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.search-item:hover .item-type-badge, .search-item.highlighted .item-type-badge {
    background: rgba(0, 47, 167, 0.08);
    color: var(--brand-blue);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-match {
    background-color: rgba(0, 47, 167, 0.08);
    color: var(--brand-blue);
    font-weight: 700;
    border-radius: 2px;
    padding: 0 1px;
}

/* Header Search Box (Small scale) */
.header-search-box {
    position: relative;
    width: 260px;
}

.search-input-wrapper.small {
    padding: 0.35rem 1rem;
    border-radius: 30px;
    box-shadow: none;
}

.search-input-wrapper.small .search-icon {
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.search-input-wrapper.small input {
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.search-input-wrapper.small .clear-search-btn {
    width: 18px;
    height: 18px;
    font-size: 0.8rem;
}

.search-results-panel.small-panel {
    top: calc(100% + 6px);
    width: 320px;
    right: 0;
    left: auto;
}

/* Countries Catalog Grid */
.section-countries {
    margin-bottom: 5rem;
}

/* Continent Filter Tabs */
.continent-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-tab {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-tab:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

.filter-tab.active {
    color: #ffffff;
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(0, 47, 167, 0.15);
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    transition: opacity 0.2s ease;
}

.country-card.hidden {
    display: none !important;
}

.country-card.fade-in {
    animation: countryCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes countryCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.country-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.country-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 47, 167, 0.05);
}

.country-flag-wrapper {
    width: 42px;
    height: 28px;
    margin-right: 1.25rem;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.country-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.country-info {
    flex-grow: 1;
}

.country-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.country-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.country-arrow {
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.country-card:hover .country-arrow {
    color: var(--brand-blue);
    transform: translateX(4px);
}

/* Keyframes */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Educational Section Styles */
.section-geo-knowledge {
    margin-top: 5rem;
    margin-bottom: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.knowledge-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.knowledge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 47, 167, 0.04);
    border-color: rgba(0, 47, 167, 0.15);
}

.knowledge-icon {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
}

.knowledge-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.knowledge-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* FAQ Section Styles */
.section-faq {
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
    margin-bottom: 5rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item[open] {
    border-color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(0, 47, 167, 0.03);
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none; /* Hide default triangle on Chrome/Firefox */
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    font-size: 0.95rem;
    transition: background-color 0.15s ease;
}

.faq-question::-webkit-details-marker {
    display: none; /* Hide default triangle on Safari */
}

.faq-question:hover {
    background-color: var(--hover-bg);
}

.faq-question::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    content: "−";
    transform: rotate(180deg);
    color: var(--brand-blue);
}

.faq-answer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #fafafb;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer p {
    margin: 0;
}

/* Range display styles */
.coord-val.range-val {
    font-size: 1.8rem;
    letter-spacing: -0.03em;
}

.center-copy-btn:hover {
    background-color: rgba(0, 47, 167, 0.05);
    border-style: solid;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 47, 167, 0.08);
}
.center-copy-btn:active {
    transform: translateY(0);
}

/* Responsive design - Mobile Breakpoint */
@media (max-width: 820px) {
    body {
        padding: 1.5rem 1rem;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .grid-hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 3rem;
    }
    
    .data-display {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 2.5rem;
    }
    
    .coord-val {
        font-size: 2.4rem;
    }
    
    .coord-val.range-val {
        font-size: 1.25rem;
        letter-spacing: -0.02em;
    }
    
    .deep-link-buttons {
        gap: 0.75rem;
    }
    
    .map-btn {
        padding: 1.1rem;
        font-size: 1rem;
        height: auto;
        min-height: 48px; /* Safe mobile click height > 44px */
    }
    
    .section-nearby {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .section-directory {
        margin-top: 2.5rem;
        padding-top: 2rem;
        margin-bottom: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-top: 2rem;
    }

    /* Mobile adjustments for Search and Hero UI */
    .header-search-box {
        width: 100%;
        margin-top: 1rem;
    }
    
    .search-results-panel.small-panel {
        width: 100%;
        right: auto;
        left: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-search-section {
        padding: 3rem 1rem 2.5rem 1rem;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile adjustments for Geo-knowledge section */
    .knowledge-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-geo-knowledge {
        margin-top: 3.5rem;
        margin-bottom: 3.5rem;
        padding-top: 2rem;
    }

    /* Mobile adjustments for FAQ section */
    .faq-question {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .faq-answer {
        padding: 1rem 1.25rem;
        font-size: 0.8rem;
    }
    
    .section-faq {
        margin-bottom: 3.5rem;
    }
}

/* Coordinate Converter Styles */
.converter-wrapper {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin: 2rem 0;
}

.converter-tabs {
    display: flex;
    background: var(--hover-bg);
    border-bottom: 1px solid var(--border-color);
}

.converter-tab-btn {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border-bottom: 2px solid transparent;
}

.converter-tab-btn:hover {
    color: var(--brand-blue);
    background: rgba(0, 47, 167, 0.02);
}

.converter-tab-btn.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    background: #ffffff;
}

.converter-panel {
    display: none;
    padding: 2rem;
}

.converter-panel.active {
    display: block;
}

.converter-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }
    .converter-input-dms-row {
        grid-template-columns: 1fr 1fr 1fr 70px !important;
        gap: 0.25rem !important;
    }
    .converter-panel {
        padding: 1.25rem;
    }
}

.converter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.converter-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.converter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.converter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--sans-font);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.converter-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.1);
}

.converter-input-dms-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 80px;
    gap: 0.5rem;
}

.converter-input-wrapper span.unit-label {
    position: absolute;
    right: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.converter-input-with-unit {
    padding-right: 25px !important;
}

.converter-select {
    padding: 0.75rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    color: var(--text-primary);
    width: 100%;
}

.converter-select:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.converter-btn-wrapper {
    margin-top: 1.5rem;
}

.converter-btn {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--brand-blue);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}

.converter-btn:hover {
    background: #002280;
}

.converter-btn:active {
    transform: scale(0.99);
}

.converter-result-box {
    margin-top: 2rem;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: none;
}

.converter-result-box.show {
    display: block;
}

.converter-result-box h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.converter-result-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.converter-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.converter-result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.converter-result-val-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.converter-result-val {
    font-family: var(--mono-font);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.converter-copy-btn {
    background: none;
    border: none;
    color: var(--brand-blue);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.converter-copy-btn:hover {
    background: rgba(0, 47, 167, 0.05);
}

.converter-copy-btn svg {
    width: 16px;
    height: 16px;
}

.converter-error {
    color: #d93025;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.converter-quick-samples {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.converter-sample-tag {
    font-size: 0.8rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.converter-sample-tag:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: rgba(0, 47, 167, 0.02);
}

.converter-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    pointer-events: none;
}

.converter-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

