/* Single Clinical Page Styles */

/* Banner Full Size */
.clinical-banner {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    margin-bottom: 0;
}

.clinical-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.clinical-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.clinical-banner h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.clinical-banner .banner-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Main Container */
.clinical-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 20px;
    display: flex;
    gap: 50px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Sidebar Menu */
.clinical-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.clinical-sidebar h3 {
    font-size: 1.6rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0073aa;
    text-align: center;
}

.clinical-menu-category {
    margin-bottom: 30px;
}

.clinical-menu-category h4 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 10px;
    border-left: 4px solid #0073aa;
}

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

.clinical-menu-list li {
    margin-bottom: 5px;
}

.clinical-menu-list a {
    display: block;
    padding: 12px 18px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.clinical-menu-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0073aa, #005a87);
    transition: width 0.3s ease;
    z-index: -1;
}

.clinical-menu-list a:hover {
    background: #f8f9fa;
    color: #0073aa;
    border-color: #0073aa;
    transform: translateX(5px);
}

.clinical-menu-list a:hover::before {
    width: 100%;
}

.clinical-menu-list a.active {
    background: linear-gradient(135deg, #7367f0, #5a52d5);
    color: white;
    border-color: #7367f0;
    box-shadow: 0 4px 15px rgba(115, 103, 240, 0.3);
    transform: translateX(5px);
}

/* Main Content */
.clinical-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.clinical-content h2 {
    font-size: 2.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0073aa;
    position: relative;
}

.clinical-content h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #7367f0;
}

.clinical-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 30px 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid #0073aa;
}

.clinical-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

.clinical-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.clinical-content img:hover {
    transform: scale(1.02);
}

/* Patient Info */
.patient-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 35px;
    border-left: 5px solid #0073aa;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.patient-info h3 {
    color: #0073aa;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: bold;
}

.patient-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.patient-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.patient-info-label {
    font-weight: bold;
    color: #2c3e50;
    min-width: 120px;
    font-size: 0.95rem;
}

.patient-info-value {
    color: #555;
    font-weight: 500;
}

/* Video Sections */
.clinical-video-section,
.clinical-library-section {
    margin: 30px 0;
}

