/* Rome.us home hub (template-home-hub.php). Mobile first; palette from the theme (#333, #ffe500). */
.hub {
    --hub-ink: #1d1d1b;
    --hub-muted: #5c5c58;
    --hub-line: #e6e1d3;
    --hub-sand: #f7f4ec;
    --hub-yellow: #ffe500;
    --hub-radius: 12px;
    padding: 90px 0 40px;
    color: var(--hub-ink);
}
@media (min-width: 1025px) {
    .hub { padding-top: 130px; }
    /* a primary menu with more than seven sections wraps to two rows and is taller */
    body:has(.menu-container ul.menu > li:nth-child(8)) .hub { padding-top: 168px; }
}
.hub .hub-container { width: auto; max-width: 1140px; padding: 0 16px; }
.hub p { padding: 0; margin: 0 0 12px; font-size: 16px; line-height: 1.55; font-weight: 400; color: var(--hub-ink); }
.hub ul, .hub ol { margin: 0; padding: 0; list-style: none; }
.hub a { color: inherit; }
.hub .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub :focus-visible { outline: 3px solid #277f94; outline-offset: 2px; }

/* Section rhythm and headings (override .main-content h2 margins and capitalization) */
.hub-section { padding: 36px 0 0; }
.main-content.hub h2 {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    text-transform: none;
    color: var(--hub-ink);
}
.main-content.hub h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--hub-ink); }
.hub-more { margin-top: 16px !important; }
.hub-more a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--hub-yellow); text-underline-offset: 4px; }
.hub-more a::after { content: " \2192"; }

/* Hero: readable H1 on a light background, no photo behind text */
.hub-hero {
    margin: 0 -16px;
    padding: 24px 16px 20px;
    background: var(--hub-sand);
    border-bottom: 1px solid var(--hub-line);
}
.main-content.hub .hub-hero h1 {
    margin: 0 0 10px;
    font-family: "Poppins", sans-serif;
    font-size: 28px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--hub-ink);
}
.hub p.hub-byline { margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--hub-muted); }
.hub-byline a { color: var(--hub-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(29, 29, 27, .35); }

.hub p.hub-updated { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--hub-muted); }

.hub-search { display: flex; gap: 8px; margin: 0 0 16px; }
.hub-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cfc9b8;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 16px;
    text-transform: none;
    color: var(--hub-ink);
}
.hub-search input[type="search"]::placeholder { text-transform: none; color: #8a8678; }
.hub-search button {
    flex: 0 0 auto;
    height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--hub-ink);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.hub-tasks ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hub-task a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    background: #fff;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--hub-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.hub-task a:hover { border-color: #c9b800; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.hub-task a::before {
    content: "";
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--hub-yellow) center / 20px 20px no-repeat;
}
.hub-task--first a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d1d1b' d='M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z'/%3E%3C/svg%3E"); }
.hub-task--airport a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d1d1b' d='M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z'/%3E%3C/svg%3E"); }
.hub-task--tickets a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d1d1b' d='M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2s.9-2 2-2zm-9 7.5h-2v-2h2v2zm0-4.5h-2v-2h2v2zm0-4.5h-2v-2h2v2z'/%3E%3C/svg%3E"); }
.hub-task--itinerary a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d1d1b' d='M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z'/%3E%3C/svg%3E"); }
.hub-task--stay a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d1d1b' d='M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z'/%3E%3C/svg%3E"); }
.hub-task--weather a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d1d1b' d='M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z'/%3E%3C/svg%3E"); }

/* 5 steps: the number sits next to the step title, text uses the full card width */
.hub-steps__list { counter-reset: hub-step; display: grid; gap: 10px; }
.hub-steps__list > li {
    padding: 14px;
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    background: #fff;
    scroll-margin-top: 100px;
}
.main-content.hub .hub-steps__list h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hub-steps__list h3::before {
    counter-increment: hub-step;
    content: counter(hub-step);
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--hub-yellow);
    font-size: 15px;
    line-height: 30px;
    font-weight: 700;
    text-align: center;
}
.hub-steps__list > li:target { border-color: #c9b800; box-shadow: 0 0 0 3px rgba(255, 229, 0, .45); }
.hub-steps__list p { margin: 0; font-size: 15px; }
.hub-steps__list a, .hub-faq .rome-faq__answer a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(29, 29, 27, .4); }

