/* CFM Group – Professional rebuild */
html { scroll-behavior: smooth; }
:root {
    --cfm-dark: #09253d;
    --cfm-gold: #c9a227;
    --cfm-muted: #777068;
    --cfm-text: #333;
    --cfm-bg: #f6f6f6;
    --cfm-white: #fff;
    --wrap: 1140px;
    --gap: 24px;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,.08);
}

.cfm-wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* Hero */
.cfm-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--cfm-dark) 0%, #1a3a52 100%);
    color: var(--cfm-white);
    padding: 48px var(--gap);
}
.cfm-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--cfm-white);
}
.cfm-hero p {
    font-size: 18px;
    opacity: .92;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Hero Slider */
.cfm-hero--slider {
    position: relative;
    min-height: 380px;
    overflow: hidden;
    padding: 0;
}
.cfm-hero-track {
    position: absolute;
    inset: 0;
}
.cfm-hero-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}
.cfm-hero-slide--active {
    opacity: 1;
    z-index: 0;
}
.cfm-hero-slide-bg {
    position: absolute;
    inset: -5%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(0.72);
}
.cfm-hero-slide--active .cfm-hero-slide-bg {
    animation: cfm-hero-zoom-out 10s ease-out forwards;
}
@keyframes cfm-hero-zoom-out {
    from { transform: scale(0.78); }
    to { transform: scale(0.72); }
}
.cfm-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(9,37,61,.82) 0%, rgba(9,37,61,.45) 50%, rgba(9,37,61,.2) 100%);
    z-index: 1;
    pointer-events: none;
}
.cfm-hero--slider .cfm-hero-content {
    position: relative;
    z-index: 2;
    padding: 48px var(--gap);
    min-height: 200px;
}
.cfm-hero-copy {
    display: none;
    text-align: center;
}
.cfm-hero-copy--active {
    display: block;
    animation: cfm-hero-fade-in 0.5s ease-out;
}
.cfm-hero-logo {
    max-height: 52px;
    width: auto;
    margin: 0 auto 14px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}
.cfm-hero--slider .cfm-hero-content h1 {
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.cfm-hero--slider .cfm-hero-content p {
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
@keyframes cfm-hero-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.cfm-hero-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}
.cfm-hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.cfm-hero-dot:hover { background: rgba(255,255,255,.7); }
.cfm-hero-dot--active {
    background: var(--cfm-gold);
    transform: scale(1.25);
}
.cfm-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    color: var(--cfm-dark);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.25s, transform 0.25s;
}
.cfm-hero-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}
.cfm-hero-prev { left: 20px; }
.cfm-hero-next { right: 20px; }
[dir="rtl"] .cfm-hero-prev { left: auto; right: 20px; }
[dir="rtl"] .cfm-hero-next { right: auto; left: 20px; }
@media (max-width: 768px) {
    .cfm-hero--slider { min-height: 320px; }
    .cfm-hero--slider .cfm-hero-content { padding: 36px 16px; }
    .cfm-hero-arrow { width: 40px; height: 40px; font-size: 22px; }
    .cfm-hero-prev { left: 10px; }
    .cfm-hero-next { right: 10px; }
    .cfm-hero-dots { bottom: 16px; }
}

/* Section common */
.cfm-section {
    padding: 56px 0;
}
.cfm-section--alt {
    background: var(--cfm-bg);
}
.cfm-section-title {
    text-align: center;
    margin-bottom: 40px;
}
.cfm-section-title .logo {
    display: block;
    max-height: 56px;
    width: auto;
    margin: 0 auto 16px;
}
.cfm-section-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--cfm-dark);
    margin: 0 0 8px;
}
.cfm-section-title .sub {
    font-size: 15px;
    color: var(--cfm-muted);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Intro */
.cfm-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 24px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--cfm-text);
}

/* Cards grid */
.cfm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap);
}
.cfm-card {
    background: var(--cfm-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.cfm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.cfm-card-img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.cfm-card-body {
    padding: 20px;
}
.cfm-card-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--cfm-dark);
}
.cfm-card-body h3 a {
    color: inherit;
    text-decoration: none;
}
.cfm-card-body h3 a:hover { color: var(--cfm-gold); }
.cfm-card-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--cfm-muted);
    color: var(--cfm-white);
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: background .25s;
}
.cfm-card-cta:hover { background: var(--cfm-dark); color: var(--cfm-white); }

/* Company section accent */
.cfm-section--security .cfm-section-title h2 { color: #1a2836; }
.cfm-section--security .cfm-card-cta { background: #1a2836; }
.cfm-section--cleaning .cfm-section-title h2 { color: #c45c26; }
.cfm-section--cleaning .cfm-card-cta { background: #c45c26; }
.cfm-section--pest .cfm-section-title h2 { color: #2d5a27; }
.cfm-section--pest .cfm-card-cta { background: #2d5a27; }

/* Clients */
.cfm-clients {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--gap);
    align-items: center;
}
.cfm-clients-item {
    text-align: center;
    padding: 20px;
    background: var(--cfm-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.cfm-clients-item img {
    max-height: 70px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.cfm-clients-item span {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cfm-text);
}

/* Contact */
.cfm-contact {
    max-width: 480px;
    margin: 0 auto;
}
.cfm-contact h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--cfm-dark);
}
.cfm-contact input,
.cfm-contact select,
.cfm-contact textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 15px;
    box-sizing: border-box;
}
.cfm-contact input:focus,
.cfm-contact select:focus,
.cfm-contact textarea:focus {
    outline: none;
    border-color: var(--cfm-gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,.15);
}
.cfm-contact textarea { min-height: 100px; resize: vertical; }
.cfm-contact button,
.cfm-contact input[type="submit"] {
    width: 100%;
    padding: 14px;
    background: var(--cfm-muted);
    color: var(--cfm-white);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s;
}
.cfm-contact button:hover,
.cfm-contact input[type="submit"]:hover { background: var(--cfm-dark); }

/* Footer */
.cfm-footer {
    padding: 24px var(--gap);
    text-align: center;
    background: var(--cfm-dark);
    color: rgba(255,255,255,.85);
    font-size: 14px;
}

/* RTL */
[dir="rtl"] .cfm-section-title .sub,
[dir="rtl"] .cfm-intro,
[dir="rtl"] .cfm-hero p { text-align: right; }
[dir="rtl"] .cfm-contact { text-align: right; }
[dir="rtl"] .cfm-contact h2 { text-align: center; }

@media (max-width: 768px) {
    .cfm-hero { min-height: 260px; padding: 36px 16px; }
    .cfm-section { padding: 40px 0; }
    .cfm-cards { grid-template-columns: 1fr; }
    .cfm-clients { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
