/* Norwegian Royal Palaces Explorer Styles */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; background: #fafafa; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
header { background: #fff; border-bottom: 1px solid #e0e0e0; position: sticky; top: 0; z-index: 100; }
header h1 { font-size: 1.5rem; margin: 0; }
nav { display: flex; gap: 1.5rem; }
nav a { font-size: 0.9rem; }
.hero { background: linear-gradient(135deg, #e6f3ff 0%, #fff 100%); padding: 2rem 0; text-align: center; }
.hero h2 { margin-top: 0; }
.search-filters { margin-top: 1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.search-filters input { padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; width: 200px; }
.search-filters select { padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; }
.palaces-grid { padding: 2rem 0; }
.palace-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; margin-bottom: 1.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.palace-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.palace-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: #f5f5f5; border-bottom: 1px solid #e0e0e0; }
.era-tag { background: #0066cc; color: #fff; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; }
.palace-image { display: flex; justify-content: center; padding: 1rem; background: #f9f9f9; min-height: 200px; }
.palace-details { padding: 1rem; }
.palace-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: #666; margin-bottom: 0.75rem; }
.expand-btn { background: #0066cc; color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; font-size: 0.9rem; }
.expand-btn[aria-expanded='true'] { background: #0052a3; }
.palace-detail-content { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e0e0e0; }
.timeline-section h4, .architectural-details h4, .visitor-tips h4 { font-size: 1rem; margin-top: 1rem; margin-bottom: 0.5rem; }
.timeline { padding-left: 1rem; }
.timeline li { margin-bottom: 0.5rem; }
.architectural-details ul, .visitor-tips ul { padding-left: 1.2rem; }
.comparison-section { background: #f9f9f9; padding: 2rem 0; }
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table th, .comparison-table td { border: 1px solid #ddd; padding: 0.75rem; text-align: left; background: #fff; }
.comparison-table th { background: #0066cc; color: #fff; }
.comparison-table tr:nth-child(even) { background: #f5f5f5; }
.planning-tools { padding: 2rem 0; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.tool-card { background: #fff; padding: 1.5rem; border-radius: 8px; border: 1px solid #e0e0e0; text-align: center; }
.secondary-btn { background: #f5f5f5; color: #333; border: 1px solid #ccc; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; margin: 0.25rem; }
.secondary-btn:hover { background: #e0e0e0; }
.supporting-content { padding: 2rem 0; }
.supporting-content h2 { margin-top: 0; }
p { margin: 0.75rem 0; }
footer { background: #fff; border-top: 1px solid #e0e0e0; padding: 1.5rem 0; font-size: 0.9rem; text-align: center; }
footer a { font-size: 0.9rem; }
@media (max-width: 768px) { 
  nav { flex-direction: column; gap: 0.5rem; }
  .search-filters { flex-direction: column; align-items: stretch; }
  .search-filters input, .search-filters select { width: 100%; }
  .palace-card { flex-direction: column; }
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 0.5rem; }
}
@media (max-width: 480px) { 
  .hero h2 { font-size: 1.5rem; }
  .container { padding: 0 0.5rem; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
