:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-dark: #2d3748;
    --text-light: #4a5568;
    --background-light: #f7fafc;
    --white: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
    --card-transparency: 0.3; /* card transparency */
    --card-gap: 2rem;         /* space between cards */
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* Reset only page content — never the shared navbar */
.main-content-wrapper,
.main-content-wrapper *,
.homepage-container,
.homepage-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.homepage-container {
    min-height: auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

/* Scope to page content only — do not shrink the navbar .container */
.main-content-wrapper .container {
    max-width: none;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; padding: 0 2rem; }
.hero-title { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; text-shadow: 2px 2px 4px var(--shadow-heavy); animation: fadeInUp 0.8s ease-out; }
.hero-subtitle { font-size: 1.2rem; opacity: 0.95; margin-bottom: 2rem; animation: fadeInUp 0.8s ease-out 0.2s both; font-weight: 300; letter-spacing: 1px; }

/* Cards Section — extra room so hover lift / upward menus are not clipped */
.cards-section {
    padding: 5.5rem 0 4rem;
    background: transparent;
    position: relative;
    overflow: visible;
    z-index: 5;
}
.cards-section > .container {
    overflow: visible;
    max-width: none;
    width: 100%;
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    font-weight: 600;
    position: relative;
    padding-bottom: .35rem; /* space above underline to match initial look */
    border-bottom: 2px solid #000; /* solid black underline like in the reference */
}
/* Remove decorative gradient bar to match initial screenshot */
.section-title::after { display: none; }

/* Cards container with gaps */
.cards-container {
    display: flex; justify-content: center; align-items: stretch;
    gap: var(--card-gap); flex-wrap: nowrap; max-width: none; width: 100%; margin: 0 auto; padding: 0.75rem 0 1.25rem;
    overflow: visible;
}

/* Card */
.cards-section .card {
    flex: 1 1 0; min-width: 220px; max-width: none; height: 450px;
    position: relative; border-radius: var(--border-radius); overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: default; backdrop-filter: blur(10px);
    border: 1px solid var(--panel-border, #D0E5FF);
    box-shadow: var(--panel-shadow, 0 10px 28px rgba(45, 55, 72, 0.08));
}
.card-background {
    position: absolute; inset: 0; background: var(--white);
    opacity: var(--card-transparency); transition: opacity 0.3s ease; z-index: 1;
    border-radius: inherit;
}
.card-content {
    position: relative; z-index: 2; padding: 2rem; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between; text-align: center;
    border-radius: inherit;
}

/* Category backgrounds */
.card[data-category="architecture"] {
    background: linear-gradient(135deg, rgba(102,126,234,0.3) 0%, rgba(118,75,162,0.3) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23667eea" opacity="0.1"/></svg>');
    background-size: cover;
}
.card[data-category="arts"] {
    background: linear-gradient(135deg, rgba(236,72,153,0.3) 0%, rgba(239,68,68,0.3) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23ec4899" opacity="0.1"/></svg>');
    background-size: cover;
}
.card[data-category="travel"] {
    background: linear-gradient(135deg, rgba(34,197,94,0.3) 0%, rgba(59,130,246,0.3) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%2322c55e" opacity="0.1"/></svg>');
    background-size: cover;
}

/* Effects — lift only (no scale) so neighbors / parents do not clip the panels */
.cards-section .card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px var(--shadow-medium); }
.cards-section .card:hover .card-background { opacity: 0.9; }

/* Icon */
.card-icon {
    width: 70px; height: 70px; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%; transition: var(--transition); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}
.card-icon svg { width: 35px; height: 35px; stroke: var(--white); stroke-width: 2; }
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4); }

/* Text */
.card-title { font-size: 1.8rem; color: var(--text-dark); margin-bottom: 1rem; font-weight: 700; letter-spacing: 1px; }
.card-description { color: var(--text-light); line-height: 1.6; margin-bottom: 1.5rem; font-size: 0.95rem; flex-grow: 1; }

/* ---------- Dropdowns (button hover) ---------- */

.dropdown-menu::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.3);
    z-index: -1;
    border-radius: inherit;
}
/* Card shell stays overflow:visible so the menu can escape; face is clipped separately */
.cards-section .card.dropdown-card {
    position: relative;
    overflow: visible; /* allow menu to escape; face stays rounded via border-radius */
    z-index: 1;
}
.cards-section .card.dropdown-card .card-background {
    border-radius: inherit;
}
.cards-section .card.dropdown-card.is-open,
.cards-section .card.dropdown-card:has(.card-actions:hover),
.cards-section .card.dropdown-card:has(.card-actions:focus-within) {
    z-index: 40;
}

