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

.page-hero--has-bg { background-color: #111; }
.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: 260px 0 200px;
    border-radius: 0;
    clip-path: inset(0px);
    margin-top: 0;
}
.page-hero-section__inner { padding-inline: 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);
}

/* 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: 80px 0 96px;
}
.sd-specs-section__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    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: 120px 0;
    overflow: hidden;
}
.sd-comfort::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;
}
.sd-gallery__grid {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.sd-gallery__item {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--light-grey);
}
.sd-gallery__item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease-out-expo);
}
.sd-gallery__item:hover img { transform: scale(1.04); }

/* 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);
}
.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 .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); }
}
@media (max-width: 640px) {
    .card-grid--3 { grid-template-columns: 1fr; }
}

/* ---- Ship Detail Responsive ---- */
@media (max-width: 1024px) {
    .sd-specs-section__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .sd-gallery__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .sd-hero { height: 60vh; min-height: 320px; }
    .sd-spec-row { grid-template-columns: 1fr; }
    .sd-desc-panel__actions { flex-direction: column; }
    .sd-gallery__grid { grid-template-columns: 1fr; }
    .sd-comfort { padding: 80px 0; }
}

