/* ============================================================
   country-layout.css — Country page layout (competitor structure,
   homepage design standard colors). Loaded by all country pages.
   Structure reference: worldpostalcode.com
   Colors/fonts: postalcodelookup.info homepage standard
   ============================================================ */

/* ---- Page frame ---- */
.wrapper { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.content { padding: 1rem 0 2rem; }

/* Breadcrumb — clean, no box, aligned with content (H1) left edge */
.breadcrumb { max-width: 1140px; margin: 0 auto; padding: 0.75rem 16px; font-size: 0.875rem; color: var(--gray-400); }
.breadcrumb .wrapper { max-width: none; margin: 0; padding: 0; }
.breadcrumb ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; }
.breadcrumb ul li + li::before { content: "›"; margin: 0 0.35rem; color: #D1D5DB; }

/* H1 (homepage hero style) */
.page-title-wrap { display: flex; align-items: flex-start; gap: 0.75rem; margin: 1.25rem 0 0.5rem; }
.page-title-flag { width: 40px; height: 30px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); flex-shrink: 0; margin-top: 1.25rem; }
.page-title-wrap h1 { font-size: 1.5rem; font-weight: 800; margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
.page-title-wrap h1 span { color: #2563EB; }
.page-title-sub { margin: 0.15rem 0 0; font-size: 0.9375rem; color: #6B7280; font-weight: 500; }
.content h1 { font-size: 1.75rem; font-weight: 800; margin: 1.25rem 0 0.5rem; line-height: 1.2; letter-spacing: -0.02em; }
.content h1 span { color: #2563EB; }
.content h2 { position: relative; font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 0.75rem; color: #111827; }
.content h2::after { content: ""; display: block; width: 62px; height: 3px; background: rgba(96, 165, 250, 0.6); border-radius: 2px; margin-top: 0.35rem; }

/* ---- Top search bar (homepage search style) ---- */
.search-bar-home { background: #F9FAFB; border-bottom: 1px solid #E5E7EB; padding: 10px 16px; display: flex; gap: 8px; justify-content: center; }
.search-bar-home .field { width: min(520px, 70%); padding: 9px 14px; font-size: 0.95rem; border: 1px solid #D1D5DB; border-radius: 8px; font-family: inherit; }
.search-bar-home .field:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.search-bar-home .submit { background: #2563EB; color: #fff; border: 0; border-radius: 8px; padding: 9px 22px; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.search-bar-home .submit:hover { background: #1E40AF; }

/* ---- Ad slots ---- */
.ad-label { display: block; font-size: 10px; color: #D1D5DB; text-align: left; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.1em; }
.at { margin: 1rem 0; }
.am { margin: 1.5rem 0; }

/* ---- Warn bar (competitor structure) ---- */
.warn { background: #F9FAFB; border: 1px solid #E5E7EB; border-left: 4px solid #2563EB; border-radius: 6px; font-size: 0.875rem; color: #374151; margin: 1rem 0; }
.warn a { color: #DC2626; }

/* ---- Regions grid (competitor structure) ---- */
.regions { background: #F9FAFB; border-radius: 8px; padding: 1rem; margin: 0.5rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.25rem 0.5rem; }
.regions a { color: #2563EB; text-decoration: none; font-size: 0.875rem; padding: 0.3rem 0.25rem; display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.regions a:hover { color: #1E40AF; text-decoration: underline; }

/* ---- Search by Map ---- */
.p_map { font-size: 0.875rem; color: #6B7280; margin: 0 0 0.75rem; line-height: 1.5; }
#map_canvas { width: 100%; height: 455px; border: 1px solid #E5E7EB; border-radius: 8px; }

/* ---- Search tool (blue, homepage standard) ---- */
.search-tool { background: #EFF6FF; border: 1px solid #DBEAFE; border-radius: 12px; padding: 1.25rem; }
.search-tool-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.search-country-flag { width: 28px; height: 21px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); object-fit: cover; }
.search-tool-title { font-size: 1.125rem; font-weight: 700; color: #1E40AF; margin: 0; line-height: 1.3; }
/* Override homepage pill .search-box (home-design.css) on country pages: big radius matching input/button, no border line, no shadow, aligned */
.search-tool .search-box { display: flex; align-items: center; gap: 0.75rem; background: #fff; border: none; border-radius: 12px; box-shadow: none; padding: 0.25rem 0.5rem 0.25rem 0.75rem; margin: 0; }
.form-label { display: block; font-weight: 600; color: #374151; margin: 0; font-size: 0.75rem; white-space: nowrap; flex-shrink: 0; }
.autocomplete-wrapper { position: relative; flex: 1; min-width: 0; }
.form-input-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9CA3AF; pointer-events: none; }
.form-input.search-input { width: 100%; padding: 0.6rem 0.75rem 0.6rem 2.5rem; border: none; border-radius: 12px; font-size: 0.8125rem; line-height: 1.4; font-family: inherit; background: #fff; box-sizing: border-box; height: auto; background-image: none; }
.form-input.search-input:focus { outline: none; box-shadow: none; }
.suggestions-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #E5E7EB; border-top: none; border-radius: 0 0 12px 12px; max-height: 220px; overflow-y: auto; z-index: 100; list-style: none; padding: 0; margin: 0; display: none; box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.suggestions-list.active { display: block; }
.suggestion-item { padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.875rem; }
.suggestion-item:hover, .suggestion-item.highlighted { background: #EFF6FF; }
.show-btn { width: 100%; margin-top: 0.75rem; padding: 0.6rem 1rem; background: #2563EB; color: #fff; font-size: 0.9375rem; font-weight: 600; border-radius: 12px; border: none; cursor: pointer; font-family: inherit; }
.show-btn:hover:not(:disabled) { background: #1D4ED8; }
.show-btn:disabled { background: #D1D5DB; color: #9CA3AF; cursor: not-allowed; }

/* ---- Results section ---- */
.results-section { opacity: 0; transform: translateY(20px); transition: opacity 400ms ease-out, transform 400ms ease-out; margin-bottom: 1rem; }
.results-section.showing, .results-section[style*="block"] { opacity: 1; transform: translateY(0); }
.results-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.results-title { font-size: 1rem; color: #1E3A8A; margin-bottom: 0.5rem; font-weight: 700; }
.postal-info { background: #EFF6FF; border-radius: 12px; padding: 1rem; border: 1px solid #DBEAFE; }
.postal-details { font-size: 0.9375rem; line-height: 1.6; color: #1E40AF; }
.postal-code-display { font-family: 'Courier New', monospace; font-size: 1.75rem; font-weight: 700; color: #1E3A8A; background: #fff; padding: 0.75rem; border-radius: 8px; text-align: center; margin: 0.5rem 0; letter-spacing: 0.05em; border: 2px solid #DBEAFE; }
.map-container { background: #EFF6FF; border-radius: 12px; padding: 1rem; border: 1px solid #DBEAFE; }
.map { width: 100%; height: 380px; border-radius: 8px; border: 1px solid #DBEAFE; }

/* ---- Notes (navy/blue block, competitor structure) ---- */
.notes { background: #2563EB; color: #fff; border-radius: 12px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.notes h2 { color: #fff; margin-top: 0; text-decoration: none; }
.notes h2::after { content: none; }
.notes p { color: rgba(255,255,255,0.92); font-size: 0.9375rem; line-height: 1.6; margin: 0.5rem 0 0; }
.notes a { color: #BFDBFE; text-decoration: underline; }

/* ---- Sidebar (right column, competitor structure) ---- */
.sidebar { margin-top: 130px; padding-left: 1rem; }
.sidebar h2 { position: relative; font-size: 1.125rem; padding-bottom: 0.5rem; }
.sidebar h2::after { content: ""; display: block; width: 62px; height: 3px; background: rgba(96, 165, 250, 0.6); border-radius: 2px; margin-top: 0.35rem; }
.sidebar_links { margin-top: 0.75rem; }
.sidebar_links div { margin: 0.5rem 0; font-size: 0.9375rem; line-height: 1.5; display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; overflow: hidden; }
.sidebar_links img { width: 24px; height: 18px; flex-shrink: 0; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.sidebar_links a { color: #2563EB; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar_links a:hover { color: #1E40AF; text-decoration: underline; }
.all_countries { display: inline-block; margin-top: 0.75rem; color: #2563EB; font-weight: 600; font-size: 0.875rem; text-decoration: none; }
.all_countries:hover { text-decoration: underline; }

/* ---- Two-column: content + sidebar (competitor structure) ---- */
.wrapper > .content.short { width: calc(100% - 260px); display: inline-block; vertical-align: top; box-sizing: border-box; }
.wrapper > .content.short + .sidebar { width: 240px; display: inline-block; vertical-align: top; }
.content.short .sidebar { width: 100%; display: block; margin-top: 1.5rem; padding-left: 0; border-left: none; }

/* ---- SEO + FAQ (our advantage, homepage standard) ---- */
.seo-content { margin-top: 2rem; padding: 1.5rem; background: #F9FAFB; border-radius: 12px; }
.seo-content h2 { font-size: 1.25rem; margin-bottom: 1rem; color: #111827; }
.seo-content h3 { font-size: 1rem; margin-bottom: 0.5rem; color: #2563EB; }
.seo-content p { font-size: 0.875rem; line-height: 1.6; color: #6B7280; }
.faq-section { margin-top: 2rem; padding: 1.5rem; background: #F9FAFB; border-radius: 12px; }
.faq-section h2 { font-size: 1.25rem; margin-bottom: 1rem; color: #111827; }
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { border: 1px solid #E5E7EB; border-radius: 8px; padding: 1rem; }
.faq-item summary { font-weight: 600; cursor: pointer; color: #2563EB; }
.faq-item p { margin-top: 0.5rem; color: #6B7280; line-height: 1.6; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .wrapper > .content.short { width: 100%; }
  .results-layout { grid-template-columns: 1fr; }
  #map_canvas { height: 360px; }
}
