/* ============================================
   COMITARI - ENHANCED DESIGN SYSTEM
   Design moderne et professionnel
   ============================================ */

/* ===== CUSTOM FORM STYLES (No system popups) ===== */
.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23378E56' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.custom-select:focus {
    outline: none;
    border-color: var(--secondary-green);
    box-shadow: 0 0 0 3px rgba(55, 142, 86, 0.1);
}

/* Custom Checkbox */
.custom-checkbox {
    position: relative;
    padding-left: 2rem;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.custom-checkbox:hover input~.checkmark {
    border-color: var(--secondary-green);
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

/* ===== TEXT ALIGNMENT & JUSTIFICATION ===== */
.text-justify {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

.text-balance {
    text-wrap: balance;
}

/* ===== HERO SECTION WITH IMAGE ===== */
.hero-with-image {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-image-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            var(--primary-blue) 0%,
            rgba(26, 82, 136, 0.95) 30%,
            rgba(26, 82, 136, 0.7) 70%,
            transparent 100%);
    z-index: 2;
}

.hero-content-wrapper {
    position: relative;
    z-index: 3;
    max-width: 50%;
}

/* ===== SERVICE CARDS WITH IMAGES ===== */
.service-card-with-image {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 100%;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.service-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card-with-image:hover .service-card-image img {
    transform: scale(1.1);
}

.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(15, 23, 42, 0.4) 0%,
            rgba(15, 23, 42, 0.8) 100%);
    z-index: 2;
    transition: background 0.4s ease;
}

.service-card-with-image:hover .service-card-overlay {
    background: linear-gradient(180deg,
            rgba(55, 142, 86, 0.7) 0%,
            rgba(26, 82, 136, 0.9) 100%);
}

.service-card-content-overlay {
    position: relative;
    z-index: 3;
    padding: var(--space-2xl);
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* ===== SECTION WITH BACKGROUND IMAGE ===== */
.section-with-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.section-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1;
}

.section-with-bg .container {
    position: relative;
    z-index: 2;
}

/* ===== STATS SECTION ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.stat-card {
    text-align: center;
    padding: var(--space-xl);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--secondary-green);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== TESTIMONIAL SECTION ===== */
.testimonial-card {
    background: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 30px;
    font-size: 120px;
    font-family: Georgia, serif;
    color: var(--secondary-green);
    opacity: 0.1;
    line-height: 1;
}

.testimonial-text {
    font-size: 1.125rem;
    font-style: italic;
    margin-bottom: var(--space-lg);
    text-align: justify;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-green);
}

.author-info h4 {
    margin: 0;
    color: var(--surface-dark);
}

.author-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== PROCESS STEPS ===== */
.process-timeline {
    position: relative;
    padding-left: 80px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
            var(--secondary-green) 0%,
            var(--primary-blue) 100%);
}

.process-step {
    position: relative;
    margin-bottom: var(--space-2xl);
}

.process-step-number {
    position: absolute;
    left: -80px;
    top: 0;
    width: 60px;
    height: 60px;
    background: var(--gradient-main);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}

.process-step-content {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ===== CTA BANNER ===== */
.cta-banner {
    background: var(--gradient-main);
    color: white;
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-banner h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto var(--space-xl);
}

/* ===== RESPONSIVE IMAGES ===== */
.responsive-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

.image-with-shadow {
    box-shadow: var(--shadow-xl);
}

.image-rounded {
    border-radius: var(--radius-xl);
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .hero-content-wrapper {
        max-width: 100%;
    }

    .hero-image-container {
        width: 100%;
        opacity: 0.3;
    }

    .process-timeline {
        padding-left: 40px;
    }

    .process-step-number {
        left: -40px;
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}