/* --- PORTFOLIO ENGINE PLUGIN STYLES (portfolio.css) --- */

/* ===== Breadcrumb Bar ===== */
.breadcrumb-bar {
    background-color: var(--darker-bg);
    padding: 15px 0;
    border-bottom: 2px solid var(--brand-red);
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--brand-red);
}

.breadcrumb-item.active {
    color: #fff;
    font-weight: bold;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--light-text);
}


/* ===== Service Page Content & QuillJS Styling ===== */
.service-content {
    line-height: 1.8;
    font-size: 1rem; /* Reduced font size slightly for better fit in sidebar */
    color: var(--light-text);
}
.service-content h1,
.service-content h2,
.service-content h3,
.service-content h4 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.8em;
}
.service-content p {
    margin-bottom: 1.2em;
}
.service-content ul,
.service-content ol {
    padding-left: 25px;
    margin-bottom: 1.2em;
}
.service-content li {
    margin-bottom: 0.5em;
}
.service-content a {
    color: var(--brand-red);
    text-decoration: underline;
}
.service-content a:hover {
    color: #ff4757;
}
.service-content strong {
    color: #fff;
}
.service-content pre,
.service-content .ql-code-block-container {
    background-color: var(--darker-bg);
    border: 1px solid #555;
    border-radius: 5px;
    padding: 15px;
    color: #f8f8f2;
    font-family: monospace;
    white-space: pre-wrap;
    margin-bottom: 1.2em;
}

/* ===== Service Page Sidebar ===== */
.service-sidebar .sidebar-widget {
    background-color: var(--card-bg);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}
.service-sidebar .widget-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-red);
}
.service-sidebar p {
    color: var(--light-text);
    line-height: 1.6;
}
.service-sidebar .widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.service-sidebar .widget-list li {
    margin-bottom: 12px;
}
.service-sidebar .widget-list a {
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}
.service-sidebar .widget-list a::before {
    content: '\f105'; /* Font Awesome chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--brand-red);
    margin-right: 12px;
    transition: all 0.2s ease;
}
.service-sidebar .widget-list a:hover {
    color: #fff;
    transform: translateX(5px);
}
.service-sidebar .widget-list a:hover::before {
    color: #ff4757;
}


/* ===== Related Projects Section ===== */
.related-projects {
    background-color: var(--darker-bg);
}

.project-card-link {
    text-decoration: none;
}

/* --- INDIVIDUAL PROJECT PAGE STYLES --- */

/* Project Gallery */
.project-gallery-main {
    aspect-ratio: 3 / 2;
    background-color: var(--darker-bg);
    border: 1px solid #555;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Ensures image fits without stretching */
    border-radius: 4px; /* Slight radius for the image inside the frame */
}

.project-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.project-thumbnail-img {
    height: 90px;
    width: auto;
    max-width: 120px;
    object-fit: cover;
    border: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.project-thumbnail-img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.project-thumbnail-img.active {
    border-color: var(--brand-red);
    opacity: 1;
    box-shadow: 0 0 15px rgba(217, 35, 50, 0.5);
}

/* Project Details Sidebar */
.project-details-sidebar {
    background-color: var(--card-bg);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 30px;
}

.project-title {
    font-size: 1.8rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.project-short-desc {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 25px;
    line-height: 1.6;
}

.project-widget {
    margin-bottom: 25px;
}

.project-widget:last-child {
    margin-bottom: 0;
}

.project-widget .widget-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-red);
}

.project-widget .styled-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.project-widget .styled-list li {
    padding: 8px 0;
    border-bottom: 1px solid #4a4a4a;
}
.project-widget .styled-list li:last-child {
    border-bottom: none;
}

.project-widget .styled-list strong {
    color: #fff;
    margin-right: 10px;
}

/* Hierarchical Service List Styles */
.services-hierarchical-list a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.services-hierarchical-list a:hover {
    color: var(--brand-red);
    text-decoration: underline;
}

.services-hierarchical-list .separator {
    color: #888;
    margin: 0 8px;
    font-weight: bold;
}

/* --- [NEW] GALLERY TILE STYLES (PARENT SERVICE PAGE) --- */
.gallery-tile-link {
    text-decoration: none;
    display: block;
    width: 100%;
}

.gallery-tile {
    background-color: var(--card-bg);
    border: 2px solid #444;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.gallery-tile-link:hover .gallery-tile {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(217, 35, 50, 0.4);
    border-color: var(--brand-red);
}

.tile-image-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.tile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-body {
    padding: 20px;
    flex-grow: 1; /* Ensures body fills available space */
    display: flex;
    flex-direction: column;
}

.tile-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.tile-text {
    color: var(--light-text);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
    flex-grow: 1; /* Pushes title to the top */
}


/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .project-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 767.98px) {
    .project-details-sidebar {
        padding: 25px;
    }
    .tile-body {
        padding: 15px;
    }
    .tile-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 575.98px) {
    .project-thumbnail-img {
        height: 70px;
    }
}