/* MODAL STYLES */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.modal:target {
    display: block;
}

/* Animations only for content modals, NOT lightboxes */
.modal:not(.modal--media) {
    animation: fadeIn 0.3s ease;
}

.modal:not(.modal--media):target .modal__dialog {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.72); backdrop-filter: blur(10px);
}

.modal__dialog {
    position: relative;
    width: min(1080px, calc(100% - 32px));
    max-height: calc(100% - 48px);
    margin: 24px auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #050505 100%);
    border: 1px solid rgba(206, 254, 70, 0.1);
    overflow: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 1px rgba(206, 254, 70, 0.1);
}

.modal__dialog h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    line-height: 1.3;
    color: #fff;
    position: relative;
    padding-bottom: 12px;
}

.modal__dialog h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
}

.modal__dialog > p {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    margin-bottom: 28px;
    max-width: 100%;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(206, 254, 70, 0.1);
}

.modal__header .mono {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(206, 254, 70, 0.7);
}

.modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    background: rgba(0,0,0,0.4); transition: var(--transition);
}
.modal__close:hover { border-color: var(--accent); color: var(--accent); }

.modal__grid {
    margin-top: 18px; display: grid; gap: 24px; grid-template-columns: 1fr;
}
@media (min-width: 900px){
    .modal__grid{ grid-template-columns: 1.05fr 0.95fr; }
}

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

.modal__thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(206, 254, 70, 0.15);
    background: #000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.85) contrast(1.05);
}

.modal__thumb:hover {
    border-color: var(--accent);
    transform: translateY(-4px) scale(1.02);
    filter: brightness(1) contrast(1.1);
    box-shadow: 0 8px 24px rgba(206, 254, 70, 0.25);
}

.modal__thumbLink {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.modal__thumbLink::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 40px;
    height: 40px;
    background: rgba(206, 254, 70, 0.9);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.modal__thumbLink:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.modal__block {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(206, 254, 70, 0.02);
    border-left: 2px solid rgba(206, 254, 70, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal__block::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .03) 25%, rgba(255, 255, 255, .03) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .03) 75%, rgba(255, 255, 255, .03) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .03) 25%, rgba(255, 255, 255, .03) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .03) 75%, rgba(255, 255, 255, .03) 76%, transparent 77%, transparent);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
}

.modal__block:hover {
    background: rgba(206, 254, 70, 0.04);
    border-left-color: var(--accent);
}

.modal__block .mono {
    margin-bottom: 12px;
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 0.15em;
    font-weight: 600;
    text-transform: uppercase;
}

.modal__block p {
    max-width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* MEDIA LIGHTBOX STYLES */
.modal--media .modal__dialog {
    background: transparent; border: none; box-shadow: none;
    padding: 0; width: auto; max-width: 1100px; max-height: 90vh;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; position: relative;
}

.modal__media {
    width: 100%; height: auto; max-height: 80vh; object-fit: contain;
    border: 1px solid #333; box-shadow: 0 10px 40px rgba(0,0,0,0.8); background: #000;
}

.modal__close--media {
    position: absolute; top: 16px; right: 16px; background: rgba(0,0,0,0.6);
    border: 1px solid #333; width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; text-decoration: none; font-size: 20px;
    transition: 0.3s ease; z-index: 10;
}
.modal__close--media:hover {
    border-color: var(--accent); color: var(--accent); background: rgba(0,0,0,0.8);
}

/* MEDIA NAVIGATION ARROWS */
.media-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; background: rgba(0,0,0,0.6);
    border: 1px solid #333; display: inline-flex; align-items: center;
    justify-content: center; color: #fff; text-decoration: none;
    font-size: 24px; font-weight: 700; transition: 0.3s ease;
    z-index: 10; pointer-events: auto;
}
.media-nav:hover {
    border-color: var(--accent); color: var(--accent); background: rgba(0,0,0,0.8);
}
.media-nav--prev { left: 16px; }
.media-nav--next { right: 16px; }

@media (max-width: 768px) {
    .modal__close--media { width: 44px; height: 44px; }
    .media-nav { width: 44px; height: 44px; }
    .media-nav--prev { left: 8px; }
    .media-nav--next { right: 8px; }
}

/* Form styles */
.kb-form { margin-top: 18px; }

.kb-grid {
    display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px;
}
@media (min-width: 900px){
    .kb-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .kb-span-2 { grid-column: span 2; }
}

.kb-field label {
    display:block; font-size:12px; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.06em;
}

.kb-field input, .kb-field select {
    width: 100%; padding: 14px 14px; background: #060606;
    color: var(--text-main); border: var(--border-thin);
    outline: none; font-size: 14px;
}

.kb-field input:focus, .kb-field select:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(206,254,70,0.12);
}

