/**
 * XPND Theme - Custom Component Styles
 * Works alongside Bootstrap 5
 *
 * @package XPND
 * @since 1.0.0
 */

/* ==========================================================================
   Service Card
   ========================================================================== */

.service-card {
    height: 100%;
}

.service-card .card-body {
    text-align: center;
    padding: 2rem;
}

.service-card .icon-box {
    margin: 0 auto 1.5rem;
}

.service-card-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-top: 1rem;
}

.service-card-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.service-card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--xpnd-green);
    border-radius: 50%;
}

/* ==========================================================================
   Value Card
   ========================================================================== */

.value-card {
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.value-letter {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.value-letter.letter-x { color: var(--xpnd-blue); }
.value-letter.letter-p { color: #9E9E9E; }
.value-letter.letter-n { color: var(--xpnd-green-light); }
.value-letter.letter-d { color: var(--xpnd-green); }

/* ==========================================================================
   Team Card
   ========================================================================== */

.team-card {
    text-align: center;
}

.team-card .card-img-top {
    aspect-ratio: 4/5;
    object-fit: cover;
}

.team-card-role {
    color: var(--xpnd-green);
    font-weight: 500;
    font-size: 0.875rem;
}

/* ==========================================================================
   Career Card
   ========================================================================== */

.career-card {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.career-card:hover {
    border-color: var(--xpnd-green);
}

.career-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.career-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* ==========================================================================
   Location Card
   ========================================================================== */

.location-card {
    height: 100%;
}

.location-card.main-office {
    border: 2px solid var(--xpnd-green);
}

/* ==========================================================================
   Blog Card
   ========================================================================== */

.blog-card {
    height: 100%;
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.blog-card-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-card-link:hover {
    gap: 0.5rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
    background: linear-gradient(135deg, var(--xpnd-green) 0%, var(--xpnd-green-dark) 100%);
}

/* ==========================================================================
   Clients Section
   ========================================================================== */

.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.client-item {
    padding: 1rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.client-item:hover {
    opacity: 1;
}

.client-item img {
    max-height: 50px;
    width: auto;
}

/* Clients list badges */
.clients-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
}

.clients-list .badge {
    background: rgba(46, 125, 50, 0.1) !important;
    color: #333;
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
}

/* ==========================================================================
   Contact Info Card
   ========================================================================== */

.contact-info-card {
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.contact-info-card .icon-box {
    margin: 0 auto 1.5rem;
}

.contact-info-card h5 {
    margin-bottom: 0.5rem;
}

.contact-info-card p,
.contact-info-card a {
    color: #6c757d;
    margin-bottom: 0;
}

/* ==========================================================================
   Benefit Card
   ========================================================================== */

.benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.benefit-card .icon-box {
    flex-shrink: 0;
}

.benefit-card h5 {
    margin-bottom: 0.25rem;
}

.benefit-card p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

/* ==========================================================================
   Service Detail Section
   ========================================================================== */

.service-detail {
    padding: 4rem 0;
    border-bottom: 1px solid #e9ecef;
}

.service-detail:last-child {
    border-bottom: none;
}

.services-nav {
    position: sticky;
    top: 100px;
}

.services-nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #6c757d;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.services-nav-item:hover,
.services-nav-item.active {
    color: var(--xpnd-green);
    border-left-color: var(--xpnd-green);
    background: rgba(46, 125, 50, 0.05);
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.post-navigation {
    display: flex;
    justify-content: space-between;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin: 2rem 0;
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 45%;
}

.post-navigation .nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: #1a1a2e;
}

.post-navigation a:hover .nav-title {
    color: var(--xpnd-green);
}

/* ==========================================================================
   Author Box
   ========================================================================== */

.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 1rem;
    margin: 2rem 0;
}

.author-box .author-avatar {
    flex-shrink: 0;
}

.author-box .author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box .author-name {
    margin-bottom: 0.25rem;
}

.author-box .author-bio {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Share Buttons
   ========================================================================== */

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-buttons .share-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.share-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.3s ease;
}

.share-buttons a:hover {
    background: var(--xpnd-green);
    color: #fff;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */

.sidebar .widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.sidebar .widget-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--xpnd-green);
}

.sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.sidebar .widget li:last-child {
    border-bottom: none;
}

.sidebar .widget a {
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar .widget a:hover {
    color: var(--xpnd-green);
}

/* ==========================================================================
   Form Alert
   ========================================================================== */

.form-alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: none;
}

.form-alert.success {
    background: rgba(46, 125, 50, 0.1);
    border: 1px solid var(--xpnd-green);
    color: var(--xpnd-green-dark);
}

.form-alert.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #842029;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* ==========================================================================
   Archive Cards
   ========================================================================== */

.archive-card {
    margin-bottom: 1.5rem;
}

.archive-card .row {
    align-items: stretch;
}

.archive-card .card-img {
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    border-radius: 1rem 0 0 1rem;
}

@media (max-width: 767.98px) {
    .archive-card .card-img {
        border-radius: 1rem 1rem 0 0;
        min-height: 180px;
    }
}

/* ==========================================================================
   No Results
   ========================================================================== */

.no-results {
    text-align: center;
    padding: 4rem 1rem;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: #9e9e9e;
}

.no-results-icon svg {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 991.98px) {
    .services-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .services-nav-item {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 0.5rem 1rem;
    }

    .services-nav-item.active {
        border-left: none;
        border-bottom-color: var(--xpnd-green);
    }
}

@media (max-width: 767.98px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .post-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }

    .post-navigation a {
        max-width: 100%;
    }

    .benefit-card {
        flex-direction: column;
        text-align: center;
    }

    .benefit-card .icon-box {
        margin: 0 auto;
    }
}