/* Anchor for absolute menu positioning */
.cards-section .dropdown-card .card-actions {
    position: relative;
    width: 100%;
    z-index: 5;
}

/* Make the button span the full card width */
.cards-section .dropdown-card .card-header {
    display: block;
    width: 100%;
}

/* Optional: category-colored headers to visually match dropdown background */
.cards-section .dropdown-card[data-category="architecture"] .card-header {
    background-color: rgba(102, 126, 234, 0.8) !important;
    border-color: rgba(102, 126, 234, 0.8) !important;
    color: #fff;
}
.cards-section .dropdown-card[data-category="arts"] .card-header {
    background-color: rgba(236, 72, 153, 0.8) !important;
    border-color: rgba(236, 72, 153, 0.8) !important;
    color: #fff;
}
.cards-section .dropdown-card[data-category="travel"] .card-header {
    background-color: rgba(34, 197, 94, 0.8) !important;
    border-color: rgba(34, 197, 94, 0.8) !important;
    color: #fff;
}

/* Dropdown panel: directly above the button, same width */
.cards-section .dropdown-card .dropdown-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.4rem);
    top: auto;
    margin: 0;
    width: 100%;
    min-width: 0;
    display: none;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    overflow: visible;
    padding: 0.35rem 0;
    z-index: 10000;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    backdrop-filter: saturate(120%) blur(2px);
    animation: fadeInUp 0.25s ease-out;
}
/* Hover the button (or stay over the menu); .active is for touch / keyboard */
.cards-section .dropdown-card .card-actions:hover .dropdown-menu,
.cards-section .dropdown-card .card-actions:focus-within .dropdown-menu,
.cards-section .dropdown-card.active .dropdown-menu {
    display: block;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    backdrop-filter: saturate(140%) blur(3px);
}
/* Subtle light overlay to increase readability while preserving category color */
.cards-section .dropdown-card .dropdown-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.06);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}
.cards-section .dropdown-card .card-actions:hover .dropdown-menu::before,
.cards-section .dropdown-card .card-actions:focus-within .dropdown-menu::before,
.cards-section .dropdown-card.active .dropdown-menu::before {
    opacity: 1;
}
/* Keep text black on hover/focus as well */
.cards-section .dropdown-card .dropdown-item:hover,
.cards-section .dropdown-card .dropdown-item:focus {
    color: #000;
}

/* Inner layout spacing for the dropdown list */
.cards-section .dropdown-card .dropdown-content {
    display: grid;
    gap: 0.4rem;
    position: relative;
    z-index: 1;
}

/* Larger subcategory rows: icon + title same row; text below */
.cards-section .dropdown-card .dropdown-item {
    display: grid;
    grid-template-columns: 56px 1fr; /* icon + content (larger icon column) */
    grid-auto-rows: auto;
    align-items: start;
    gap: 0.6rem 0.8rem;
    padding: 1rem 1rem;       /* larger touch target */
    min-height: 84px;         /* ensure enough height for two lines */
    color: #000;
    text-decoration: none;
    background: transparent;  /* let the dropdown bg show through */
    border-radius: 10px;
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-10px);
}
.cards-section .dropdown-card .card-actions:hover .dropdown-item,
.cards-section .dropdown-card .card-actions:focus-within .dropdown-item,
.cards-section .dropdown-card.active .dropdown-item {
    opacity: 1;
    transform: translateX(0);
}

.cards-section .dropdown-card .dropdown-item:hover,
.cards-section .dropdown-card .dropdown-item:focus {
    background: rgba(255,255,255,0.12);
    text-decoration: none;
    outline: none;
}

