:root {
    /* We will use CSS variables to easily theme the proposal for different clients later */
    --proposal-accent: #ff1a1a;
}

body.page-template-page-proposal {
    background-color: #0a0a0a;
    color: #f8f9fa;
}

.proposal-section {
    padding: 80px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #fff;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: var(--proposal-accent);
    border-radius: 2px;
}

.section-number {
    font-size: 1rem;
    color: var(--proposal-accent);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.proposal-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to top, #0a0a0a 10%, rgba(10,10,10,0.85) 50%, rgba(10,10,10,0.6) 100%), url('../proposal-bg.png') center/cover no-repeat;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 26, 26, 0.2) 0%, rgba(10, 10, 10, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.toc-list a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 1rem;
}

.toc-list a:hover {
    color: #fff;
}

.card-custom {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 26, 26, 0.3);
}

.card-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 4rem;
    opacity: 0.5;
    transition: all 0.4s ease;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #222;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    z-index: 2;
}

.timeline-item.active::before {
    background-color: var(--proposal-accent);
    border-color: var(--proposal-accent);
    box-shadow: 0 0 15px var(--proposal-accent);
}

.timeline-line-bg {
    position: absolute;
    left: 9px;
    top: 30px;
    bottom: -4.5rem;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.timeline-line-fill {
    position: absolute;
    left: 9px;
    top: 30px;
    width: 2px;
    height: 0%;
    background-color: var(--proposal-accent);
    z-index: 1;
    box-shadow: 0 0 10px var(--proposal-accent);
}

.timeline-item:last-child .timeline-line-bg,
.timeline-item:last-child .timeline-line-fill {
    display: none;
}

.text-accent {
    color: var(--proposal-accent) !important;
}

/* Mobile Stacking Cards for Project Objectives */
@media (max-width: 767.98px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    #project-objectives .col-md-6 {
        position: sticky;
    }
    #project-objectives .col-md-6:nth-child(1) { top: 100px; z-index: 10; }
    #project-objectives .col-md-6:nth-child(2) { top: 120px; z-index: 11; }
    #project-objectives .col-md-6:nth-child(3) { top: 140px; z-index: 12; }
    #project-objectives .col-md-6:nth-child(4) { top: 160px; z-index: 13; }
    
    #project-objectives .card-custom {
        box-shadow: 0 -15px 30px rgba(0,0,0,0.8);
        background-color: #141414; /* Solid background to prevent text overlap */
    }
}

/* Mobile Stacking Cards for Next Steps */
@media (max-width: 767.98px) {
    #next-steps .col-md-4 {
        position: sticky;
    }
    #next-steps .col-md-4:nth-child(1) { top: 100px; z-index: 10; }
    #next-steps .col-md-4:nth-child(2) { top: 120px; z-index: 11; }
    #next-steps .col-md-4:nth-child(3) { top: 140px; z-index: 12; }
    
    #next-steps .card-custom {
        box-shadow: 0 -15px 30px rgba(0,0,0,0.8);
        background-color: #141414;
    }
}

/* 3D Reveal for Custom Offer */
.offer-3d-reveal {
    opacity: 0.8;
    transform-origin: center top;
    transform: perspective(1200px) rotateX(60deg) translateY(50px);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.offer-3d-reveal.active {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) translateY(0);
}

/* Infinite Portfolio Carousel */
.portfolio-carousel-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    padding: 3rem 0 1rem;
}

.portfolio-carousel-track {
    display: flex;
    width: max-content;
    animation: scroll-left 45s linear infinite;
}

.portfolio-carousel-track:hover {
    animation-play-state: paused;
}

.portfolio-carousel-slide {
    display: flex;
    gap: 1.5rem;
    padding-right: 1.5rem;
}

.portfolio-img {
    height: 450px;
    width: 260px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.portfolio-img:hover {
    transform: scale(1.03) translateY(-5px);
    border-color: rgba(255, 26, 26, 0.4);
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
