/**
 * Enhanced Contrast & Visual Improvements
 * ATRAHI Design Theme
 * Better contrast, alternating backgrounds, visual hierarchy
 */

/* ===== GLOBAL SECTION IMPROVEMENTS ===== */
section.section {
    position: relative;
    padding: 5rem 0;
}

@media (min-width: 1024px) {
    section.section {
        padding: 6rem 0;
    }
}

/* Alternating section backgrounds for contrast */
.pain-points {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.solutions {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.services {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.process {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.portfolio {
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
}

.pricing {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.faq {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.contact {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* ===== IMPROVED SECTION HEADERS ===== */
.section-header {
    margin-bottom: 4rem;
    position: relative;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.12), rgba(185, 157, 99, 0.05));
    border: 1px solid rgba(185, 157, 99, 0.25);
    border-radius: 50px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.section-badge:hover {
    transform: translateY(-2px);
    border-color: rgba(185, 157, 99, 0.4);
}

.section-badge-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #b99d63;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.solutions .section-title,
.portfolio .section-title,
.contact .section-title {
    color: #ffffff;
}

.section-title .text-gold,
.section-title span {
    background: linear-gradient(135deg, #b99d63 0%, #d4b87a 50%, #b99d63 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

.section-desc {
    font-size: 1.0625rem;
    color: #6b7280;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.75;
}

.solutions .section-desc,
.portfolio .section-desc,
.contact .section-desc {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== ENHANCED PAIN POINTS CARDS ===== */
.pain-point-card {
    background: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.pain-point-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444 0%, #f87171 50%, #ef4444 100%);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.pain-point-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 20px 40px rgba(239, 68, 68, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

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

.pain-point-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    margin: 0 auto 1.25rem;
    transition: all 0.4s ease;
    position: relative;
}

.pain-point-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 1.125rem;
    border: 2px dashed rgba(239, 68, 68, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pain-point-card:hover .pain-point-icon {
    transform: scale(1.1) rotate(-5deg);
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
}

.pain-point-card:hover .pain-point-icon::after {
    opacity: 1;
    transform: rotate(90deg);
}

.pain-point-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.625rem;
}

.pain-point-desc {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.65;
}

/* ===== ENHANCED SOLUTION CARDS ===== */
.solution-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.solution-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(185, 157, 99, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.solution-card:hover {
    transform: translateY(-12px);
    border-color: rgba(185, 157, 99, 0.3);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(185, 157, 99, 0.1);
}

.solution-card:hover::before,
.solution-card:hover::after {
    opacity: 1;
}

.solution-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.2), rgba(185, 157, 99, 0.08));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b99d63;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.solution-card:hover .solution-icon {
    background: linear-gradient(135deg, #b99d63, #9a8352);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(185, 157, 99, 0.4);
}

.solution-card:hover .solution-icon svg {
    color: #ffffff;
}

.solution-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.solution-desc {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ===== ENHANCED SERVICE CARDS ===== */
a.service-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.service-card {
    background: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(185, 157, 99, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.12),
        0 0 40px rgba(185, 157, 99, 0.08);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-card-image img {
    transform: scale(1.1);
}

.service-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover .service-card-image::after {
    opacity: 1;
}

.service-card-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 3.25rem;
    height: 3.25rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    z-index: 2;
}

.service-card:hover .service-card-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(185, 157, 99, 0.3);
}

.service-card-content {
    padding: 1.75rem;
}

.service-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.service-card:hover .service-card-title {
    color: #b99d63;
}

.service-card-desc {
    font-size: 0.9375rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-card-bullets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.service-card-bullet {
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.1), rgba(185, 157, 99, 0.05));
    border: 1px solid rgba(185, 157, 99, 0.15);
    border-radius: 50px;
    color: #9a8352;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-card:hover .service-card-bullet {
    background: linear-gradient(135deg, #b99d63, #9a8352);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #b99d63;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-card-link {
    gap: 0.875rem;
    color: #8b7a4a;
}

/* ===== ENHANCED PORTFOLIO CARDS ===== */
.portfolio-card {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover img {
    transform: scale(1.15);
}

.portfolio-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.1) 100%
    );
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
}

.portfolio-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: #fff;
    transform: translateY(15px);
    opacity: 0.85;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .portfolio-card-content {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-card-category {
    display: inline-block;
    font-size: 0.7rem;
    color: #fff;
    background: linear-gradient(135deg, #b99d63, #9a8352);
    padding: 0.3rem 0.875rem;
    border-radius: 50px;
    margin-bottom: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.portfolio-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portfolio-card-meta {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.5rem;
}

/* ===== ENHANCED PRICING CARDS ===== */
.pricing-card {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.pricing-card.featured {
    border-color: #b99d63;
    transform: scale(1.03);
    box-shadow: 0 20px 50px rgba(185, 157, 99, 0.15);
}

.pricing-card.featured::before {
    content: 'Phổ biến nhất';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #b99d63, #9a8352);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(185, 157, 99, 0.4);
}

.pricing-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.pricing-card.featured:hover {
    transform: scale(1.03) translateY(-12px);
}

/* ===== ENHANCED PROCESS STEPS ===== */
.process-step {
    position: relative;
    text-align: center;
    padding: 2.5rem 1.5rem 2rem;
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.process-step::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.375rem;
    background: linear-gradient(135deg, #b99d63, #d4c49a, #b99d63);
    background-size: 200% 200%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    animation: gradientShift 3s ease infinite paused;
}

.process-step:hover {
    transform: translateY(-10px);
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(185, 157, 99, 0.15);
}

.process-step:hover::before {
    opacity: 1;
    animation-play-state: running;
}

.process-step-number {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #b99d63, #9a8352);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(185, 157, 99, 0.4);
    transition: all 0.3s ease;
}

.process-step:hover .process-step-number {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(185, 157, 99, 0.5);
}

.process-step-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.12), rgba(185, 157, 99, 0.06));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b99d63;
    margin: 0.5rem auto 1rem;
    transition: all 0.4s ease;
}

.process-step:hover .process-step-icon {
    background: linear-gradient(135deg, #b99d63, #9a8352);
    color: #ffffff;
    transform: scale(1.1);
}

/* ===== FAQ ENHANCEMENTS ===== */
.faq-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.faq-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(185, 157, 99, 0.2);
}

.faq-item.active {
    border-color: #b99d63;
    box-shadow: 0 10px 30px rgba(185, 157, 99, 0.12);
}

/* ===== CONTACT SECTION ENHANCEMENTS ===== */
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 10% 20%, rgba(185, 157, 99, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(185, 157, 99, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.contact-info-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(185, 157, 99, 0.3);
    transform: translateX(8px);
}

.contact-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.contact-form:hover {
    border-color: rgba(185, 157, 99, 0.2);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: #b99d63;
    background: rgba(185, 157, 99, 0.08);
    box-shadow: 0 0 20px rgba(185, 157, 99, 0.15);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
