/**
 * cpt-single.css
 * Unified styles for Place, Event, and Collection single templates
 * piter.now — city guide for St. Petersburg
 */

/* =========================================================================
   Custom Properties
   ========================================================================= */

:root {
    --primary-color: #00ab8f;
    --accent-color: #ff6600;
}

/* =========================================================================
   Info Card (.cpt-info)
   ========================================================================= */

.cpt-info {
    display: flex;
    flex-direction: column;
    margin: 1.5rem 0;
}

.cpt-info__closed-banner {
    background: #dc3545;
    color: #fff;
    text-align: center;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--round-5) var(--round-5) 0 0;
    margin-bottom: 0;
}

.cpt-info__card {
    background: var(--nav-bg, #fff);
    border-radius: var(--round-5);
    box-shadow: 0 2px 16px var(--shadow-12);
    padding: 1.25rem;
}

.cpt-info__closed-banner + .cpt-info__card {
    border-radius: 0 0 var(--round-5) var(--round-5);
}

.cpt-info__rows {
    display: flex;
    flex-direction: column;
}

.cpt-info__row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    border-bottom: 1px solid var(--flex-gray-15);
    transition: var(--effect);
}

.cpt-info__row:last-child {
    border-bottom: none;
}

.cpt-info__row:hover {
    background: var(--flex-gray-7);
    border-radius: var(--round-3);
}

.cpt-info__icon {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
    color: var(--primary-color, #00ab8f);
    font-size: 1rem;
    margin-top: 2px;
}

.cpt-info__value {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--body-fcolor);
    word-break: break-word;
}

.cpt-info__value a {
    color: var(--body-fcolor);
    text-decoration: none;
    transition: var(--effect);
}

.cpt-info__value a:hover {
    color: var(--primary-color, #00ab8f);
}

/* Metro icon (SPb red) */
.cpt-info__metro-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #d52b1e;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.375rem;
    vertical-align: middle;
}

/* Booking button */
.cpt-info__booking-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: var(--primary-color, #00ab8f);
    color: #fff;
    border-radius: var(--round-3);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--effect);
    margin-top: 0.25rem;
}

.cpt-info__booking-btn:hover {
    opacity: 0.85;
    color: #fff;
}

/* =========================================================================
   Taxonomy Badges (.cpt-taxonomies)
   ========================================================================= */

.cpt-taxonomies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
    padding: 0;
}

.cpt-taxonomy-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--flex-gray-7);
    color: var(--body-fcolor);
    font-size: 0.8125rem;
    border-radius: var(--round-3);
    text-decoration: none;
    transition: var(--effect);
}

.cpt-taxonomy-tag:hover {
    background: var(--primary-color, #00ab8f);
    color: #fff;
}

/* =========================================================================
   Event-Specific (.cpt-info--event)
   ========================================================================= */

.cpt-info__free-badge {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 0.125rem 0.5rem;
    border-radius: var(--round-3);
    font-size: 0.8125rem;
    font-weight: 600;
}

.cpt-info__age-badge {
    display: inline-block;
    background: var(--flex-gray-7);
    color: var(--body-fcolor);
    padding: 0.125rem 0.5rem;
    border-radius: var(--round-3);
    font-size: 0.8125rem;
    font-weight: 700;
}

.cpt-info__venue-link {
    font-weight: 500;
}

.cpt-info__sub,
.cpt-info__venue-address {
    display: block;
    font-size: 0.8125rem;
    color: var(--g-color-meta, #999);
    margin-top: 0.125rem;
}

/* =========================================================================
   Yandex Maps Embed
   ========================================================================= */

.cpt-info__map {
    margin-top: 1.5rem;
    border-radius: var(--round-5);
    overflow: hidden;
}

.cpt-info__map iframe {
    display: block;
    width: 100%;
    height: 300px;
    border: 0;
}

/* =========================================================================
   Collection Items (.collection-items)
   ========================================================================= */

.collection-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.collection-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--nav-bg, #fff);
    border-radius: var(--round-5);
    box-shadow: 0 2px 12px var(--shadow-12);
    transition: var(--effect);
}

.collection-item:hover {
    box-shadow: 0 4px 20px var(--shadow-12);
}

.collection-item__rank {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary-color, #00ab8f);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50%;
    align-self: flex-start;
}

.collection-item__thumb {
    flex-shrink: 0;
    width: 5rem;
    height: 3.75rem;
    border-radius: var(--round-3);
    overflow: hidden;
}

.collection-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-item__content {
    flex: 1;
    min-width: 0;
}

.collection-item__title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--body-fcolor);
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.collection-item__title:hover {
    color: var(--primary-color, #00ab8f);
}

.collection-item__type-badge {
    display: inline-block;
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
    background: var(--flex-gray-7);
    color: var(--g-color-meta, #999);
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.collection-item__meta {
    font-size: 0.8125rem;
    color: var(--g-color-meta, #999);
    margin-top: 0.25rem;
}

.collection-item__note {
    font-size: 0.875rem;
    color: var(--body-fcolor);
    margin-top: 0.375rem;
    font-style: italic;
    line-height: 1.4;
}

/* Tag badge inside light-scheme header (over dark hero) */
.light-scheme .cpt-taxonomy-tag {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.light-scheme .cpt-taxonomy-tag:hover {
    background: var(--primary-color, #00ab8f);
    color: #fff;
}

/* =========================================================================
   Info Field Icons (.cpt-field)
   ========================================================================= */

.cpt-field {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.cpt-field__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 2px;
}

.cpt-field__icon svg {
    display: block;
}

.cpt-field a {
    color: var(--body-fcolor);
    text-decoration: none;
    transition: var(--effect);
}

.cpt-field a:hover {
    color: var(--primary-color, #00ab8f);
}

/* =========================================================================
   Single CPT Page Overrides
   ========================================================================= */

.single-place .note-wrap,
.single-event .note-wrap {
    margin-bottom: 30px;
}

.single-collection .collection-items {
    margin-top: 0;
    margin-bottom: 2rem;
}

/* =========================================================================
   Dark Mode
   ========================================================================= */

[data-theme="dark"] .cpt-info__closed-banner {
    background: #a71d2a;
}

[data-theme="dark"] .collection-item {
    border: 1px solid var(--flex-gray-15);
}

/* =========================================================================
   Responsive — Tablet+ (768px)
   ========================================================================= */

@media (min-width: 768px) {
    .cpt-info__card {
        padding: 1.5rem;
    }

    .cpt-info__map iframe {
        height: 350px;
    }

    .collection-item__rank {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }

    .collection-item__thumb {
        width: 6rem;
        height: 4.5rem;
    }
}

/* =========================================================================
   Responsive — Desktop+ (1024px)
   ========================================================================= */

@media (min-width: 1024px) {
    .cpt-info__map iframe {
        height: 400px;
    }
}