.cards-section .dropdown-card .item-icon {
    grid-column: 1;
    grid-row: 1 / span 2;        /* icon spans both title and description rows */
    align-self: center;
    justify-self: center;        /* center horizontally within the icon column */
    font-size: 2rem;             /* larger icon */
    line-height: 1;
    color: #000;                 /* ensure monochrome where applicable */
    filter: grayscale(1) contrast(2); /* stronger black & white appearance for emojis */
}

/* If subcategory icons are SVGs, ensure they render as monochrome and larger */
.cards-section .dropdown-card .item-icon svg {
    width: 32px;
    height: 32px;
    fill: #000;
    stroke: #000;
}

.cards-section .dropdown-card .item-content {
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: left;
}

.cards-section .dropdown-card .item-content h4 {
    margin: 0 0 0.3rem 0;     /* title on same row as icon */
    line-height: 1.2;
    font-size: 1.05rem;
    font-weight: 700;
    color: #000;
}

.cards-section .dropdown-card .item-content p {
    margin: 0;
    font-size: 0.9rem;        /* text below the title */
    opacity: 1;
    color: #000;
}

/* Info section */
.info-section { padding: 4rem 0; background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(10px); }
.info-content { text-align: center; }
.info-content h2 { font-size: 2.2rem; color: var(--text-dark); margin-bottom: 3rem; font-weight: 600; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; max-width: 800px; margin: 0 auto; }
.feature { padding: 2rem; text-align: center; }
.feature-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.feature h4 { font-size: 1.3rem; color: var(--text-dark); margin-bottom: 0.5rem; font-weight: 600; }
.feature p { color: var(--text-light); line-height: 1.5; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cards-section .card { animation: fadeInUp 0.8s ease-out; }
.cards-section .card:nth-child(1) { animation-delay: 0.1s; }
.cards-section .card:nth-child(2) { animation-delay: 0.3s; }
.cards-section .card:nth-child(3) { animation-delay: 0.5s; }

/* Responsive */
@media (max-width: 1024px) {
    .cards-container { max-width: 100%; gap: 1.25rem; }
    .cards-section .card { max-width: none; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .cards-container { flex-direction: column; flex-wrap: wrap; align-items: center; gap: 2rem; padding-bottom: 2rem; }
    .cards-section .card { max-width: 350px; width: 100%; flex: 1 1 auto; min-width: 0; }
    .section-title { font-size: 2rem; }
    .main-content-wrapper .container { padding: 0; }
    .cards-section { padding: 3rem 0 5rem; }
    /* Touch devices rely on tap (JS .active); keep menus in-flow space */
    .cards-section .dropdown-card.active { margin-bottom: 0.5rem; }
}
@media (max-width: 480px) {
    .hero-section { padding: 2rem 0; }
    .cards-section .card { height: auto; min-height: 400px; }
    .card-content { padding: 1.5rem; }
    .hero-title { font-size: 1.8rem; }
}

/* When this CSS is loaded, hide the minimal fallback cards */
.basic-cards-fallback { display: none; }

/* Homepage Settings override placeholder (intentionally kept commented for easy theming)
:root {
  --primary-color: #0ea5e9;
  --secondary-color: #6366f1;
  --card-transparency: 0.65;
  --card-gap: 1.5rem;
  --border-radius: 18px;
}
*/
/* Make category dropdown icons black & white and text black */

/* Base text color for dropdown items in category cards */
.cards-section .dropdown-card .dropdown-menu .dropdown-item {
  color: #000 !important; /* link text black */
}

/* Titles and descriptions inside dropdown items */
.cards-section .dropdown-card .dropdown-menu .dropdown-item .item-content h4 {
  color: #000 !important; /* title black */
}
.cards-section .dropdown-card .dropdown-menu .dropdown-item .item-content p {
  color: #000 !important; /* description black (or adjust to #222/#333 if needed) */
  opacity: 0.95;          /* preserve subtle tone if desired */
}

/* Force icons to render in monochrome */
.cards-section .dropdown-card .dropdown-menu .dropdown-item .item-icon {
  filter: grayscale(100%) !important; /* affects emoji/images in most browsers */
  -webkit-filter: grayscale(100%) !important;
  color: #000 !important; /* for font-based icons if any */
}

/* If any SVG icons are used, ensure they render black */
.cards-section .dropdown-card .dropdown-menu .dropdown-item .item-icon svg,
.cards-section .dropdown-card .dropdown-menu .dropdown-item .item-icon svg * {
  fill: #000 !important;
  stroke: #000 !important;
}

/* Keep hover/active/focus states black as well */
.cards-section .dropdown-card .dropdown-menu .dropdown-item:hover,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:focus,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:active {
  color: #000 !important;
  background: rgba(255, 255, 255, 0.12); /* retain subtle hover without changing text color */
  text-decoration: none;
  outline: none;
}
.cards-section .dropdown-card .dropdown-menu .dropdown-item:hover .item-content h4,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:focus .item-content h4,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:active .item-content h4,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:hover .item-content p,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:focus .item-content p,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:active .item-content p {
  color: #000 !important;
}

/* Ensure icon remains monochrome on hover/focus/active */
.cards-section .dropdown-card .dropdown-menu .dropdown-item:hover .item-icon,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:focus .item-icon,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:active .item-icon {
  filter: grayscale(100%) !important;
  -webkit-filter: grayscale(100%) !important;
  color: #000 !important;
}
.cards-section .dropdown-card .dropdown-menu .dropdown-item:hover .item-icon svg,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:focus .item-icon svg,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:active .item-icon svg,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:hover .item-icon svg *,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:focus .item-icon svg *,
.cards-section .dropdown-card .dropdown-menu .dropdown-item:active .item-icon svg * {
  fill: #000 !important;
  stroke: #000 !important;
}

/* Subcategory list layout */
.category-list {
    display: grid;
    gap: 12px;
}

/* Clickable subcategory row */
.subcategory-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: var(--card-bg, #fff);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.subcategory-item:hover {
    background: var(--card-hover-bg, #fafafa);
    border-color: var(--border-hover-color, #d1d5db);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Left logo box */
.subcategory-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--logo-bg, #f5f5f5);
    border-radius: 10px;
    overflow: hidden;
}

.subcategory-logo img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
    display: block;
}

/* Right text block */
.subcategory-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex: 1 1 auto;          /* allow text column to take remaining space */
    min-width: 0;            /* allow grid/flex item to shrink so text can wrap within container */
    max-width: 100%;         /* keep text within the item width */
    width: 100%;             /* ensure text block never exceeds item width */
}

.subcategory-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color, #111827);
    overflow: hidden;        /* keep long titles neat on one line */
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Make subcategory descriptions wrap to max two lines and stay within width */
.subcategory-subtitle {
    margin-top: 2px;
    font-size: 0.92rem;
    color: var(--muted-color, #6b7280);
    white-space: normal;             /* allow wrapping */
    overflow-wrap: anywhere;         /* wrap long words if needed */
    word-break: break-word;          /* ensure wrapping inside long tokens */
    width: 100%;                     /* stay within the button width */
    line-height: 1.25;               /* stable line height for clamping */
    max-height: 2.5em;               /* fallback clamp for non-webkit (2 lines) */
    display: -webkit-box;            /* enable line clamp */
    -webkit-line-clamp: 2;           /* clamp to two lines (WebKit) */
    -webkit-box-orient: vertical;
    overflow: hidden;                /* hide overflow after two lines */
}

/* Optional responsiveness */
@media (min-width: 768px) {
    .category-list {
        grid-template-columns: 1fr; /* keep one item per row on larger screens */
    }
}

/* Explore on the Map Section Styles */
.explore-map-section {
  padding: 3rem 0;
}

.explore-map-container {
  display: flex;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar */
.explore-map-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  max-height: 800px;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 1rem;
}

.sidebar-dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-dropdown-toggle:hover {
  background: #e9ecef;
}

.sidebar-dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.sidebar-list {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.sidebar-list li {
  padding: 0;
}

.sidebar-list a {
  display: block;
  padding: 0.5rem 1rem;
  color: #495057;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}

.sidebar-list a:hover,
.sidebar-list a.active {
  background: #007bff;
  color: white;
}

.sidebar-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

/* Main Map Area */
.explore-map-main {
  flex: 1;
  min-width: 0;
}

.map-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.location-info {
  font-size: 0.95rem;
}

.street-view-container {
  border-radius: 12px;
  overflow: hidden;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 991px) {
  .explore-map-container {
    flex-direction: column;
  }
  
  .explore-map-sidebar {
    width: 100%;
    max-height: none;
  }
  
  .sidebar-list {
    max-height: 150px;
  }
}

@media (max-width: 576px) {
  .map-actions {
    flex-direction: column;
  }
  
.map-actions .btn {
    width: 100%;
  }
}

/* Enlarge buttons under Explore on the Map */
.enlarged-map-btn {
    padding: 0.8rem 1.2rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    min-width: 150px;
}

/* View Full Interactive Map Button */
.view-full-map-btn {
    padding: 0.8rem 1.2rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background-color: var(--navbar-bg-color, #7CAADC) !important;
    border-color: var(--navbar-bg-color, #7CAADC) !important;
    color: #fff !important;
    transition: all 0.3s ease;
}

.view-full-map-btn:hover {
    filter: brightness(0.9);
    color: #fff !important;
}

/* Black and White Action Buttons with Logo */
.bw-action-btn {
    background-color: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    padding: 0.8rem 1.2rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 250px;
}

.bw-action-btn:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* Start Planning Button Enlargement */
.start-planning-btn {
    padding: 1.2rem 3rem !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

/* Hide initial Photo3D text and logo in section.html when shown inside home.html */
.photo3d-main-title + #photo-to-3d-luma .display-5.fw-bold.mb-3 {
    display: none !important;
}

/* Style for the main title on homepage to look enlarged */
.photo3d-main-title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    margin-bottom: 2rem !important;
}

#photo3d-section {
    border-radius: 15px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* —— Homepage interactive map —— */
.home-map-section {
    padding: 0 0 4.5rem;
    background: transparent;
}
.home-map-section > .container {
    max-width: none;
    width: 100%;
}
.home-map-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 1.5rem;
}
.home-map-lead {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.5;
    margin: -1.5rem 0 0;
}
.home-map-count-wrap {
    display: inline-block;
    margin-left: .35rem;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: rgba(44, 82, 130, 0.12);
    color: #2c5282;
    font-size: .85rem;
    font-weight: 600;
}
.home-map-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .65rem;
    margin-top: 1.1rem;
}
.home-map-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid #2c5282;
    background: rgba(255, 255, 255, 0.7);
    color: #2c5282;
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.home-map-action:hover {
    background: #2c5282;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.home-map-action--primary {
    background: #2c5282;
    color: #fff;
}
.home-map-action--primary:hover {
    background: #1a365d;
    border-color: #1a365d;
}
.home-map-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.home-map-filter {
    border: 1px solid var(--panel-border, #D0E5FF);
    background: var(--panel-inner-bg, rgba(255, 255, 255, 0.85));
    color: var(--text-dark);
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.home-map-filter:hover {
    background: var(--panel-bg-soft, #FAFCFF);
    border-color: var(--blue-300, #A9C6E7);
}
.home-map-filter.is-active {
    background: #2c5282;
    border-color: #2c5282;
    color: #fff;
}
.home-map-search-wrap {
    display: flex;
    flex: 1 1 200px;
    max-width: 280px;
    min-width: 160px;
}
.home-map-search {
    width: 100%;
    border: 1px solid var(--panel-border, #D0E5FF);
    background: var(--panel-inner-bg, rgba(255, 255, 255, 0.85));
    border-radius: 999px;
    padding: .45rem .95rem;
    font-size: .9rem;
    line-height: 1.3;
    color: var(--text-dark);
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.home-map-search::placeholder {
    color: rgba(45, 55, 72, 0.55);
}
.home-map-search:hover {
    background: var(--panel-bg-soft, #FAFCFF);
    border-color: var(--blue-300, #A9C6E7);
}
.home-map-search:focus {
    border-color: var(--blue-500, #7CAADC);
    background: #fff;
    box-shadow: 0 0 0 3px var(--blue-tint-15, rgba(124, 170, 220, 0.15));
}
.home-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
    gap: 1.5rem;
    align-items: start;
    max-width: none;
    width: 100%;
    margin: 0 auto;
}
.home-map-canvas-wrap {
    position: relative;
    border-radius: var(--panel-radius, 10px);
    overflow: hidden;
    border: 1px solid var(--panel-border, #D0E5FF);
    box-shadow: var(--panel-shadow, 0 10px 28px rgba(45, 55, 72, 0.08));
    width: 100%;
    height: 560px;
    background: var(--panel-bg, #E6F2FF);
    padding: 8px;
    box-sizing: border-box;
}
.home-map-canvas,
.home-map-canvas.leaflet-container {
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--panel-radius-sm, 8px);
    background: #c8d4e0;
}
/* Hide Leaflet's bottom attribution strip inside the map frame */
.home-map-canvas .leaflet-control-attribution,
.home-map-canvas .leaflet-bottom.leaflet-right {
    display: none !important;
}
/* Individual landmark pins (DivIcon — works with Leaflet.markercluster) */
.home-map-pin-icon {
    background: transparent !important;
    border: 0 !important;
}
.home-map-pin {
    display: block;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(26, 54, 93, 0.35);
    box-sizing: border-box;
}
/* Clustered pins: "+N" badge that zooms in on click */
.home-map-cluster-icon {
    background: transparent !important;
    border: 0 !important;
}
.home-map-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a365d;
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: 0.02em;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.35);
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
    pointer-events: auto;
}
.home-map-cluster:hover {
    transform: scale(1.08);
    background: #2c5282;
}
.home-map-cluster--sm {
    font-size: .75rem;
}
.home-map-cluster--md {
    font-size: .82rem;
}
.home-map-cluster--lg {
    font-size: .9rem;
}
.home-map-cluster span {
    line-height: 1;
    pointer-events: none;
}

/* Pin / cluster hover tooltips (Leaflet) */
.home-map-tooltip.leaflet-tooltip {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(45, 55, 72, 0.18);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(26, 54, 93, 0.18);
    color: #2d3748;
    padding: 0;
    margin: 0;
    pointer-events: auto;
}
.home-map-tooltip.leaflet-tooltip::before {
    border-top-color: rgba(255, 255, 255, 0.97);
}
.home-map-tooltip--pin.leaflet-tooltip {
    min-width: 180px;
    max-width: 240px;
}
.home-map-tooltip--cluster.leaflet-tooltip {
    min-width: 200px;
    max-width: 260px;
}
.home-map-pin-hover {
    padding: .55rem .65rem .6rem;
}
.home-map-pin-hover-title {
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.25;
    color: #1a365d;
    margin-bottom: .45rem;
    text-align: center;
}
.home-map-pin-hover-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
}
.home-map-pin-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .35rem .45rem;
    border: 1px solid rgba(44, 82, 130, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c5282;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.1;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.home-map-pin-action:hover {
    background: #2c5282;
    border-color: #2c5282;
    color: #fff;
}
.home-map-pin-action i {
    font-size: .75rem;
}
.home-map-cluster-hover {
    padding: .55rem .65rem .6rem;
}
.home-map-cluster-hover-head {
    font-weight: 700;
    font-size: .88rem;
    color: #1a365d;
    margin-bottom: .4rem;
}
.home-map-cluster-hover-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
}
.home-map-cluster-place {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #2d3748;
    font-size: .82rem;
    padding: .3rem .15rem;
    border-radius: 4px;
    cursor: pointer;
}
.home-map-cluster-place:hover {
    background: rgba(44, 82, 130, 0.1);
    color: #2c5282;
}
.home-map-cluster-hover-more {
    font-size: .78rem;
    color: #718096;
    padding: .2rem .15rem 0;
}
.home-map-cluster-hover-hint {
    margin-top: .45rem;
    font-size: .72rem;
    color: #718096;
    text-align: center;
}

.home-map-credit {
    margin: .4rem 0 0;
    font-size: .72rem;
    color: var(--text-light);
    text-align: right;
}
.home-map-credit a {
    color: inherit;
}
.home-map-sidebar {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    background: var(--panel-bg, #E6F2FF);
    border: 1px solid var(--panel-border-subtle, rgba(0, 0, 0, 0.06));
    border-radius: var(--panel-radius, 10px);
    padding: 8px;
    box-shadow: var(--panel-shadow, 0 10px 28px rgba(45, 55, 72, 0.08));
    box-sizing: border-box;
}
.home-map-list {
    flex: 1;
    overflow-y: auto;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding-right: .15rem;
}
.home-map-detail {
    background: var(--panel-inner-bg, #fff);
    border: 1px solid var(--panel-border, #D0E5FF);
    border-radius: var(--panel-radius-sm, 8px);
    padding: 10px;
}
.home-map-preview {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.home-map-preview-title {
    display: block;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.15rem;
    padding: .7rem .9rem;
    border: 1px solid var(--panel-border, #D0E5FF);
    border-radius: var(--panel-radius-sm, 8px);
    background: var(--panel-bg-soft, #FAFCFF);
    transition: background .15s ease, border-color .15s ease;
}
.home-map-preview-title:hover {
    background: #fff;
    border-color: var(--blue-500, #7CAADC);
    color: #2c5282;
}
.home-map-preview-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(120px, .85fr);
    gap: .55rem;
    align-items: start;
}
.home-map-preview-info {
    border: 1px solid var(--panel-border, #D0E5FF);
    border-radius: var(--panel-radius-sm, 8px);
    background: var(--panel-bg-soft, #FAFCFF);
    padding: .75rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.home-map-field {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.home-map-field-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-dark);
}
.home-map-field-label::after {
    content: ':';
}
.home-map-field-value {
    font-size: .88rem;
    color: var(--text-light);
    line-height: 1.35;
    word-break: break-word;
}
.home-map-preview-links {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.home-map-preview-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    font-size: .85rem;
    font-weight: 600;
    padding: .55rem .4rem;
    min-height: 2.4rem;
    flex: 0 0 auto;
    border: 1px solid var(--panel-border, #D0E5FF);
    border-radius: var(--panel-radius-sm, 8px);
    background: var(--panel-bg-soft, #FAFCFF);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.home-map-preview-link:hover {
    background: #fff;
    border-color: var(--blue-500, #7CAADC);
    color: #2c5282;
}
.home-map-preview-link.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.home-map-detail-topic {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    color: #2c5282;
    font-weight: 700;
    margin-bottom: .35rem;
}
.home-map-detail-card h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: .35rem;
}
.home-map-detail-meta {
    font-size: .88rem;
    color: var(--text-light);
    margin-bottom: .65rem;
}
.home-map-detail-desc {
    font-size: .95rem;
    color: var(--text-dark);
    line-height: 1.45;
    margin-bottom: .9rem;
}
.home-map-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
.home-map-ext {
    font-size: .85rem;
    color: #2c5282;
}
.home-map-list-item {
    text-align: left;
    border: 1px solid var(--panel-border, #D0E5FF);
    background: var(--panel-inner-bg, #fff);
    border-radius: var(--panel-radius-sm, 8px);
    padding: .65rem .8rem;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.home-map-list-item:hover {
    background: var(--panel-bg-soft, #FAFCFF);
    border-color: var(--blue-300, #A9C6E7);
    transform: translateY(-1px);
}
.home-map-list-item.is-active {
    border-color: var(--blue-500, #7CAADC);
    background: var(--panel-bg-tint, #F2F6FF);
}
.home-map-list-title {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    font-size: .95rem;
}
.home-map-list-sub {
    display: block;
    font-size: .8rem;
    color: var(--text-light);
    margin-top: .15rem;
}
.home-map-empty {
    color: var(--text-light);
    font-size: .95rem;
    margin: 0;
}

/* Topic card ↔ map linkage feedback */
.dropdown-card.map-linked {
    outline: 2px solid rgba(44, 82, 130, 0.55);
    outline-offset: 3px;
}
.dropdown-card.map-pulse {
    animation: homeMapPulse .9s ease;
}
@keyframes homeMapPulse {
    0% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-6px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
    .home-map-layout {
        grid-template-columns: 1fr;
    }
    .home-map-canvas-wrap {
        height: 420px;
    }
    .home-map-sidebar {
        max-height: none;
    }
    .home-map-list {
        max-height: 220px;
    }
}