/**
 * ================================================
 * AQUA PLASTIC SURGERY - SINGLE CASE PAGE
 * ================================================
 * Case study detail page with hero carousel and navigation
 */

/* ===================================
   SINGLE CASE CONTAINER
   =================================== */

.aps-single-case {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ===================================
   HERO SECTION
   =================================== */

.aps-case-hero {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    padding: 40px 0;
    margin-bottom: 40px;
}

/* ===================================
   LEFT: CASE DETAILS (33%)
   =================================== */

.aps-case-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 20px;
}

.aps-case-id {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1d87af;
    margin-bottom: 8px;
}

h1.aps-case-title,
.aps-case-title {
    font-family: 'Libre Caslon Text', serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 44px;
    color: #03151c;
    margin: 0 0 16px 0;
}

/* Provider Byline */
.aps-case-provider {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
    padding: 4px 0;
}

.aps-case-provider:hover {
    opacity: 0.85;
}

.aps-case-provider-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    border: 2px solid #ffffff;
}

.aps-case-provider-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aps-case-provider-label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #1d87af;
}

.aps-case-provider-name {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #03151c;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aps-case-provider-arrow {
    color: #1d87af;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    opacity: 0;
}

.aps-case-provider:hover .aps-case-provider-arrow {
    transform: translateX(3px);
    opacity: 1;
}

.aps-case-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #666666;
    margin-bottom: 12px;
}

.aps-meta-item {
    white-space: nowrap;
}

.aps-meta-divider {
    color: #CCCCCC;
}

.aps-case-description {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
    color: #03151c;
    margin-bottom: 24px;
}

.aps-case-description p {
    margin: 0 0 16px 0;
}

.aps-case-description p:last-child {
    margin-bottom: 0;
}

/* Case Details List (editorial UL inside description) */
.aps-case-description ul {
    background: #f3f9fa;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    list-style: none;
}

.aps-case-description ul li {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    line-height: 26px;
    color: #03151c;
    padding: 2px 0;
}

.aps-case-description ul li strong {
    font-weight: 700;
}

/* Consultation Button */
.aps-btn-consultation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: linear-gradient(180deg, #31c3f2 0%, #1d87af 100%);
    color: #ffffff;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(29, 135, 175, 0.3);
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
}

.aps-btn-consultation:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 135, 175, 0.4);
    color: #ffffff;
}

/* ===================================
   RIGHT: IMAGES WRAPPER (67%)
   =================================== */

.aps-case-images-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #f3f9fa;
    padding: 20px;
    border-radius: 12px;
}

.aps-case-main-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    position: relative;
}