.clinical-video-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.video-wrapper iframe {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.video-wrapper:hover iframe {
    transform: scale(1.02);
}

.video-error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* Library Videos Grid */
.clinical-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.library-video-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.library-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.library-video-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 115, 170, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.video-play-button:hover {
    background: rgba(0, 115, 170, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.video-info {
    padding: 20px;
}

.video-info h4 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.video-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: relative;
    background-color: transparent;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
    user-select: none;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.video-modal-close:hover {
    color: #fff;
    background: rgba(0,0,0,0.8);
}

.video-modal-body {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.video-modal-body iframe {
    width: 100%;
    height: 450px;
    border: none;
}

.video-modal-body h4 {
    padding: 20px;
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Gallery - Single Column 100% Width */
.clinical-gallery {
    display: grid;
    grid-template-columns: 1fr; /* Single column - 1 image per row */
    gap: 30px; /* Increased gap between images */
    margin: 25px 0;
}

.clinical-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    width: 100%; /* Full width */
}

.clinical-gallery-item:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

.clinical-gallery img {
    width: 100%; /* Full width */
    height: auto; /* Auto height to maintain aspect ratio */
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    /* max-height: 600px; Optional: prevent extremely tall images */
}

.clinical-gallery img:hover {
    transform: scale(1.02); /* Slightly less zoom for full-width images */
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .clinical-gallery {
        gap: 20px; /* Smaller gap on mobile */
        margin: 20px 0;
    }
    
    .clinical-gallery img {
        /* max-height: 400px; Smaller max height on mobile */
        border-radius: 8px; /* Smaller border radius on mobile */
    }
    
    .clinical-gallery-item {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .clinical-gallery {
        gap: 15px; /* Even smaller gap on very small screens */
        margin: 15px 0;
    }
    
    .clinical-gallery img {
        /* max-height: 300px; Even smaller on tiny screens */
        border-radius: 6px;
    }
    
    .clinical-gallery-item {
        border-radius: 6px;
    }
}

/* Alternative: Natural image size (no cropping) */
.clinical-gallery.natural-size img {
    object-fit: contain; /* Show full image without cropping */
    background: #f8f9fa; /* Light background for letterboxing */
    max-height: none; /* Remove height restriction */
}

/* Alternative: Fixed aspect ratio for consistency */
.clinical-gallery.fixed-ratio img {
    aspect-ratio: 16/9; /* Force 16:9 ratio */
    object-fit: cover;
    height: auto;
}

/* Description and Teeth Condition */
.clinical-description,
.clinical-teeth-condition {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #0073aa;
    line-height: 1.8;
}

.clinical-description p,
.clinical-teeth-condition p {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.05rem;
}

.clinical-description p:last-child,
.clinical-teeth-condition p:last-child {
    margin-bottom: 0;
}

.clinical-description ul,
.clinical-teeth-condition ul,
.clinical-description ol,
.clinical-teeth-condition ol {
    margin: 15px 0;
    padding-left: 30px;
}

.clinical-description li,
.clinical-teeth-condition li {
    margin-bottom: 8px;
    color: #555;
}

.clinical-description strong,
.clinical-teeth-condition strong {
    color: #2c3e50;
    font-weight: 600;
}

.clinical-description a,
.clinical-teeth-condition a {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
}

.clinical-description a:hover,
.clinical-teeth-condition a:hover {
    border-bottom: 1px solid #0073aa;
}

/* Content Text */
.clinical-content-text {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .clinical-main-container {
        max-width: 100%;
        padding: 30px 15px;
        gap: 30px;
    }
    
    .clinical-sidebar {
        width: 280px;
    }
    
    .clinical-library-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .clinical-main-container {
        flex-direction: column;
        padding: 20px 15px;
    }
    
    .clinical-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }
    
    .clinical-banner h1 {
        font-size: 2.5rem;
    }
    
    .clinical-content {
        padding: 25px;
    }
    
    .patient-info-grid {
        grid-template-columns: 1fr;
    }
    
    .clinical-library-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .clinical-banner {
        height: 300px;
    }
    
    .clinical-banner h1 {
        font-size: 2rem;
    }
    
    .clinical-banner .banner-subtitle {
        font-size: 1.1rem;
    }
    
    .clinical-content {
        padding: 20px;
    }
    
    .clinical-content h2 {
        font-size: 1.8rem;
    }
    
    .clinical-gallery {
        grid-template-columns: 1fr;
    }
    
    .clinical-gallery img {
        height: 200px;
    }
    
    .clinical-library-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .video-play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-icon {
        font-size: 20px;
    }
    
    .video-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 10px;
    }
    
    .video-modal-body iframe {
        height: 300px;
    }
    
    .video-modal-close {
        top: -35px;
        right: 5px;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .clinical-banner {
        height: 250px;
    }
    
    .clinical-banner h1 {
        font-size: 1.5rem;
    }
    
    .clinical-main-container {
        padding: 15px 10px;
    }
    
    .clinical-sidebar,
    .clinical-content {
        padding: 15px;
    }
    
    .clinical-library-grid {
        gap: 12px;
    }
    
    .video-thumbnail {
        height: 160px;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-info h4 {
        font-size: 1rem;
    }
    
    .video-modal-body iframe {
        height: 250px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clinical-content {
    animation: fadeInUp 0.6s ease-out;
}

.clinical-sidebar {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Loading State */
.clinical-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #666;
}

.clinical-loading::before {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lightbox Styles */
.clinical-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.clinical-lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    max-height: 80%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.clinical-lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
    user-select: none;
}

.clinical-lightbox-close:hover,
.clinical-lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* Gallery Item Click Effect */
.clinical-gallery img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clinical-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

/* Mobile Lightbox */
@media (max-width: 768px) {
    .clinical-lightbox-content {
        width: 95%;
        max-height: 70%;
    }
    
    .clinical-lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
} 