/*
 * Homepage Specific CSS
 * Styles for Hero, Services, How It Works, Coverage, and FAQ sections.
 */

/* =========================================
   GENERAL SECTION PADDING & HEADERS
========================================= */
.ccw-section {
    padding: 5rem 0;
}

.ccw-section-header {
    margin-bottom: 3rem;
}

.ccw-subtitle {
    display: inline-block;
    color: var(--ccw-primary);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.ccw-title {
    font-size: 2.75rem;
    color: var(--ccw-text-dark);
    margin-bottom: 1rem;
    font-weight: 800;
}

.ccw-desc {
    color: var(--ccw-text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   ANIMATIONS & EFFECTS (NEW)
========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.ccw-animate-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.ccw-delay-1 { animation-delay: 0.2s; }
.ccw-delay-2 { animation-delay: 0.4s; }

.ccw-fade-in {
    animation: fadeInUp 1s ease forwards;
}

/* =========================================
   HERO SLIDER
========================================= */
.ccw-hero-slider {
    position: relative;
    overflow: hidden;
    background-color: var(--ccw-very-light);
}

.ccw-slider-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px); /* Subtract header height */
    min-height: 550px;
    max-height: 850px;
}

.ccw-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.ccw-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
}

.ccw-slide.active {
    opacity: 1;
    z-index: 2 !important;
}

.ccw-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden; /* For Ken Burns */
}

.ccw-slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1); /* Initial state for animation */
    transition: transform 6s ease;
}

/* Apply Ken Burns ONLY to active slide */
.ccw-slide.active .ccw-slide-bg img {
    animation: kenBurns 12s ease-out forwards;
}

.ccw-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.1) 100%);
    z-index: -1;
}

html[dir="rtl"] .ccw-slide-overlay {
    background: linear-gradient(270deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.1) 100%);
}

.ccw-slide-content {
    color: var(--ccw-white);
    max-width: 650px;
    padding: 0 1.5rem;
}

.ccw-slide-title {
    color: var(--ccw-white);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 6px rgba(15, 23, 42, 0.5);
    font-weight: 800;
}

.ccw-slide-desc {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
    line-height: 1.6;
}

.ccw-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--ccw-white);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.ccw-slider-nav:hover {
    background: var(--ccw-white);
    color: var(--ccw-text-dark);
}

.ccw-prev { left: 30px; }
.ccw-next { right: 30px; }

html[dir="rtl"] .ccw-prev { left: auto; right: 30px; transform: translateY(-50%) rotate(180deg); }
html[dir="rtl"] .ccw-next { right: auto; left: 30px; transform: translateY(-50%) rotate(180deg); }

.ccw-slider-dots {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

.ccw-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.ccw-dot.active {
    background: var(--ccw-white);
    transform: scale(1.3);
}

/* =========================================
   SERVICES
========================================= */
.ccw-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.ccw-service-card {
    background: var(--ccw-white);
    border-radius: var(--ccw-radius-xl);
    overflow: hidden;
    box-shadow: var(--ccw-shadow-sm);
    border: 1px solid var(--ccw-border);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ccw-service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ccw-shadow-lg);
}

.ccw-service-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.ccw-service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ccw-service-card:hover .ccw-service-img img {
    transform: scale(1.08);
}

.ccw-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ccw-light) 0%, var(--ccw-sky) 100%);
}

.ccw-service-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ccw-service-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--ccw-text-dark);
    font-weight: 700;
}

.ccw-service-excerpt {
    color: var(--ccw-text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.ccw-service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ccw-border);
}

.ccw-service-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ccw-primary);
}

/* =========================================
   HOW IT WORKS
========================================= */
.ccw-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.ccw-step-card {
    background: var(--ccw-white);
    padding: 2.5rem 2rem;
    border-radius: var(--ccw-radius-xl);
    text-align: center;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
    border: 1px solid var(--ccw-border);
    transition: all 0.3s ease;
}

.ccw-step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.ccw-step-icon {
    width: 70px;
    height: 70px;
    background: var(--ccw-very-light);
    color: var(--ccw-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 0 8px var(--ccw-light);
    transition: all 0.3s ease;
}

.ccw-step-card:hover .ccw-step-icon {
    background: var(--ccw-primary);
    color: var(--ccw-white);
    box-shadow: 0 0 0 8px var(--ccw-light);
}

.ccw-step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.ccw-step-card p {
    color: var(--ccw-text-muted);
    margin: 0;
}

/* =========================================
   COVERAGE
========================================= */
.ccw-coverage-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.ccw-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--ccw-white);
    border: 1px solid var(--ccw-border);
    border-radius: 50px;
    font-weight: 500;
    color: var(--ccw-text-dark);
    box-shadow: var(--ccw-shadow-sm);
    transition: all 0.3s ease;
}

.ccw-pill:hover {
    border-color: var(--ccw-primary);
    color: var(--ccw-primary);
    transform: translateY(-2px);
}

.ccw-pill .dashicons {
    color: var(--ccw-sky);
}

/* =========================================
   FAQ ACCORDION
========================================= */
.ccw-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ccw-accordion-item {
    background: var(--ccw-white);
    border: 1px solid var(--ccw-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.02);
    transition: all 0.3s ease;
}

.ccw-accordion-item:hover {
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.05);
    border-color: #cbd5e1;
}

.ccw-accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ccw-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.3s ease;
}

html[dir="rtl"] .ccw-accordion-header {
    text-align: right;
}

.ccw-accordion-header:hover {
    color: var(--ccw-primary);
}

.ccw-accordion-icon {
    position: relative;
    width: 16px;
    height: 16px;
    margin-left: 1rem;
}

.ccw-accordion-icon::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--ccw-text-dark);
    border-bottom: 2px solid var(--ccw-text-dark);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.ccw-accordion-header[aria-expanded="true"] {
    color: var(--ccw-primary);
}

.ccw-accordion-header[aria-expanded="true"] .ccw-accordion-icon::before {
    transform: rotate(225deg);
    top: 8px;
    border-color: var(--ccw-primary);
}

.ccw-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ccw-accordion-body {
    padding: 0 2rem 1.5rem;
    color: var(--ccw-text-muted);
    line-height: 1.7;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .ccw-about-grid { grid-template-columns: 1fr !important; }
    .ccw-slide-title { font-size: 2.25rem; }
    .ccw-title { font-size: 2rem; }
    .ccw-section { padding: 4rem 0; }
    .ccw-slider-container { min-height: 500px; height: 75vh; }
    .ccw-slider-nav { display: none; /* Rely on swipe/dots on mobile */ }
    .ccw-accordion-header { padding: 1.25rem; font-size: 1rem; }
}