/**
 * Project Content Styling
 * 
 * Enhanced styles for project single pages
 * 
 * @package Anambas
 */

/* Project text content styling */
.project-text-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Tabs styling */
.project-tabs {
    width: 100%;
}

.tabs-nav {
    position: relative;
}

.tabs-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tab-button {
    cursor: pointer;
    border: none;
    background: none;
    position: relative;
}

.tab-button:focus {
    outline: 2px solid #2983B9;
    outline-offset: 2px;
}

.tab-button:hover {
    background-color: #f9fafb;
}

.tab-panel {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-panel .prose {
    color: #374151;
}

.tab-panel .prose p:last-child {
    margin-bottom: 0;
}

.tab-panel .prose a {
    color: #2983B9;
    text-decoration: none;
    transition: color 0.2s;
}

.tab-panel .prose a:hover {
    color: #184B77;
    text-decoration: underline;
}

/* Center aligned links in tabs */
.tab-panel div[style*="text-align: center"] {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.tab-panel div[style*="text-align: center"] a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #2983B9;
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}

.tab-panel div[style*="text-align: center"] a:hover {
    background-color: #184B77;
}

/* Accordion/Toggle styling */
.project-accordion {
    width: 100%;
}

.accordion-item {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.accordion-header {
    cursor: pointer;
    user-select: none;
}

.accordion-header:focus {
    outline: 2px solid #2983B9;
    outline-offset: -2px;
}

.accordion-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content:not(.hidden) {
    max-height: none;
}

.accordion-content .prose {
    color: #374151;
}

.accordion-content .prose p:last-child {
    margin-bottom: 0;
}

.accordion-content .prose em,
.accordion-content .prose i {
    font-style: italic;
    color: #6b7280;
}

.project-text-content h2 strong {
    font-weight: 700;
}

.project-text-content h2 span {
    display: inline-block;
}

/* Preserve inline color styles from CMSMasters */
.project-text-content h2 span[style*="color"] {
    color: inherit !important;
}

.project-text-content p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
    color: #374151;
}

.project-text-content p:last-child {
    margin-bottom: 0;
}

/* Gallery grid responsive improvements */
.project-gallery,
.wp-gallery,
.anambas-gallery,
.anambas-gutenberg-gallery {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.project-gallery img,
.wp-gallery img,
.anambas-gallery img,
.anambas-gutenberg-gallery img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-gallery .gallery-item:hover img,
.wp-gallery .gallery-item:hover img,
.anambas-gallery .gallery-item:hover img,
.anambas-gutenberg-gallery .gallery-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* WordPress native gallery specific styles */
.wp-gallery .gallery-item,
.anambas-gutenberg-gallery .gallery-item {
    border-radius: 0.5rem;
    overflow: hidden;
}

.wp-gallery .gallery-caption,
.anambas-gutenberg-gallery .gallery-caption {
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.5rem;
}

/* Project row sections */
.project-row {
    position: relative;
}

.project-row:first-of-type {
    padding-top: 3rem;
}

/* Lightbox custom styling */
#project-gallery-lightbox {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#lightbox-image {
    animation: zoomIn 0.3s ease-in-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Thumbnail strip */
#lightbox-thumbnails {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1.5rem 1rem;
}

#thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

#thumbnail-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#thumbnail-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

#thumbnail-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-text-content h2 {
        font-size: 1.5rem;
    }
    
    /* Tabs mobile styling */
    .tab-button {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .tabs-nav ul {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabs-nav li {
        display: inline-block;
    }
    
    /* Gallery lightbox mobile */
    #lightbox-prev,
    #lightbox-next {
        padding: 0.5rem;
    }
    
    #lightbox-prev svg,
    #lightbox-next svg {
        width: 2rem;
        height: 2rem;
    }
    
    #lightbox-thumbnails {
        display: none; /* Hide thumbnails on mobile for cleaner view */
    }
}

/* Print styles for projects */
@media print {
    .project-gallery,
    .social-share,
    .related-projects,
    .project-navigation,
    #project-gallery-lightbox {
        display: none !important;
    }
    
    .project-text-content {
        color: #000;
    }
    
    .project-text-content h2 {
        color: #000;
        page-break-after: avoid;
    }
    
    .project-text-content p {
        orphans: 3;
        widows: 3;
    }
}