/* Cards: sights and latest articles */
.hub-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hub-card { display: flex; flex-direction: column; height: 100%; border-radius: var(--hub-radius); overflow: hidden; background: #fff; border: 1px solid var(--hub-line); }
.hub-card img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.hub-card__kicker { padding: 10px 12px 0; font-size: 12px; line-height: 1.3; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--hub-muted); }
.hub-card__title { padding: 10px 12px 2px; font-size: 15px; line-height: 1.3; font-weight: 700; }
.hub-card__kicker + .hub-card__title { padding-top: 4px; }
.hub-card__text { padding: 0 12px 12px; font-size: 13px; line-height: 1.45; color: var(--hub-muted); }
.hub-cards--latest .hub-card__title { padding-bottom: 12px; font-weight: 600; }
.hub-card:hover .hub-card__title { text-decoration: underline; text-underline-offset: 3px; }

/* Tools and services */
.hub-tools__list { display: grid; gap: 10px; }
.hub-tool {
    display: block;
    padding: 16px 44px 16px 16px;
    border-radius: var(--hub-radius);
    background: var(--hub-ink);
    color: #fff !important;
    position: relative;
}
.hub-tool::after { content: "\2192"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--hub-yellow); }
.hub-tool__title { display: block; margin-bottom: 4px; font-size: 17px; line-height: 1.3; font-weight: 700; color: var(--hub-yellow); }
.hub-tool__text { display: block; font-size: 14px; line-height: 1.45; color: #e9e9e4; }

/* Topics */
.hub-topics__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hub-topics__list a {
    display: block;
    height: 100%;
    padding: 12px;
    border: 1px solid var(--hub-line);
    border-radius: 10px;
    background: var(--hub-sand);
}
.hub-topics__list a:hover { border-color: #c9b800; background: #fff; }
.hub-topics__list strong { display: block; font-size: 15px; line-height: 1.3; font-weight: 700; }
.hub-topics__list span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--hub-muted); }

/* FAQ (Rome FAQ plugin markup, smaller type for a hub) */
.hub .hub-faq { margin: 0; }
.hub .hub-faq > .rome-faq__item > summary { font-size: 17px; padding: 14px 54px 14px 16px; }
.hub .hub-faq .rome-faq__answer { font-size: 16px; line-height: 1.6; font-weight: 400; margin: 0 16px; padding: 0 0 16px 14px; }

/* Authors */
.hub-authors__list { display: grid; gap: 12px; margin-top: 8px; }
.hub-author { padding: 14px; border: 1px solid var(--hub-line); border-radius: var(--hub-radius); background: #fff; }
.hub-author__link { display: flex; align-items: center; gap: 12px; }
.hub-author__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 64px; }
.hub-author__name { font-size: 17px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(29, 29, 27, .3); }
.hub-author__years { display: inline-block; margin: 10px 0 6px; padding: 2px 10px; border-radius: 999px; background: var(--hub-yellow); font-size: 12px; font-weight: 600; }
.hub p.hub-author__note { margin: 0; font-size: 14px; color: var(--hub-muted); }

/* Tablet */
@media (min-width: 600px) {
    .hub-tasks ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hub-topics__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hub-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hub-cards--latest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hub-authors__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop */
@media (min-width: 1025px) {
    .hub .hub-container { padding: 0 24px; }
    .hub-hero { margin: 24px -24px 0; padding: 44px 24px 36px; border: 1px solid var(--hub-line); border-radius: 20px; }
    .main-content.hub .hub-hero h1 { font-size: 46px; max-width: 900px; }
    .hub p.hub-byline { font-size: 16px; }
    .hub-search { max-width: 720px; }
    .hub-tasks ul { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
    .hub-task a { flex-direction: column; justify-content: center; text-align: center; min-height: 112px; padding: 14px 10px; font-size: 15px; }
    .hub-task a::before { flex-basis: 40px; width: 40px; height: 40px; background-size: 22px 22px; }
    .hub-section { padding-top: 56px; }
    .main-content.hub h2 { font-size: 32px; margin-bottom: 22px; }
    .hub-steps__list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .hub-steps__list > li { padding: 16px; }
    .main-content.hub .hub-steps__list h3 { flex-direction: column; align-items: flex-start; }
    .hub-tools__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .hub-tool { padding: 22px 48px 22px 22px; height: 100%; }
    .hub-topics__list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
    .hub-cards--latest { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hub-card__title { font-size: 17px; }
    .hub-card__text { font-size: 14px; }
    .hub .hub-faq { max-width: 860px; }
    .hub-authors__list { max-width: 860px; }
}
