/**
 * Service Posts Template Styles
 * Consistent design for all service pages
 */

/* =================================================================
   Underground Services Specific Styling
   ================================================================= */

.service-hero-title {
    text-transform: uppercase;
    letter-spacing: 3px !important;
    font-weight: 700 !important;
}

.vc_icon_separator {
    margin-bottom: 30px;
}

.vc_icon_separator .vc_sep_holder .vc_sep_line {
    border-color: var(--csd-yellow) !important;
}

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

/* Better spacing for content sections */
.service-content-block {
    padding: 40px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 30px;
}

/* =================================================================
   Service Post Hero Section
   ================================================================= */

.post.category-services .entry-content {
    margin: 0;
    padding: 0;
}

/* Hero Section with Gradient Overlay */
.service-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 60px;
    background: var(--csd-grey); /* Fallback color */
    background-size: cover !important;
    background-position: center !important;
}

/* Fix for vc_custom_CLASS placeholder */
.service-hero.vc_custom_CLASS {
    background-image: url('https://cands-drainage-contractors-2.local/wp-content/uploads/2025/06/services_drainage_1800_2000x500.png') !important;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.95) 0%,
        rgba(26, 26, 26, 0.7) 40%,
        rgba(26, 26, 26, 0.4) 70%,
        transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.service-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 20px;
    max-width: 1200px;
    width: 100%;
}

.service-hero h1 {
    color: #ffffff !important;
    font-size: 48px !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Yellow accent line under title */
.service-hero-divider {
    width: 120px;
    height: 4px;
    background: var(--csd-yellow);
    margin: 0 auto 30px;
    position: relative;
}

.service-hero-divider::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 4px 30px;
    border-color: transparent transparent transparent var(--csd-yellow);
}

/* Service description text */
.service-hero-description {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* =================================================================
   Service Content Sections
   ================================================================= */

.service-content-section {
    padding: 60px 0;
    position: relative;
}

.service-content-section:nth-child(even) {
    background: #f8f8f8;
}

/* Two Column Layout */
.service-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.service-content-text h2 {
    color: var(--csd-grey) !important;
    font-size: 36px !important;
    margin-bottom: 20px !important;
    position: relative;
    padding-left: 30px;
}

/* Yellow triangle accent for headings */
.service-content-text h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 20px;
    border-color: transparent transparent transparent var(--csd-yellow);
}

.service-content-text p {
    color: var(--csd-grey);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Feature List */
.service-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.service-features li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 15px;
    color: var(--csd-grey);
    font-size: 17px;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    background: var(--csd-yellow);
    color: var(--csd-grey);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* TheGem List Styling */
.gem-list-type-checkbox ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 20px 0 !important;
}

.gem-list-type-checkbox li {
    position: relative !important;
    padding-left: 40px !important;
    margin-bottom: 15px !important;
    color: var(--csd-grey) !important;
    font-size: 17px !important;
    line-height: 1.8 !important;
    display: block !important;
}

.gem-list-type-checkbox li:before {
    content: "✓" !important;
    position: absolute !important;
    left: 0 !important;
    top: 3px !important;
    width: 24px !important;
    height: 24px !important;
    background-color: var(--csd-yellow) !important;
    color: var(--csd-grey) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
}

/* Fix for gem-list color-3 specifically */
.gem-list.gem-list-color-3 ul {
    list-style: none !important;
    padding-left: 0 !important;
}

.gem-list.gem-list-color-3 li {
    position: relative !important;
    padding-left: 45px !important;
    margin-bottom: 16px !important;
    line-height: 1.8 !important;
    min-height: 28px !important;
}

.gem-list.gem-list-color-3 li:before {
    position: absolute !important;
    left: 0 !important;
    top: 2px !important;
    width: 26px !important;
    height: 26px !important;
    line-height: 26px !important;
    text-align: center !important;
    background-color: var(--csd-yellow) !important;
    color: var(--csd-grey) !important;
    border-radius: 50% !important;
    font-weight: bold !important;
    display: block !important;
}

/* =================================================================
   Service Image Gallery
   ================================================================= */

.service-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.service-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service-image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.service-image-item:hover img {
    transform: scale(1.05);
}

/* Image overlay with caption */
.service-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.9), transparent);
    color: #ffffff;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.service-image-item:hover .service-image-caption {
    transform: translateY(0);
}

/* =================================================================
   Service Info Cards
   ================================================================= */

.service-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.service-info-card {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--csd-yellow);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-info-card:hover::before {
    transform: scaleX(1);
}

.service-info-card:hover {
    border-color: var(--csd-yellow);
    box-shadow: 0 10px 30px rgba(242, 144, 28, 0.1);
    transform: translateY(-5px);
}

.service-info-card-icon {
    width: 60px;
    height: 60px;
    background: var(--csd-yellow);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--csd-grey);
}

.service-info-card h3 {
    color: var(--csd-grey) !important;
    font-size: 22px !important;
    margin-bottom: 15px !important;
}

.service-info-card p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

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

.service-cta {
    background: linear-gradient(135deg, var(--csd-grey) 0%, #2a2a2c 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

.service-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--csd-yellow);
    opacity: 0.05;
    border-radius: 50%;
}

.service-cta h2 {
    color: #ffffff !important;
    font-size: 42px !important;
    margin-bottom: 20px !important;
}

.service-cta p {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.service-cta .gem-button {
    background: var(--csd-yellow) !important;
    color: var(--csd-grey) !important;
    padding: 15px 40px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    display: inline-block;
}

.service-cta .gem-button:hover {
    background: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* =================================================================
   Service Sidebar (if using sidebar layout)
   ================================================================= */

.service-sidebar {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
}

.service-sidebar-widget {
    margin-bottom: 40px;
}

.service-sidebar-widget:last-child {
    margin-bottom: 0;
}

.service-sidebar-widget h3 {
    color: var(--csd-grey) !important;
    font-size: 24px !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--csd-yellow);
}

.service-sidebar-list {
    list-style: none;
    padding: 0;
}

.service-sidebar-list li {
    margin-bottom: 15px;
}

.service-sidebar-list a {
    color: var(--csd-grey);
    font-size: 17px;
    transition: all 0.3s ease;
    display: block;
    padding: 10px 15px;
    border-left: 3px solid transparent;
}

.service-sidebar-list a:hover,
.service-sidebar-list .current-service a {
    color: var(--csd-yellow);
    border-left-color: var(--csd-yellow);
    background: rgba(242, 144, 28, 0.05);
    padding-left: 25px;
}

/* =================================================================
   Mobile Responsive
   ================================================================= */

@media (max-width: 991px) {
    .service-two-column {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .service-hero h1 {
        font-size: 36px !important;
    }
    
    .service-content-text h2 {
        font-size: 28px !important;
    }
}

@media (max-width: 767px) {
    .service-hero {
        min-height: 300px;
    }
    
    .service-hero h1 {
        font-size: 28px !important;
        letter-spacing: 1px;
    }
    
    .service-hero-description {
        font-size: 17px;
    }
    
    .service-content-section {
        padding: 40px 0;
    }
    
    .service-image-grid {
        grid-template-columns: 1fr;
    }
    
    .service-info-cards {
        grid-template-columns: 1fr;
    }
    
    .service-cta {
        padding: 60px 20px;
    }
    
    .service-cta h2 {
        font-size: 28px !important;
    }
}

/* =================================================================
   Animation Classes
   ================================================================= */

.service-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.service-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.service-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.service-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.service-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}