/**
 * Single Sloop Detail Page Styles
 * Custom styling for sloop detail pages
 */

/* Hero Section */
.sloop-hero {
    margin-bottom: 40px;
}

.sloop-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    background: #f8f9fa;
}

.sloop-featured-image img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.sloop-title-block {
    text-align: center;
    padding: 30px 0;
    border-bottom: 3px solid #2c5f8d;
}

.sloop-name {
    font-size: 48px;
    font-weight: 700;
    color: #2c5f8d;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.sloop-fss-number {
    font-size: 24px;
    color: #666;
    font-weight: 500;
}

/* Status Banner */
.sloop-status-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border-left: 5px solid;
    background: #fff3cd;
    border-left-color: #ffc107;
}

.sloop-status-banner.status-destroyed {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.sloop-status-banner.status-lost {
    background: #e2e3e5;
    border-left-color: #6c757d;
}

.sloop-status-banner.status-rebuilding {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.sloop-status-banner.status-sold_removed {
    background: #e7e7e7;
    border-left-color: #6c757d;
}

.sloop-status-banner.status-unknown {
    background: #f8f9fa;
    border-left-color: #adb5bd;
}

.status-icon {
    font-size: 28px;
    line-height: 1;
}

.status-label {
    font-weight: 700;
    font-size: 20px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-message {
    font-size: 16px;
    color: #555;
}

.status-details {
    grid-column: 2 / -1;
    font-size: 15px;
    color: #333;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.status-exname {
    grid-column: 2 / -1;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Name History Section */
.sloop-name-history {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.sloop-name-history h2 {
    color: #2c5f8d;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #2c5f8d;
    padding-bottom: 10px;
}

.name-history-intro {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
    font-style: italic;
}

.name-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.name-history-list li {
    padding: 12px 20px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.history-name {
    font-weight: 600;
    color: #2c5f8d;
    font-size: 18px;
}

.history-years {
    color: #666;
    font-size: 15px;
    font-style: italic;
}

/* Specifications Section */
.sloop-specifications {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.sloop-specifications h2 {
    color: #2c5f8d;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #2c5f8d;
    padding-bottom: 10px;
}

.spec-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    align-items: stretch;
}

.spec-item {
    flex: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.spec-item--narrow {
    flex: 1;
}

.spec-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.spec-value {
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

/* Story/Content Section */
.sloop-story {
    margin-bottom: 40px;
}

.sloop-story h2 {
    color: #2c5f8d;
    font-size: 28px;
    margin-bottom: 20px;
    border-bottom: 2px solid #2c5f8d;
    padding-bottom: 10px;
}

.sloop-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.sloop-content p {
    margin-bottom: 15px;
}

/* Photo Gallery */
.sloop-gallery {
    margin-bottom: 40px;
}

.sloop-gallery h2 {
    color: #2c5f8d;
    font-size: 28px;
    margin-bottom: 25px;
    border-bottom: 2px solid #2c5f8d;
    padding-bottom: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* "Is this your boat?" request box */
.sloop-boat-request {
    background: #e8f0f8;
    padding: 24px 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.sloop-boat-request h2 {
    color: #2c5f8d;
    font-size: 24px;
    margin: 0 0 12px;
}

.boat-request-form {
    display: grid;
    gap: 12px;
    max-width: 520px;
}

.boat-request-form label {
    display: grid;
    gap: 4px;
    font-weight: 600;
}

.boat-request-optional {
    font-weight: 400;
    color: #666;
}

.boat-request-submit {
    justify-self: start;
    background: #2c5f8d;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 10px 22px;
    font-weight: 600;
    cursor: pointer;
}

.boat-request-notice {
    padding: 10px 14px;
    border-radius: 4px;
    background: #fff;
    border-left: 4px solid #2c5f8d;
}

.boat-request-notice--success { border-left-color: #2d7558; }
.boat-request-notice--error   { border-left-color: #8b3439; }

/* Ownership Section */
.sloop-ownership {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.sloop-ownership h2 {
    color: #2c5f8d;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #2c5f8d;
    padding-bottom: 10px;
}

.sloop-ownership h3 {
    color: #555;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
}

.ownership-current {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.boat-history-timeline {
    background: white;
    padding: 20px;
    border-radius: 6px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.history-table thead {
    background: #f0f0f0;
}

.history-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #ddd;
}

.history-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.history-table tbody tr:hover {
    background: #f9f9f9;
}

.history-years {
    white-space: nowrap;
    color: #666;
    font-weight: 500;
}

.history-owner {
    color: #333;
}

.history-name {
    color: #2c5f8d;
    font-style: italic;
}

.ownership-history {
    background: white;
    padding: 20px;
    border-radius: 6px;
}

.ownership-content {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

.ownership-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ownership-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ownership-list li:last-child {
    border-bottom: none;
}

.owner-name {
    font-weight: 500;
    color: #2c5f8d;
}

.owner-years {
    color: #666;
    font-size: 14px;
}

/* For Sale Section */
.sloop-for-sale {
    background: #2c5f8d;
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.for-sale-badge h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    color: white;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.contact-label {
    font-weight: 600;
    min-width: 80px;
}

.contact-item a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    transition: border-color 0.3s ease;
}

.contact-item a:hover {
    border-bottom-color: white;
}

/* Charter Section */
.sloop-charter {
    background: #2d7558;
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.charter-badge h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    color: white;
}

/* Navigation */
.sloop-navigation {
    text-align: center;
    padding: 30px 0;
}

.back-to-registry {
    display: inline-block;
    padding: 12px 30px;
    background: #2c5f8d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
}

.back-to-registry:hover {
    background: #1e4565;
    transform: translateY(-2px);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sloop-name {
        font-size: 32px;
    }

    .sloop-fss-number {
        font-size: 18px;
    }

    .sloop-status-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 20px;
    }

    .status-label {
        font-size: 18px;
    }

    .status-message {
        font-size: 14px;
    }

    .name-history-list li {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .spec-grid {
        flex-wrap: wrap;
    }

    .spec-item {
        flex: 1 1 45%;
    }

    .spec-item--narrow {
        flex: 1 1 30%;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-item img {
        height: 150px;
    }

    .sloop-specifications,
    .sloop-name-history,
    .sloop-ownership,
    .sloop-for-sale,
    .sloop-charter {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .sloop-navigation {
        display: none;
    }

    .sloop-for-sale,
    .sloop-charter {
        background: #f8f9fa !important;
        color: #333 !important;
    }

    .contact-item a {
        color: #333 !important;
    }
}