.kb-radio {
    display:flex; flex-wrap: wrap; gap: 10px 16px; padding: 10px 12px;
    border: var(--border-thin); background: rgba(0,0,0,0.25);
}

.kb-radio label {
    display:flex; align-items:center; gap: 8px; font-size: 12px;
    text-transform: uppercase; color: var(--text-main); letter-spacing: 0.04em;
}

.kb-actions {
    display:flex; gap: 12px; flex-wrap: wrap; margin-top: 18px;
}

/* --- FORM: validation, spinner, status --- */
.kb-req { color: var(--accent); }

.kb-field input.kb-valid,
.kb-field select.kb-valid {
    border-color: #22c55e;
}
.kb-field input.kb-invalid,
.kb-field select.kb-invalid {
    border-color: #ef4444;
}

.kb-submit-btn {
    position: relative; min-width: 260px; transition: opacity 0.2s;
}
.kb-submit-btn:disabled {
    opacity: 0.55; pointer-events: none;
}

.kb-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: kb-spin 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes kb-spin {
    to { transform: rotate(360deg); }
}

.kb-status {
    display: none; align-items: center; gap: 14px;
    padding: 18px 20px; margin-top: 18px;
    border: 1px solid transparent;
    animation: kb-slideIn 0.35s ease;
}
.kb-status[style*="display:flex"],
.kb-status[style*="display: flex"] {
    display: flex !important;
}
.kb-status-icon { font-size: 28px; flex-shrink: 0; }
.kb-status-text { font-size: 13px; line-height: 1.5; color: var(--text-main); }

.kb-status--success {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.3);
}
.kb-status--success .kb-status-icon { color: #22c55e; }

.kb-status--error {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.3);
}
.kb-status--error .kb-status-icon { color: #ef4444; }

@keyframes kb-slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.kb-note { font-size: 11px; }

/* NEW SPECS LIST STYLE WITH INFOGRAPHICS */
.spec-list {
    list-style: none;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

/* Icon indicators before list items - TECH LINE STYLE */
.spec-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    background: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* spec-list li hover removed — static specs, not interactive */

.spec-list li {
    margin-bottom: 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding: 8px 0 8px 18px;
    display: block;
    line-height: 1.8;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInUp 0.4s ease-out forwards;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

/* Stagger animation for list items */
.spec-list li:nth-child(1) { animation-delay: 0.05s; }
.spec-list li:nth-child(2) { animation-delay: 0.1s; }
.spec-list li:nth-child(3) { animation-delay: 0.15s; }
.spec-list li:nth-child(4) { animation-delay: 0.2s; }
.spec-list li:nth-child(5) { animation-delay: 0.25s; }
.spec-list li:nth-child(6) { animation-delay: 0.3s; }
.spec-list li:nth-child(7) { animation-delay: 0.35s; }
.spec-list li:nth-child(8) { animation-delay: 0.4s; }
.spec-list li:nth-child(9) { animation-delay: 0.45s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.spec-list li strong {
    color: var(--accent);
    margin-right: 6px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 12px;
}

/* spec-list li:hover strong removed */

/* BROCHURE BUTTON STYLES */
.btn-brochure {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(206, 254, 70, 0.1) 0%, rgba(206, 254, 70, 0.05) 100%);
    border: 1px solid rgba(206, 254, 70, 0.3);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(206, 254, 70, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-brochure::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(206, 254, 70, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-brochure:hover::before {
    left: 100%;
}

.btn-brochure:hover {
    background: linear-gradient(135deg, rgba(206, 254, 70, 0.2) 0%, rgba(206, 254, 70, 0.1) 100%);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(206, 254, 70, 0.3);
}

.pdf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    background: var(--accent);
    color: #000;
    padding: 3px 6px;
    border-radius: 2px;
    letter-spacing: 0.08em;
}

.modal__content-actions {
    display: flex; flex-direction: column; gap: 12px; margin-top: 24px;
}

.modal__media-actions {
  margin-top: 14px; display:flex; justify-content:flex-start;
}

.btn-brochure--gallery {
  width: auto; padding: 12px 18px;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(0,0,0,0.35);
}

.btn-brochure--gallery:hover {
  border-color: var(--accent); transform: translateY(-2px);
}

.btn-brochure .pdf-size { margin-left: 10px; color:#888; font-size:11px; }

.modal__content-actions .btn { width: 100%; max-width: 420px; justify-content: center; }
.modal__content-actions .btn-primary { width: 100%; }

@media (min-width: 600px) {
   .btn-brochure { width: auto; }
   .modal__content-actions { flex-direction: row; align-items: center; }
}

/* ====== SHIPYARD MODAL PREMIUM ====== */
