/* ==============================================
   PAGE — Dynamic page styles (Page/Index.cshtml)
   Hero with optional background, section blocks
   ============================================== */

/* ---- Sustainability — deep teal navbar on scroll (matches ocean hero) ---- */
.page-sustainability .site-header.scrolled .nav-capsule {
    background: rgba(12, 62, 68, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
}
.page-sustainability .site-header.scrolled .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}
.page-sustainability .site-header.scrolled .nav-dropdown {
    background: #0a3a40;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 20px rgba(0,0,0,0.45);
}
.page-sustainability .site-header.scrolled .nav-dropdown::before { background: #0a3a40; border-color: rgba(255, 255, 255, 0.1); }
.page-sustainability .site-header.scrolled .nav-dd-item:hover { background: rgba(255, 255, 255, 0.08); }
.page-sustainability .site-header.scrolled.menu-open .nav-capsule {
    background: rgba(12, 62, 68, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
}
.page-sustainability .site-header.scrolled.menu-open .brand-logo,
.page-sustainability .site-header.scrolled.menu-open .mobile-menu-btn span {
    color: #fff;
}

.page-hero--has-bg { background-color: #111; background-size: 110% auto; background-position: center center; }
.page-hero--has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
    pointer-events: none;
}
.page-hero--has-bg .container { position: relative; z-index: 1; }
.page-hero--has-bg .card-tag,
.page-hero--has-bg h1,
.page-hero--has-bg p { color: #fff !important; }
.page-hero--has-bg .card-tag { opacity: 0.7; }

/* Projects Index Hero — taller, no top radius */
.page-hero-section {
    padding: 180px 0 120px;
    border-radius: 0;
    clip-path: inset(0px);
    margin-top: 0;
}
.page-hero-section__inner { padding-inline: calc(var(--container-padding) + 24px); }
.page-hero-section__title { font-size: var(--fs-5xl); }
.page-hero-section__desc { max-width: 500px; margin-top: var(--space-6); transition-delay: 150ms; }

/* Hero with background image */
.page-hero-section--bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.page-hero-section--bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}
.page-hero-section--bg .page-hero-section__inner { position: relative; z-index: 1; }
.page-hero-section--bg .card-tag,
.page-hero-section--bg h1,
.page-hero-section--bg p { color: #fff !important; }
.page-hero-section--bg .card-tag { opacity: 0.7; }

/* Editor images responsive */
.page-body img {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
}

/* Editor list styles — override pasted Tailwind classes */
.page-body ul,
.page-body ol {
    padding-left: 1.5em;
    margin: 1em 0;
    line-height: 1.8;
}
.page-body ul { list-style: disc; }
.page-body ol { list-style: decimal; }
.page-body li {
    margin-bottom: 0.35em;
    padding-left: 0.25em;
}
.page-body li::marker {
    color: currentColor;
}

/* Nested lists */
.page-body ul ul { list-style: circle; margin: 0.3em 0; }
.page-body ul ul ul { list-style: square; }

/* Editor table styles */
.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.page-body th,
.page-body td {
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,.1);
    text-align: left;
}

/* ==============================================
   SHIP DETAIL — Projects/Detail.cshtml (sd-* classes)
   ============================================== */

/* ---- Hero ---- */
.sd-hero-wrap {
    background: var(--section-grey);
}
.sd-hero {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 380px;
    max-height: 650px;
    overflow: hidden;
    border-radius: 0 0 var(--radius-section) var(--radius-section);
}
.sd-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sd-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}
.sd-hero__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

/* Certification logo overlay (right side of section header) */
.page-section-header--with-cert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.page-section-header--with-cert h2 { margin: 0; }
.page-section-cert {
    max-height: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
}
@media (max-width: 768px) {
    .page-section-header--with-cert { gap: 16px; }
    .page-section-cert { max-height: 88px; }
}

/* Award badge overlay (bottom-right corner of hero) */
.sd-hero__award {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 130px;
    height: auto;
    z-index: 20;
    pointer-events: none;
}
@media (max-width: 768px) {
    .sd-hero__award { width: 90px; bottom: 16px; right: 16px; }
}
@media (max-width: 480px) {
    .sd-hero__award { width: 72px; bottom: 12px; right: 12px; }
}

/* Slider */
.sd-slider { position: relative; width: 100%; height: 100%; }
.sd-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.sd-slider__slide.active { opacity: 1; }
.sd-slider__slide img,
.sd-slider__slide video,
.sd-slider__slide iframe { width: 100%; height: 100%; object-fit: cover; }
.sd-slider__dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.sd-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.sd-slider__dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Info bar */
.sd-info-bar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px var(--container-padding);
    max-width: 100%;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--section-grey);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.sd-info-bar__cat { color: var(--black); }
