/* Tamburrino Photo Gallery Styles */

.tpg-gallery-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

.tpg-container {
    width: 100%;
}

/* Header */
.tpg-gallery-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.tpg-gallery-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.tpg-gallery-subtitle {
    color: #666;
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto;
}

/* Breadcrumb */
.tpg-breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #888;
}

.tpg-breadcrumb a {
    color: #2271b1;
    text-decoration: none;
}

.tpg-breadcrumb a:hover {
    text-decoration: underline;
}

.tpg-breadcrumb-sep {
    margin: 0 8px;
    color: #ccc;
}

/* Category Sections */
.tpg-category-section {
    margin-bottom: 40px;
}

.tpg-category-title {
    font-size: 1.5em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* Procedure Grid */
.tpg-procedure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tpg-procedure-card {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.tpg-procedure-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.tpg-procedure-card-image {
    aspect-ratio: 5 / 2;
    overflow: hidden;
    background: #f5f5f5;
}

.tpg-procedure-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tpg-procedure-card-info {
    padding: 12px 16px;
}

.tpg-procedure-card-info h3 {
    margin: 0 0 4px;
    font-size: 1.1em;
}

.tpg-case-count {
    color: #888;
    font-size: 0.9em;
}

/* Cases Grid */
.tpg-procedure-header {
    margin-bottom: 24px;
}

.tpg-procedure-header h1 {
    font-size: 1.8em;
    margin-bottom: 4px;
}

.tpg-case-count-header {
    color: #888;
    font-size: 1.1em;
}

.tpg-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.tpg-case-card {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.tpg-case-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.tpg-case-card-image {
    aspect-ratio: 5 / 2;
    overflow: hidden;
    background: #f5f5f5;
}

.tpg-case-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tpg-case-card-info {
    padding: 12px 16px;
}

.tpg-case-card-title {
    margin: 0 0 8px;
    font-size: 1.1em;
}

.tpg-case-card-desc {
    margin: 0 0 8px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
}

.tpg-case-card-procedures {
    margin: 0;
    font-size: 0.85em;
    color: #888;
}

/* Single Case Page */
.tpg-prev-next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.tpg-prev-next-bottom {
    border-bottom: none;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
    padding-top: 12px;
}

.tpg-prev-next a {
    color: #2271b1;
    text-decoration: none;
    font-size: 0.95em;
}

.tpg-prev-next a:hover {
    text-decoration: underline;
}

.tpg-prev, .tpg-next {
    flex: 0 0 auto;
    min-width: 140px;
}

.tpg-next {
    text-align: right;
}

.tpg-back-to-procedure {
    text-align: center;
}

/* Photo Viewer */
.tpg-photo-viewer {
    margin-bottom: 30px;
}

.tpg-main-image {
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.tpg-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.tpg-thumbnail-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.tpg-thumb {
    flex: 0 0 auto;
    width: 120px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #f5f5f5;
    transition: border-color 0.2s;
}

.tpg-thumb:hover,
.tpg-thumb.active {
    border-color: #2271b1;
}

.tpg-thumb img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    display: block;
}

.tpg-thumb-label {
    display: block;
    font-size: 0.75em;
    padding: 4px;
    text-align: center;
    color: #666;
}

/* Case Details */
.tpg-case-details {
    margin-top: 24px;
}

.tpg-case-attributes {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
}

.tpg-attribute {
    margin: 0 0 8px;
}

.tpg-attribute:last-child {
    margin-bottom: 0;
}

.tpg-attribute-label {
    font-weight: 600;
    margin-right: 8px;
}

.tpg-case-description h2 {
    font-size: 1.3em;
    margin-bottom: 12px;
}

.tpg-demographics {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 0.9em;
}

.tpg-demographics span {
    margin-right: 20px;
}

/* Disclaimer */
.tpg-disclaimer {
    color: #888;
    font-size: 0.85em;
    font-style: italic;
    margin-top: 40px;
    text-align: center;
}

.tpg-no-cases {
    padding: 40px;
    text-align: center;
    color: #888;
}

/* Content Confirmation Modal */
.tpg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpg-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.tpg-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tpg-modal-content h2 {
    margin: 0 0 16px;
    font-size: 1.5em;
}

.tpg-modal-content p {
    margin: 0 0 16px;
    color: #555;
    line-height: 1.6;
}

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

.tpg-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.tpg-btn-primary {
    background: #2271b1;
    color: #fff;
}

.tpg-btn-primary:hover {
    background: #135e96;
}

.tpg-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.tpg-btn-secondary:hover {
    background: #e0e0e0;
}

/* When modal is active, blur the page content behind it */
body.tpg-modal-active .tpg-gallery-main {
    filter: blur(8px);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .tpg-procedure-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .tpg-cases-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tpg-prev-next {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .tpg-prev, .tpg-next {
        min-width: auto;
        text-align: center;
    }

    .tpg-thumb {
        width: 80px;
    }

    .tpg-thumb img {
        height: 40px;
    }

    .tpg-gallery-header h1 {
        font-size: 1.5em;
    }

    .tpg-modal-content {
        padding: 24px;
    }
}
