/* ============================================
   HERO SECTION FIX - Remove gap between header and hero
   The header is position:fixed, so Hero background starts at y=0.
   For the carousel, the background is full-viewport, no content padding needed.
   ============================================ */

/* Remove any margin from main container */
.homepage-template {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Hero section: no margin, starts at top of viewport */
.homepage-template .simple-hero {
    margin-top: 0 !important;
}

/* Remove any padding from site-content wrapper on homepage */
.site-content {
    padding-top: 0 !important;
}

#content {
    padding-top: 0 !important;
}

/* ============================================
   SERVICE SECTION STYLES
   ============================================ */
/* Services Section */
.services-section {
    padding: var(--spacing-xxxl) 0;
    background-color: var(--white);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    align-items: start;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-orange));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-color-rgb), 0.15);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(var(--primary-color-rgb), 0.06);
    line-height: 1;
    pointer-events: none;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: var(--accent-orange);
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.service-features {
    list-style: none;
    padding: 0.75rem;
    margin: 1rem 0 0 0;
    text-align: left;
    background: var(--light-gray);
    border-radius: var(--border-radius-sm);
}

.service-features li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.6rem;
    line-height: 1.5;
    padding-left: 1.8em;
    position: relative;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.service-features li:last-child {
    margin-bottom: 0;
}

.service-features li i {
    flex: 0 0 auto;
    margin-right: 0.5rem;
    margin-top: 0.15rem;
    font-size: 0.9em;
    color: var(--accent-orange);
    position: absolute;
    left: 0.5rem;
}


/* Technology Section */
.technology-section {
    padding: var(--spacing-xxxl) 0;
    background: linear-gradient(180deg, var(--light-gray) 0%, var(--white) 100%);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.tech-item {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--accent-orange-rgb), 0.2);
}

.tech-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-icon-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(var(--primary-color-rgb), 0.1);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.tech-item:hover .tech-icon-ring {
    border-color: rgba(var(--accent-orange-rgb), 0.3);
    transform: scale(1.15);
}

.tech-icon-wrap i {
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

.tech-item:hover .tech-icon-wrap i {
    color: var(--accent-orange);
    transform: scale(1.1);
}

.tech-title {
    font-size: 1.05rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
    font-weight: 700;
}

.tech-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Testimonials Section */
.testimonials-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--white);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--border-light);
}

.testimonial-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.testimonial-content::before,
.testimonial-content::after {
    content: '"';
    font-size: 3rem;
    color: var(--primary-light);
    opacity: 0.3;
    position: absolute;
}

.testimonial-content::before {
    top: -1rem;
    left: -0.5rem;
}

.testimonial-content::after {
    bottom: -2rem;
    right: -0.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-info h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.testimonial-info p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Blog Section */
.blog-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--light-gray);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: var(--spacing-lg);
}

.blog-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.blog-category {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.blog-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Newsletter Section */
.newsletter-section {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-sm);
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-form button {
    white-space: nowrap;
}

/* Industry Logos */
.industry-logos {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    align-items: center;
    justify-items: center;
}

.logo-item {
    opacity: 0.6;
    transition: opacity var(--transition-normal);
    filter: grayscale(100%);
}

.logo-item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.logo-item img {
    max-width: 100%;
    height: auto;
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Homepage Specific Responsive */
@media (max-width: 1199.98px) {
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991.98px) {
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767.98px) {
    .service-cards {
        grid-template-columns: 1fr;
    }
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .newsletter-form {
        flex-direction: column;
    }
    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .logos-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   COMPANY INTRO - TBEA .in_con02 style
   ============================================ */

.company-intro {
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(180deg, var(--light-gray) 0%, var(--white) 100%);
    position: relative;
    z-index: 2;
}

.company-intro-wrap {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Top: title + stats --- */

.ci-top {
    position: relative;
    text-align: center;
}

.ci-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px;
    position: relative;
    display: inline-block;
}

.ci-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-orange));
    border-radius: 2px;
    margin: 16px auto 0;
}

.ci-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 auto;
    line-height: 1.8;
    max-width: 680px;
}