.sd-info-bar__ref { color: var(--text-muted); }

/* ---- Specs + Description ---- */
.sd-specs-section {
    color: var(--black);
    padding: 70px 0 96px;
}
.sd-specs-section__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 35px var(--container-padding) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

/* Spec grid */
.sd-spec-grid { display: flex; flex-direction: column; gap: 0; }
.sd-spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.sd-spec-cell { padding: 20px 0; }
.sd-spec-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.sd-spec-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--black);
}
.sd-spec-value--sm { font-size: 1.1rem; }

/* Description panel */
.sd-desc-panel__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--black);
    margin-bottom: 32px;
}
.sd-desc-panel__text {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 40px;
}
.sd-desc-panel__text p { color: var(--text-body); margin-bottom: 1em; }
.sd-desc-panel__text p:last-child { margin-bottom: 0; }
.sd-desc-panel__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.sd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    border: 1.5px solid rgba(0,0,0,0.15);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.sd-btn:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* ---- Comfort Section ---- */
.sd-comfort {
    position: relative;
    z-index: 3;
    background-color: #111;
    background-size: cover;
    background-position: center;
    padding: 72px 0 100px;
    overflow: hidden;
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    margin-top: calc(-1 * var(--radius-section));
}
.sd-comfort--has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 0;
}
.sd-comfort__inner {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.sd-comfort__heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 24px;
}
.sd-comfort__body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.65);
    max-width: 720px;
}
.sd-comfort__body p { color: rgba(255,255,255,0.65); }

/* ---- Gallery ---- */
.sd-gallery {
    position: relative;
    z-index: 4;
    background: var(--section-grey);
    padding: 80px 0;
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    margin-top: calc(-1 * var(--radius-section));
}
.sd-gallery__slider-wrap {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.sd-gallery__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    padding-bottom: 4px;
    /* Native touch + snap on mobile, free scroll on desktop */
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}
.sd-gallery__track::-webkit-scrollbar { display: none; }
.sd-gallery__track.dragging { cursor: grabbing; scroll-behavior: auto; }
.sd-gallery__item {
    flex: 0 0 auto;
    width: 420px;
    height: 295px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--light-grey);
    scroll-snap-align: start;
}
.sd-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease-out-expo);
}
.sd-gallery__item:hover img { transform: scale(1.04); }
.sd-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s;
    opacity: 0;
    pointer-events: none;
}
.sd-gallery__slider-wrap:hover .sd-gallery__arrow { opacity: 1; pointer-events: auto; }
.sd-gallery__arrow:hover { background: rgba(0,0,0,0.75); }
.sd-gallery__arrow--prev { left: calc(var(--container-padding) + 12px); }
.sd-gallery__arrow--next { right: calc(var(--container-padding) + 12px); }

/* Back button */
.sd-back {
    text-align: center;
    padding: 48px 0 80px;
    background: var(--section-grey);
}

/* ==============================================
   PROJECTS INDEX — Card Grid (Projects/Index.cshtml)
   ============================================== */

.card-grid {
    display: grid;
    gap: 24px;
}
.card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.card--dark {
    background: var(--white);
    color: var(--black);
}
.card--dark p { color: var(--text-body); }
.card--dark .card-tag { color: var(--text-muted); }

.card-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--section-grey);
    position: relative;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease-out-expo);
}
.card:hover .card-image img {
    transform: scale(1.04);
}
.card-image .card-award {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 44px !important;
    height: auto !important;
    object-fit: contain !important;
    z-index: 5;
    pointer-events: none;
    transition: none !important;
}
.card:hover .card-image .card-award { transform: none !important; }
@media (max-width: 768px) {
    .card-image .card-award { width: 36px !important; bottom: 8px; right: 8px; }
}

