/* ==========================================================================
   SERVICES PAGE CSS - CLEANED AND FIXED
   Fixed missing images and CSS warnings
   ========================================================================== */

/* ==========================================================================
   SERVICE HERO SECTION - FIXED
   ========================================================================== */

/* Services Title Section - Fixed missing image */
.services-title {
    padding: 120px 0 80px 0;
    text-align: center;
    /* FIXED: Changed to use existing servicebackground.jpg instead of missing servicelogo.jpg */
    background: url('../img/services/servicebackground.jpg') no-repeat center center/cover;
    position: relative;
    color: #ffffff;
}

.services-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    z-index: 1;
}

.services-title .container {
    position: relative;
    z-index: 2;
}

.services-title h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: rgba(27, 125, 119, 0.8);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.services-title p {
    font-size: 1.0rem;
    color: rgba(0, 0, 0, 0.8);
    opacity: 0.95;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Service Title Hero */
.service-title-hero {
    position: relative;
    padding: 0;
    background: url('../img/services/servicebackground.jpg') no-repeat center center/cover;
    text-align: center;
    color: white;
    height: 40vh;
    min-height: 350px;
    margin-top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: text;
    pointer-events: auto;
}

.service-title-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    user-select: text;
    pointer-events: auto;
    position: relative;
    z-index: 3;
    height: 100%;
    min-height: 350px;
}

.service-title-hero h2 {
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    user-select: text;
    pointer-events: auto;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.service-title-hero .services-subtitle {
    color: #f1f5f9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    text-align: center !important;
    user-select: text;
    pointer-events: auto;
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* ==========================================================================
   SERVICE SECTIONS LAYOUT - CLEANED
   ========================================================================== */

/* Service Sections */
.service-section {
    padding: 40px 0;
    display: flex;
    align-items: center;
    scroll-margin-top: 80px;
}

/* FIXED: Removed redundant commented styles and simplified */
/* Specific background colors for alternating service sections */
#itad,
#upcycling,
#data-destruction,
#testing,
#component-sales {
    background-color: #ffffff;
}

#disassembly,
#recycling,
#refining,
#global-solutions {
    background-color: #f8fafc;
}

/* Alternative background helper class */
.service-section.alt-bg {
    background-color: #f8fafc;
}

.service-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
}

/* Service Left Layout (Image Left, Text Right) */
.service-left .service-content {
    grid-template-areas: "image info";
}

.service-left .service-image {
    grid-area: image;
}

.service-left .service-info {
    grid-area: info;
}

/* Service Right Layout (Text Left, Image Right) */
.service-right .service-content {
    grid-template-areas: "info image";
}

.service-right .service-image {
    grid-area: image;
}

.service-right .service-info {
    grid-area: info;
}

/* ==========================================================================
   SERVICE CONTENT STYLING
   ========================================================================== */

/* Service Info Styling */
.service-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-info h2 {
    font-size: 2.0rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.service-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.service-info p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Service Features List */
.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    position: relative;
    padding: 0.8rem 0 0.8rem 2rem;
    font-size: 1rem;
    color: #666;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
}

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

.service-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.8rem;
    width: 1.2rem;
    height: 1.2rem;
    background: rgba(27, 125, 119, 1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.service-features li:hover {
    color: rgba(27, 125, 119, 1);
}

/* ==========================================================================
   SERVICE IMAGES
   ========================================================================== */

/* Service Image Styling */
.service-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: stretch;
}

.service-image img {
    width: 100%;
    height: auto;
    max-height: clamp(250px, 80vh, 500px);
    object-fit: cover;
    object-position: center;
    display: block;
}

/* FIXED: Simplified non-ITAD service images styling */
.service-section:not(#itad) .service-image {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    height: 320px;
    align-self: center;
}

.service-section:not(#itad) .service-image img {
    max-width: 450px;
    width: 100%;
    height: 320px;
    object-fit: cover;
}

/* Special cases for global-solutions and testing */
#global-solutions .service-image,
#testing .service-image {
    height: 240px;
}

#global-solutions .service-image img,
#testing .service-image img {
    height: 280px;
}

/* ITAD special styling */
#itad .service-image {
    display: flex;
    align-items: stretch;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