.ci-top-stats {
    margin-top: 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.ci-top-stats dl {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 120px;
    padding: 28px 20px 24px;
    background: var(--white);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ci-top-stats dl::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ci-top-stats dl:hover::before {
    transform: scaleX(1);
}

.ci-top-stats dl:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.ci-top-stats dl:nth-child(1) { transition-delay: 0.2s; }
.ci-top-stats dl:nth-child(2) { transition-delay: 0.4s; }
.ci-top-stats dl:nth-child(3) { transition-delay: 0.6s; }
.ci-top-stats dl:nth-child(4) { transition-delay: 0.8s; }

.ci-top-stats dl.active {
    opacity: 1;
    transform: translateY(0);
}

.ci-top-stats dl.active:hover {
    transform: translateY(-3px);
}

.ci-top-stats dt {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

.ci-stat-num {
    display: inline;
}

.ci-top-stats dd {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* --- Bottom: image list + text overlay --- */

.ci-bottom {
    width: 1200px;
    max-width: 100%;
    margin: 10px auto 0;
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ci-img-list {
    display: flex;
    gap: 0;
}

.ci-img {
    flex: 1;
    overflow: hidden;
    height: 0;
    padding-bottom: 45%;
    position: relative;
}

.ci-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.ci-img-list .ci-img:not(.hover) {
    display: none;
}

.ci-img-list .ci-img.hover {
    display: block;
    flex: none;
    width: 100%;
    height: 0;
    padding-bottom: 45%;
}

.ci-img-list .ci-img.hover img {
    transform: scale(1.02);
}

/* Text overlay - absolute, covers full .ci-bottom, flex columns */

.ci-text-list {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    bottom: 0;
    display: flex;
    z-index: 2;
}

.ci-text {
    flex: 1;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    cursor: pointer;
    transition: background 0.4s ease-in-out;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
}

.ci-text:first-child {
    border-left: none;
}

.ci-text-con {
    position: absolute;
    left: 28px;
    bottom: 28px;
    right: 28px;
    z-index: 2;
    color: #fff;
}

.ci-text-con h4 {
    font-size: clamp(0.95rem, 1.3vw, 1.25rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin: 0 0 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ci-text-con p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    display: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ci-text.hover {
    background: rgba(0, 61, 130, 0.55);
}

.ci-text.hover .ci-text-con h4 {
    text-shadow: none;
}

.ci-text.hover .ci-text-con p {
    display: block;
    animation: ciFadeIn 0.3s ease forwards;
}

@keyframes ciFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */

@media (max-width: 1200px) {
    .ci-text-con p {
        font-size: 0.82rem;
    }
}

@media (max-width: 767px) {
    .company-intro {
        padding: var(--spacing-xl) 0;
    }

    .ci-top-stats dl {
        flex: 0 0 calc(50% - 10px);
        margin: 0;
    }

    .ci-bottom {
        margin-top: 40px;
        border-radius: var(--border-radius);
    }

    /* Mobile: text_list becomes static, each text is full-width card */
    .ci-text-list {
        position: static;
        flex-direction: column;
    }

    .ci-text {
        flex: 0 0 100%;
        height: 50vh;
        margin-bottom: 12px;
        border-left: none;
        border-radius: var(--border-radius);
        background: rgba(0, 0, 0, 0.25);
    }

    .ci-text:last-child {
        margin-bottom: 0;
    }

    /* Hide the separate image list on mobile */
    .ci-img-list {
        display: none;
    }

    /* Each text item shows its own image as background (set via JS data-bg) */
    .ci-text {
        background-size: cover;
        background-position: center;
    }

    .ci-text.con {
        background-blend-mode: multiply;
    }

    .ci-text-con {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .ci-text-con h4 {
        font-size: 1.1rem;
    }

    .ci-text-con p {
        display: block !important;
        font-size: 0.82rem;
    }
}

/* ============================================
   CLIENT LOGOS - Marquee-style logo track
   ============================================ */

.client-logos {
    padding: var(--spacing-xxl) 0;
    background: var(--white);
    overflow: hidden;
}

.client-logos .section-header {
    margin-bottom: var(--spacing-xl);
}

.logos-track-wrap {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    position: relative;
}

.logos-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.logos-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.logos-track .logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    margin: 0 12px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.logos-track .logo-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
    background: var(--white);
}

.logos-track .logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 0.02em;
    user-select: none;
}

.logos-track .logo-item:hover .logo-text {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .client-logos {
        padding: var(--spacing-xl) 0;
    }

    .logos-track .logo-item {
        padding: 12px 24px;
        margin: 0 8px;
    }

    .logos-track .logo-text {
        font-size: 0.95rem;
    }

    .logos-track {
        animation-duration: 20s;
    }
}

/* ============================================
   NEWSLETTER SECTION - Compact CTA band
   ============================================ */

.newsletter-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(var(--accent-orange-rgb), 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.newsletter-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.newsletter-text h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.newsletter-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 520px;
}

.newsletter-form input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.newsletter-form .btn {
    white-space: nowrap;
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-accent-orange {
    background: var(--accent-orange);
    color: var(--white);
    border: none;
}

.btn-accent-orange:hover {
    background: var(--accent-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-orange-rgb), 0.4);
}

.newsletter-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.newsletter-note i {
    font-size: 0.75rem;
}

@media (max-width: 575.98px) {
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form .btn {
        width: 100%;
    }
}
