/* Reusable Components */

/* Buttons */
.cta-button {
    display: inline-block;
    background-color: var(--golden-yellow);
    color: var(--charcoal);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

.cta-button:hover {
    background-color: var(--warm-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(232, 185, 35, 0.3);
}

.cta-button:focus-visible {
    outline: 3px solid var(--deep-green);
    outline-offset: 2px;
}

.secondary-button {
    background-color: transparent;
    border: 2px solid var(--deep-green);
    color: var(--deep-green);
}

.secondary-button:hover {
    background-color: var(--deep-green);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(43, 93, 79, 0.3);
}

.secondary-button:focus-visible {
    outline: 3px solid var(--golden-yellow);
    outline-offset: 2px;
}

/* Benefit Cards */
.benefit-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(43, 93, 79, 0.12);
}

.benefit-card:hover::before {
    transform: scaleY(1);
}

.benefit-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.benefit-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0;
    line-height: 1.3;
}

.benefit-card p {
    color: var(--dark-grey);
    font-size: 1rem;
    line-height: 1.7;
}

/* Solution Items */
.solution-item {
    background: var(--off-white);
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.solution-item:hover {
    background: var(--white);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.solution-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.solution-item h4 {
    font-size: 1.3rem;
    color: var(--deep-green);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.solution-item p {
    font-size: 1rem;
    color: var(--dark-grey);
    line-height: 1.6;
}

/* Service Cards */
.service-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(232, 185, 35, 0.1) 0%, transparent 70%);
    transform: translate(50%, -50%);
}

/* Corner accent for service cards */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(43, 93, 79, 0.05) 0%, transparent 100%);
    border-radius: 0 60px 0 0;
}

.service-card.primary {
    border-top: 4px solid var(--golden-yellow);
}

.service-card.secondary {
    border-top: 4px solid var(--deep-green);
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--deep-green);
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

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

.service-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.service-card ul {
    list-style: none;
    margin: 1.5rem 0;
}

.service-card ul li {
    padding-left: 2rem;
    margin-bottom: 1rem;
    position: relative;
    font-size: 1.05rem;
}

.service-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--golden-yellow);
    font-weight: 700;
    font-size: 1.3rem;
}

/* Contact Cards */
.contact-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--deep-green);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.contact-card h3 {
    color: var(--deep-green);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-card p {
    margin: 0.5rem 0;
    font-size: 1.05rem;
}

.contact-card p.contact-subtitle {
    font-size: 0.9rem;
    color: var(--dark-grey);
}

.contact-card a {
    color: var(--forest-green);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
    display: inline-block;
}

.contact-card a:hover {
    color: var(--golden-yellow);
}

.contact-card a:focus-visible {
    outline: 2px solid var(--deep-green);
    outline-offset: 2px;
    border-radius: 2px;
}

.contact-highlight {
    border: 2px solid var(--golden-yellow);
}

/* Testimonial */
.testimonial {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 8rem;
    color: var(--golden-yellow);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial blockquote {
    font-size: 1.2rem;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--dark-grey);
    position: relative;
    z-index: 1;
}

.testimonial cite {
    display: block;
    text-align: right;
    font-weight: 700;
    color: var(--deep-green);
    font-style: normal;
}

/* Testimonial Quote - Distinct style for testimonials */
.testimonial-quote {
    background: linear-gradient(135deg, rgba(43, 93, 79, 0.03) 0%, rgba(232, 185, 35, 0.05) 100%);
    padding: 2.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--golden-yellow);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 6rem;
    color: var(--deep-green);
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-quote blockquote {
    font-size: 1.15rem;
    line-height: 1.8;
    font-style: italic;
    margin: 0 0 1.5rem 0;
    color: var(--dark-grey);
    position: relative;
    z-index: 1;
    padding-left: 1.5rem;
}

.testimonial-quote cite {
    display: block;
    text-align: right;
    font-weight: 700;
    color: var(--deep-green);
    font-style: normal;
    font-size: 1.05rem;
    padding-right: 1rem;
}

/* Problem Statement */
.problem-statement {
    background: linear-gradient(to right, var(--off-white) 0%, var(--white) 100%);
    padding: 3rem;
    border-radius: 8px;
    border-left: 5px solid var(--deep-green);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.problem-statement::after {
    content: '!';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    font-weight: 700;
    color: var(--deep-green);
    opacity: 0.03;
}

.problem-statement h3 {
    color: var(--deep-green);
    margin-bottom: 1.5rem;
}

.problem-statement p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Investment Box */
.investment-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Decorative corners for investment box */
.investment-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 80px;
    height: 80px;
    border-top: 3px solid rgba(232, 185, 35, 0.3);
    border-left: 3px solid rgba(232, 185, 35, 0.3);
    border-radius: 8px 0 0 0;
}

.investment-box::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 80px;
    height: 80px;
    border-bottom: 3px solid rgba(232, 185, 35, 0.3);
    border-right: 3px solid rgba(232, 185, 35, 0.3);
    border-radius: 0 0 8px 0;
}

.investment-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--warm-gold);
    text-align: center;
}

.investment-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.investment-arrow {
    color: var(--golden-yellow);
    font-size: 1.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.investment-item p {
    font-size: 1.1rem;
    line-height: 1.7;
    flex: 1;
}

.investment-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--golden-yellow);
}