#itad .service-image img {
    max-height: none;
    height: 100%;
    width: 100%;
    object-fit: cover;
    flex: 1;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* ==========================================================================
   ITAD SPECIFIC CONTENT
   ========================================================================== */

#itad .service-info h2 {
    margin-bottom: 1.5rem;
    font-size: 2.0rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

/* ITAD intro paragraphs spacing */
.itad-intro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.itad-intro-grid p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.itad-details-toggles {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-toggle {
    background-color: transparent;
    color: rgba(33, 124, 118, 1);
    border: 2px solid rgba(33, 124, 118, 1);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    flex-grow: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 4px;
}

.btn-toggle:hover,
.btn-toggle.active {
    background-color: rgba(33, 124, 118, 1);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 124, 118, 0.4);
}

.btn-toggle i {
    margin-right: 0.75rem;
}

/* Service Page - Integrated ITAD Subsections */
.itad-subsection {
    padding-top: 3rem;
    margin-bottom: 2rem;
}

.subsection-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.subsection-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: rgba(33, 124, 118, 1);
    border-radius: 2px;
}

/* ==========================================================================
   DATA DESTRUCTION SPECIFIC STYLING
   ========================================================================== */

.destruction-intro {
    text-align: center;
    margin: 0 auto 3rem auto;
}

.destruction-intro h2 {
    font-size: 2.0rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.destruction-intro p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.destruction-method {
    margin-bottom: 2rem;
}

.destruction-method:last-child {
    margin-bottom: 0;
}

.destruction-method h3 {
    font-weight: normal;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.75rem;
}

#data-destruction .service-info {
    justify-content: center;
}

/* ==========================================================================
   PARTS SHOWCASE SECTION
   ========================================================================== */

.parts-showcase {
    padding: 60px 0;
    background: #f8fafc;
    overflow: hidden;
}

.parts-showcase h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.8rem;
    position: relative;
}

.parts-showcase h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, rgba(33, 124, 118, 1), rgba(45, 140, 135, 1));
    border-radius: 2px;
}

.parts-subtitle {
    text-align: center;
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.parts-slider-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.parts-slider {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 350px;
}

.parts-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
}

.parts-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.parts-slide:hover img {
    transform: scale(1.03);
}

.parts-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.5s ease;
}

.parts-slide:hover .parts-overlay,
.parts-slide.active .parts-overlay {
    transform: translateY(0);
    opacity: 1;
}

.parts-overlay h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #ffffff;
}

.parts-overlay p {
    font-size: 0.9rem;
    color: #e5e7eb;
    line-height: 1.5;
}

.parts-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.parts-nav:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.parts-prev {
    left: 20px;
}

.parts-next {
    right: 20px;
}

.parts-cta {
    text-align: center;
    margin-top: 2rem;
}

.parts-cta p {
    font-size: 1.1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 1rem;
}

.parts-cta .btn {
    font-size: 1rem;
    padding: 12px 28px;
    box-shadow: 0 6px 20px rgba(33, 124, 118, 0.25);
}

.parts-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 124, 118, 0.35);
}

/* ==========================================================================
   VIDEO SECTIONS
   ========================================================================== */

.video-intro-section {
    padding: 80px 0;
    background: #f8fafc;
    text-align: center;
}

.video-intro-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    position: relative;
}

.video-intro-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, rgba(33, 124, 118, 1), rgba(45, 140, 135, 1));
    border-radius: 2px;
}

.video-subtitle {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.video-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    filter: hue-rotate(160deg) saturate(1.1) brightness(0.95) contrast(1.0);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(33, 124, 118, 0.1), rgba(45, 140, 135, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    pointer-events: none;
}

.video-container:hover::before {
    opacity: 1;
}

.process-video-container {
    margin-top: 4rem;
    text-align: center;
}

.process-video-container h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
}

.process-video-container .video-container {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
}

.process-video-container .video-container video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    filter: hue-rotate(160deg) saturate(1.1) brightness(0.95) contrast(1.0);
}

.process-video-container .video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(33, 124, 118, 0.1), rgba(45, 140, 135, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    pointer-events: none;
}

.process-video-container .video-container:hover::before {
    opacity: 1;
}

