/* ============================================================
   Semantic HTML5 refactor support — Silver Sea Marine
   Loaded after css/moesia/style.css and css/moesia/site-custom.css
   ============================================================ */

/* --- HTML5 element resets --- */
main, section, article, aside, nav, header, footer, figure, figcaption {
    display: block;
}

/* --- Skip link: visible on focus --- */
.skip-link.screen-reader-text:focus,
.skip-link.screen-reader-text:focus-visible {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100000;
    width: auto;
    height: auto;
    padding: 10px 16px;
    clip: auto;
    clip-path: none;
    color: var(--color-light);
    background-color: var(--color-primary);
    border: 2px solid var(--color-light);
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* --- Keyboard focus visibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
main:focus-visible,
section:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

a:focus,
button:focus {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* --- Current page indicator in main navigation --- */
.main-navigation .current-menu-item > a,
.main-navigation a[aria-current="page"] {
    border-bottom: 3px solid var(--color-accent);
}

/* --- Keyboard-accessible sub-menus (hover alone is insufficient) --- */
.main-navigation ul li:hover > ul,
.main-navigation ul li:focus-within > ul {
    left: auto;
}
.main-navigation ul ul li:hover > ul,
.main-navigation ul ul li:focus-within > ul {
    left: 100%;
}
.main-navigation ul.sub-menu {
    display: block;
}

/* Sub-menu links sit on the dark nav-blue background (inline style)
   so force readable link colours. */
.main-navigation ul.sub-menu a {
    color: var(--color-light);
    background-color: transparent;
    border: 0;
    border-radius: 0;
}
.main-navigation ul.sub-menu a:hover,
.main-navigation ul.sub-menu a:focus,
.main-navigation ul.sub-menu a:focus-visible {
    color: var(--color-accent);
}

/* --- .top-bar is a semantic <header> now; keep layout intact --- */
header.top-bar {
    position: relative;
    z-index: 9999;
}

/* --- nav-search / search-close became <button> elements --- */
.nav-search,
.search-close {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    line-height: 1;
}
.nav-search .fa,
.search-close .fa {
    display: block;
}
.nav-search-box .search-close {
    line-height: 22px;
}

/* Search toggle sits near the bottom-right of .top-bar;
   use an inset ring so the outline does not overflow the bar. */
.top-bar .nav-search:focus-visible,
.top-bar .search-close:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
    border-radius: 3px;
}

/* --- Entry header: single <h1> page title --- */
.entry-header {
    margin: 0 0 24px;
    text-align: left;
}

/* --- Homepage hero: .welcome-desc is a semantic <h2> now --- */
.welcome-desc {
    font-size: var(--fs-title);
    line-height: 1.35;
}

/* --- Footer widgets: page list links --- */
.footer-widget-area .widget_pages a[aria-current="page"] {
    font-weight: 700;
    text-decoration: underline;
}

/* --- Misc: headings keep the entry title distinct --- */
body.page h1.entry-title,
body.home h1.entry-title {
    font-size: var(--fs-title);
    margin: 0;
}

/* --- Branding row: logo beside the company name, logo x2 --- */
.site-branding {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}
.site-branding a.site-logo-link {
    line-height: 0;
}
.site-branding .site-logo {
    width: auto;
    position: static;      /* neutralize style.css top:50% offset */
    top: auto;
    height: 80px;          /* double the previous 40px */
    max-height: 80px;
    margin-right: 14px;
    vertical-align: middle;
    flex: 0 0 auto;
}
.site-branding .site-title {
    font-size: 22px;       /* slightly smaller than the previous 30px */
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 1 auto;
}

/* ============================================================
   Home page: enhanced content sections (index.html)
   ============================================================ */

.home-intro p {
    line-height: 1.7;
    margin: 0 0 1.1em;
}

.section-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 18px;
}
.home-services,
.home-why,
.home-coverage {
    margin: 0 0 42px;
}