.aps-case-image-large {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.aps-case-image-large img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Image Labels (Before/After) */
.aps-image-label {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    background: rgba(3, 21, 28, 0.8);
    color: #ffffff;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* ===================================
   CAROUSEL NAVIGATION ARROWS
   =================================== */

.aps-carousel-prev,
.aps-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 49.631px;
    height: 49.631px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    color: #03151c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 20;
}

.aps-carousel-prev {
    left: 20px;
}

.aps-carousel-next {
    right: 20px;
}

.aps-carousel-prev:hover,
.aps-carousel-next:hover {
    background: linear-gradient(180deg, #31c3f2 0%, #1d87af 100%);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 24px rgba(29, 135, 175, 0.3);
}

.aps-carousel-prev:disabled,
.aps-carousel-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.aps-carousel-prev:disabled:hover,
.aps-carousel-next:disabled:hover {
    background: #ffffff;
    color: #03151c;
    transform: translateY(-50%) scale(1);
}

/* ===================================
   THUMBNAIL GALLERY
   =================================== */

.aps-case-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 10px;
}

.aps-thumbnail-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    width: 150px;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.6;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.aps-thumbnail-pair:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.aps-thumbnail-pair.active {
    opacity: 1;
    outline: 3px solid #1d87af;
    outline-offset: 2px;
}

.aps-thumbnail-image {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f3f9fa;
}

/* padding-bottom fallback for Safari < 15 (aspect-ratio unsupported) */
@supports not (aspect-ratio: 1/1) {
    .aps-thumbnail-image {
        height: 0;
        padding-bottom: 133.33%; /* 4 / 3 × 100 */
        position: relative;
    }
    .aps-thumbnail-image img {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.aps-thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aps-thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: rgba(3, 21, 28, 0.9);
    color: #ffffff;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    grid-column: 1 / -1;
}

/* ===================================
   DISCLAIMER
   =================================== */

.aps-case-disclaimer p {
    font-family: 'Nunito Sans', sans-serif;
    font-style: italic;
    font-size: 14px;
    color: #666666;
    text-align: center;
    margin: 0;
    padding-top: 6px;
}

/* ===================================
   CASE NAVIGATION BAR
   =================================== */

.aps-case-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    margin-top: 60px;
    background: #f3f9fa;
    border-radius: 12px;
    padding: 32px 40px;
}

.aps-nav-prev-wrapper,
.aps-nav-next-wrapper {
    flex: 1;
}

.aps-nav-prev-wrapper {
    display: flex;
    justify-content: flex-start;
}

.aps-nav-next-wrapper {
    display: flex;
    justify-content: flex-end;
}

.aps-nav-prev,
.aps-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 40px;
    border: 1px solid rgba(0, 82, 109, 0.3);
    border-radius: 30px;
    background: #ffffff;
    color: #00526d;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.aps-nav-prev svg,
.aps-nav-next svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.aps-nav-prev:hover,
.aps-nav-next:hover {
    border-color: #00526d;
    background: #00526d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 109, 0.2);
}

.aps-nav-prev:hover svg {
    transform: translateX(-4px);
}

.aps-nav-next:hover svg {
    transform: translateX(4px);
}

.aps-nav-back {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #00526d;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.aps-nav-back:hover {
    color: #1d87af;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .aps-case-hero {
        grid-template-columns: 1fr 1.5fr;
        gap: 30px;
    }
    
    .aps-case-title {
        font-size: 32px;
        line-height: 40px;
    }
    
    .aps-carousel-prev,
    .aps-carousel-next {
        width: 40px;
        height: 40px;
    }
    
    .aps-carousel-prev {
        left: 10px;
    }
    
    .aps-carousel-next {
        right: 10px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .aps-single-case {
        padding: 20px 15px 60px;
    }
    
    .aps-case-hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px 0;
    }
    
    .aps-case-details {
        padding-right: 0;
        order: 2;
    }
    
    .aps-case-images-wrapper {
        order: 1;
    }
    
    .aps-case-images-wrapper {
        padding: 15px;
    }
    
    .aps-case-title {
        font-size: 28px;
        line-height: 36px;
    }
    
    .aps-case-provider-photo {
        width: 40px;
        height: 40px;
    }
    
    .aps-case-provider-name {
        font-size: 14px;
    }
    
    .aps-case-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .aps-meta-divider {
        display: none;
    }
    
    .aps-case-description {
        font-size: 15px;
        line-height: 24px;
    }
    
    .aps-btn-consultation {
        width: 100%;
        justify-content: center;
    }
    
    .aps-case-thumbnails {
        display: none;
    }
    
    .aps-carousel-prev,
    .aps-carousel-next {
        width: 36px;
        height: 36px;
    }
    
    .aps-carousel-prev svg,
    .aps-carousel-next svg {
        width: 16px;
        height: 16px;
    }
    
    .aps-case-navigation {
        flex-direction: column;
        gap: 20px;
        padding: 24px 20px;
    }
    
    .aps-nav-prev-wrapper,
    .aps-nav-next-wrapper {
        width: 100%;
    }
    
    .aps-nav-prev,
    .aps-nav-next {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 14px;
        letter-spacing: 2px;
    }
    
    .aps-nav-back {
        font-size: 14px;
        order: -1;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .aps-case-main-images {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .aps-carousel-prev,
    .aps-carousel-next {
        display: none;
    }
    
    .aps-case-thumbnails {
        flex-wrap: wrap;
    }
    
    .aps-thumbnail-pair {
        width: 120px;
    }
    
    .aps-case-title {
        font-size: 24px;
        line-height: 32px;
    }
}