/* ==========================================================================
   LIFECYCLE IMAGE SECTION
   ========================================================================== */

.lifecycle-image-section {
    padding: 4rem 0;
    background-color: #f9fafb;
}

.lifecycle-image-container {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.lifecycle-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.service-title-hero .animate-fade-in-up {
    animation: fadeInUpImmediate 0.8s ease 0.1s both;
    user-select: text !important;
    pointer-events: auto !important;
}

#itad .animate-fade-in-up {
    animation: fadeInUpImmediate 0.8s ease 0.1s both;
}

@keyframes fadeInUpImmediate {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .service-content {
        gap: 4rem;
    }
    
    .service-info h2 {
        font-size: 2.4rem;
    }
    
    .service-image img {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .services-title {
        padding: 80px 0 60px 0;
    }
    
    .services-title h1 {
        font-size: 2.5rem;
    }
    
    .services-title p {
        font-size: 1.1rem;
    }
    
    .service-title-hero {
        margin-top: 70px;
        background-attachment: scroll;
    }
    
    .service-title-hero h2 {
        font-size: 2.2rem;
    }
    
    .service-title-hero .services-subtitle {
        font-size: 1.1rem;
    }
    
    .service-section {
        padding: 30px 0;
    }
    
    .service-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-left .service-content,
    .service-right .service-content {
        grid-template-areas: 
            "image"
            "info";
    }
    
    .service-info {
        padding: 1rem;
    }
    
    .service-info h2 {
        font-size: 2rem;
        text-align: center;
        color: #333;
    }
    
    .service-info p {
        font-size: 1rem;
    }
    
    .service-image img {
        height: 100%;
    }
    
    .itad-intro-grid {
        grid-template-columns: 1fr;
    }
    
    .parts-showcase {
        padding: 40px 0;
    }
    
    .parts-showcase h2 {
        font-size: 1.8rem;
    }
    
    .parts-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .parts-slider {
        height: 280px;
    }
    
    .parts-overlay {
        padding: 1.5rem 1rem 1rem;
    }
    
    .parts-overlay h3 {
        font-size: 1.2rem;
    }
    
    .parts-overlay p {
        font-size: 0.8rem;
    }
    
    .parts-cta p {
        font-size: 1rem;
    }
    
    .video-intro-section {
        padding: 60px 0;
    }
    
    .video-intro-section h2 {
        font-size: 2rem;
    }
    
    .video-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .video-container {
        margin: 0 1rem;
        border-radius: 12px;
    }
    
    .video-container video {
        border-radius: 12px;
    }
    
    .process-video-container {
        margin-top: 3rem;
    }
    
    .process-video-container h3 {
        font-size: 1.5rem;
    }
    
    .process-video-container .video-container {
        margin: 0 1rem;
        border-radius: 12px;
    }
    
    .process-video-container .video-container video {
        border-radius: 12px;
    }
    
    .lifecycle-image-section {
        padding: 2rem 0;
    }
    
    .lifecycle-image {
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .services-title h1 {
        font-size: 2rem;
    }
    
    .services-title p {
        font-size: 1rem;
    }
    
    .service-title-hero h2 {
        font-size: 2rem;
    }
    
    .service-title-hero .services-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .service-section {
        padding: 20px 0;
    }
    
    .service-content {
        gap: 1.5rem;
    }
    
    .service-info h2 {
        font-size: 1.8rem;
        color: #333;
    }
    
    .service-info p {
        font-size: 0.95rem;
    }
    
    .service-image img {
        height: 100%;
    }
    
    .service-features li {
        padding: 0.6rem 0 0.6rem 1.8rem;
        font-size: 0.9rem;
    }
    
    .parts-showcase h2 {
        font-size: 1.6rem;
    }
    
    .parts-slider {
        height: 240px;
    }
    
    .parts-overlay {
        padding: 1rem 0.8rem 0.8rem;
    }
    
    .parts-overlay h3 {
        font-size: 1.1rem;
    }
    
    .parts-overlay p {
        font-size: 0.75rem;
    }
    
    .video-intro-section h2 {
        font-size: 1.8rem;
    }
    
    .video-subtitle {
        font-size: 1rem;
    }
}