.card .card-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 24px 28px 0;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 8px 28px 0;
}

.card p {
    font-size: 0.875rem;
    line-height: 1.6;
    padding: 12px 28px 28px;
}

.card--dark h3 { color: var(--black); }

/* Projects Index Responsive */
@media (max-width: 1024px) {
    .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile overrides → mobile.css */

/* ---- Ship Detail Responsive ---- */
@media (max-width: 1024px) {
    .sd-specs-section__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .sd-gallery { padding: 56px 0; }
    .sd-gallery__track {
        scroll-snap-type: x mandatory;
        scroll-padding-left: var(--container-padding);
        gap: 12px;
    }
    .sd-gallery__item {
        width: 85vw;
        max-width: 380px;
        height: 64vw;
        max-height: 280px;
    }
    .sd-gallery__arrow { display: none; }
}
@media (max-width: 640px) {
    .sd-gallery { padding: 48px 0; }
    .sd-gallery__slider-wrap { padding: 0 16px; }
    .sd-gallery__track { gap: 10px; }
    .sd-gallery__item {
        width: calc(100vw - 60px);
        height: calc((100vw - 60px) * 0.7);
        max-height: 240px;
    }
}

/* ---- Contact Section ---- */
.contact-section { padding: 100px 0 120px; color: #fff; }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.contact-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 16px;
}
.contact-subtext {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
    margin-bottom: 40px;
}
.contact-details { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: #fff;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.25s, border-color 0.25s;
}
.contact-detail-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}
.contact-detail-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(0,229,255,0.1);
    color: #00e5ff;
}
.contact-detail-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 4px;
}
.contact-detail-value {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #fff;
}
.contact-map {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}
.contact-map iframe { display: block; }

/* Contact Form */
.contact-form-side {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 48px 40px;
}
.contact-form-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 32px;
}
.contact-alert {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 0.9rem;
}
.contact-alert--success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.25);
    color: #22c55e;
}
.contact-alert--error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
}
.ct-field { margin-bottom: 24px; }
.ct-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}
.ct-req { color: #00e5ff; }
.ct-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1rem;
    padding: 12px 0;
    outline: none;
    transition: border-color 0.25s;
    font-family: inherit;
}
.ct-input:focus { border-color: #00e5ff; }
.ct-input::placeholder { color: rgba(255,255,255,0.25); }
textarea.ct-input { resize: vertical; min-height: 100px; }
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ct-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #00e5ff;
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 16px 40px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 8px;
}
.ct-submit:hover { background: #fff; color: #000; }

@media (max-width: 1024px) {
    .contact-grid { grid-template-columns: 1fr; gap: 48px; }
    .contact-form-side { padding: 36px 28px; }
}
@media (max-width: 640px) {
    .ct-row { grid-template-columns: 1fr; gap: 0; }
    .contact-section { padding: 72px 0 80px; }
}

/* ---- Career Form ---- */
#career-form {
    --form-label: #999999;
    --form-accent: #00e5ff;
    --form-text: #ffffff;
}
.career-field { margin-bottom: 28px; }
.career-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.career-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--form-label) 40%, transparent);
    color: var(--form-text);
    font-size: 1rem;
    padding: 12px 0;
    outline: none;
    transition: border-color 0.25s;
    font-family: inherit;
}
.career-input:focus { border-color: var(--form-accent); }
.career-input::placeholder { color: var(--form-label); opacity: 0.6; }
select.career-input { cursor: pointer; }
select.career-input option { background: #111; color: #fff; }
textarea.career-input { resize: vertical; min-height: 100px; }
.career-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.career-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed color-mix(in srgb, var(--form-label) 40%, transparent);
    border-radius: 16px;
    padding: 32px;
    cursor: pointer;
    transition: border-color 0.25s;
    text-align: center;
    color: var(--form-text);
}
.career-upload:hover { border-color: color-mix(in srgb, var(--form-accent) 40%, transparent); }
.career-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.career-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--form-accent);
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 16px 40px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 16px;
}
.career-submit:hover { background: var(--form-text); color: #000; }
@media (max-width: 640px) {
    .career-row { grid-template-columns: 1fr; gap: 0; }
}