/* --- Contact page --- */
.contact-page-content {
    color: #263746;
    font-size: 15px;
}
.contact-page-content h2,
.contact-page-content h3,
.contact-page-content p {
    margin-top: 0;
}
.contact-page-content h2 {
    color: #102c42;
    font-size: 28px;
    margin-bottom: 8px;
}
.contact-page-content h3 {
    color: #102c42;
    font-size: 20px;
    margin-bottom: 12px;
}
.contact-page-content a {
    color: #006ece;
}
.contact-eyebrow,
.office-type {
    color: #d36b32;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin-bottom: 7px;
    text-transform: uppercase;
}
.contact-map-section,
.contact-section {
    margin-bottom: 48px;
}
.contact-map-heading,
.contact-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.contact-section-heading {
    display: block;
}
.contact-section-heading > p:not(.contact-eyebrow):not(.shipserv-id) {
    margin-bottom: 5px;
}
.shipserv-id {
    color: #647789;
    font-size: 13px;
}
.contact-map-link {
    border-bottom: 2px solid #d36b32;
    font-size: 13px;
    font-weight: 700;
    padding-bottom: 4px;
    text-decoration: none;
    white-space: nowrap;
}
.contact-map-link:hover,
.contact-map-link:focus-visible {
    color: #d36b32;
}
.contact-map-frame {
    background: #e6edf1;
    border: 1px solid #d4e0e7;
    box-shadow: 0 14px 28px rgba(16, 44, 66, .12);
    line-height: 0;
    overflow: hidden;
}
.contact-map-frame iframe {
    border: 0;
    display: block;
    min-height: 350px;
}
.office-grid,
.leadership-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.office-card,
.leader-card {
    background: #f4f7f8;
    border-top: 4px solid #9db5c3;
    padding: 23px 22px 20px;
}
.office-card-featured {
    border-top-color: #d36b32;
}
.office-card address {
    color: #526574;
    font-style: normal;
    line-height: 1.65;
    margin-bottom: 16px;
}
.office-card p,
.leader-card p {
    line-height: 1.55;
    margin-bottom: 7px;
}
.office-card p:last-child,
.leader-card p:last-child {
    margin-bottom: 0;
}
.office-type {
    margin-bottom: 10px;
}
.leadership-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.leader-card h3 {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 8px;
}
.leader-name {
    color: #006ece;
    font-weight: 700;
}
.legacy-contact-content {
    display: none;
}

@media only screen and (max-width: 780px) {
    .contact-map-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
    .office-grid,
    .leadership-grid {
        grid-template-columns: 1fr;
    }
    .contact-map-frame iframe {
        min-height: 300px;
    }
}

/* --- Services grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}
.svc-card {
    background: var(--color-muted-light);
    border-top: 4px solid var(--color-primary);
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
}
.svc-card h3 {
    margin: 0 0 10px;
    font-size: var(--fs-h3);
}
.svc-card h3 a {
    color: var(--color-primary);
    text-decoration: none;
}
.svc-card h3 a:hover,
.svc-card h3 a:focus-visible {
    color: var(--color-accent);
    text-decoration: underline;
}
.svc-card p {
    margin: 0 0 14px;
    line-height: 1.65;
}
.svc-more {
    margin-top: auto;
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
}
.svc-more:hover,
.svc-more:focus-visible {
    text-decoration: underline;
}

/* --- Why-choose-us grid --- */
.why-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px 26px;
}
.why-grid li {
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
}
.why-grid li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 7px;
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    transform: rotate(45deg);
}

/* --- Coverage panel --- */
.home-coverage {
    background: var(--color-muted-lighter);
    padding: 26px 28px;
}
.coverage-inner p {
    line-height: 1.65;
    margin: 0 0 16px;
}
.coverage-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.coverage-list li {
    background: var(--color-light);
    border-left: 4px solid var(--color-primary);
    padding: 12px 14px;
}
.cov-label {
    display: block;
    font-weight: 700;
}
.cov-detail {
    display: block;
    font-size: 13px;
}

/* --- Call to action band --- */
.home-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 34px 0 0;
}
.cta-btn {
    display: inline-block;
    padding: 12px 22px;
    font-weight: 700;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}
.cta-btn:hover,
.cta-btn:focus-visible {
    background: var(--color-primary);
    color: var(--color-light);
}
.cta-btn-main {
    background: var(--color-cta);
    border-color: var(--color-cta);
    color: var(--color-light);
}
.cta-btn-main:hover,
.cta-btn-main:focus-visible {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-light);
}

/* ============================================================
   Marine works page (marine-works.html)
   ============================================================ */

.works-hero {
    width: 100%;
    height: auto;
    margin: 0 0 22px;
    border-radius: 4px;
}

.svc-card .fa {
    display: inline-block;
    font-size: 26px;
    color: var(--color-primary);
    margin: 0 0 10px;
}

.svc-list {
    list-style: none;
    margin: 0 0 0 20px;
    padding: 0;
}
.svc-list li {
    position: relative;
    line-height: 1.6;
    margin: 0 0 8px;
}
.svc-list li::before {
    content: "·";
    position: absolute;
    left: -14px;
    color: var(--color-accent);
    font-weight: 700;
}

.svc-img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    margin: 0 0 14px;
    border-radius: 4px;
}

.works-compliance {
    margin: 0 0 42px;
}

.works-credits {
    margin: 24px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid #d7e2ec;
    font-size: 12px;
    line-height: 1.6;
    color: #6c7a89;
    text-align: center;
}