/* Team Highlight */
.team-highlight {
    background: var(--off-white);
    padding: 2.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: left;
    border-top: 3px solid var(--golden-yellow);
}

/* Team Member Cards (for About page) */
.team-member {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.team-member-featured {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    border: 3px solid var(--golden-yellow);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    position: relative;
}

.team-member-featured::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, var(--golden-yellow) 0%, var(--deep-green) 100%);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.15;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--golden-yellow);
}

.team-member h3 {
    color: var(--deep-green);
    margin-bottom: 0.5rem;
}

.team-member .role {
    color: var(--forest-green);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.team-member .bio {
    color: var(--dark-grey);
    line-height: 1.6;
}

/* Case Study Cards */
.case-study-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--golden-yellow);
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.case-study-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.case-study-card h3 {
    color: var(--deep-green);
    margin-bottom: 0.5rem;
}

.case-study-card .industry {
    color: var(--forest-green);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.case-study-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.case-study-card blockquote {
    font-style: italic;
    color: var(--dark-grey);
    border-left: 3px solid var(--golden-yellow);
    padding-left: 1rem;
    margin: 1.5rem 0;
}

.case-study-card cite {
    display: block;
    text-align: right;
    font-weight: 700;
    color: var(--deep-green);
    font-style: normal;
    font-size: 0.95rem;
}

/* Blog Post Cards */
.blog-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--off-white) 0%, var(--light-grey) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-image.no-image {
    background: linear-gradient(135deg, var(--deep-green) 0%, var(--forest-green) 100%);
}

.blog-card-image.no-image::after {
    content: '';
    width: 40px;
    height: 40px;
    background-image: url("../images/favicon.png");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--forest-green);
}

.blog-card-meta time {
    font-weight: 600;
}

.blog-card-category {
    background: var(--golden-yellow);
    color: var(--charcoal);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card h3 {
    color: var(--deep-green);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.blog-card h3 a {
    color: var(--deep-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card h3 a:hover {
    color: var(--forest-green);
    text-decoration: underline;
}

.blog-card-excerpt {
    color: var(--dark-grey);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Cup Recycling Project Images */
.cup-project-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 1.5rem 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem;
    background: linear-gradient(to bottom, var(--off-white) 0%, var(--white) 100%);
    border-radius: 8px;
    position: relative;
}

.cup-project-images::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    border: 2px solid var(--golden-yellow);
    opacity: 0.2;
    pointer-events: none;
}

.cup-project-image-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.cup-project-image-container::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: calc(100% - 8px);
    background: var(--golden-yellow);
    opacity: 0.15;
    border-radius: 6px;
    z-index: 0;
    pointer-events: none;
}

.cup-project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--light-grey);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.cup-project-image-container img:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--dark-grey);
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

/* Client Logo Carousel */
.clients-section {
    padding: 4rem 0;
    overflow: hidden;
}

/* CSS Variables for carousel configuration */
:root {
    --carousel-height: 90px;
    --carousel-gap: 3rem;
    --carousel-speed: 60s;
}

/* Wrapper to contain overflow and add fade edges */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

/* Gradient fade on edges for seamless look */
.carousel-wrapper::before,
.carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--off-white), transparent);
}

.carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--off-white), transparent);
}

/* Track containing all logo items */
.carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    width: max-content;
    will-change: transform;
    /* Animation starts only after .carousel-active class is added */
}

.carousel-track.carousel-active {
    animation: scroll var(--carousel-speed) linear infinite;
}

/* Pause animation on hover */
.carousel-track.carousel-active:hover {
    animation-play-state: paused;
}

/* Individual logo container */
.carousel-item {
    flex-shrink: 0;
    height: var(--carousel-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Logo image styling */
.carousel-item img {
    height: 100%;
    max-height: var(--carousel-height);
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* Smooth infinite scroll animation.
   Uses a pixel-based custom property set by JS instead of translateX(-50%),
   which Safari miscalculates on max-content elements. */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(var(--scroll-distance, -50%));
    }
}

/* Partnership Highlight Box (inside service card) */
.partnership-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fdf6e3;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border-left: 3px solid #5b428c;
    margin-top: 1.5rem;
}

.partnership-highlight-logo {
    flex-shrink: 0;
}

.partnership-highlight-logo a {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.partnership-highlight-logo a:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.partnership-highlight-logo a:focus-visible {
    outline: 2px solid var(--deep-green);
    outline-offset: 2px;
    border-radius: 4px;
}

.partnership-highlight-logo img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 4px;
}

.partnership-highlight-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 65px;
}

.partnership-highlight-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--dark-grey);
    margin: 0 0 0.5rem 0;
}

.partnership-highlight-content a {
    color: var(--deep-green);
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.partnership-highlight-content a:hover {
    color: var(--forest-green);
}

.partnership-highlight-content p.partnership-highlight-tagline {
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 400;
    color: #5b428c;
    margin: 0;
}

.partnership-highlight-content p.partnership-highlight-tagline::before {
    content: '"';
}

.partnership-highlight-content p.partnership-highlight-tagline::after {
    content: '"';
}

/* Responsive adjustments for partnership highlight */
@media (max-width: 600px) {
    .partnership-highlight {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .partnership-highlight-content {
        min-height: auto;
    }

    .partnership-highlight-tagline {
        margin-left: auto;
        margin-right: auto;
    }
}