/* ========================================
   CDEM Solutions — Main Stylesheet
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --primary: #1e4d6e;
    --primary-dark: #0c1f33;
    --primary-light: #2a6a96;
    --teal: #3bbfb2;
    --teal-light: #7dd8c9;
    --teal-dark: #2a9e93;
    --orange: #f0a030;
    --orange-light: #ffc964;
    --orange-dark: #d88a1a;
    --white: #ffffff;
    --light: #f4f7fa;
    --light-alt: #eaf0f6;
    --dark: #0a1628;
    --gray: #6c7a89;
    --gray-light: #b8c4ce;
    --gray-lighter: #e0e5ec;
    --text: #1a2332;
    --text-light: #5a6a7a;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(10, 22, 40, 0.08);
    --shadow-lg: 0 12px 48px rgba(10, 22, 40, 0.12);
    --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

/* --- Utility --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--teal), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(59, 191, 178, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 191, 178, 0.45);
}

.btn--outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.btn--accent {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: var(--white);
    box-shadow: 0 4px 16px rgba(240, 160, 48, 0.3);
}

.btn--accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(240, 160, 48, 0.45);
}

.btn--small {
    padding: 8px 20px;
    font-size: 13px;
}

.btn--full {
    width: 100%;
}

.btn__loading {
    display: none;
}

.btn.loading .btn__text {
    display: none;
}

.btn.loading .btn__loading {
    display: inline;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
    padding: 10px 0;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 300;
    color: var(--white);
    letter-spacing: -0.5px;
}

.navbar__logo strong {
    font-weight: 700;
}

.navbar__logo img {
    border-radius: 8px;
}

.navbar.scrolled .navbar__logo {
    color: var(--primary-dark);
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar__links a {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: color var(--transition);
    position: relative;
}

.navbar__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--teal);
    transition: width var(--transition);
    border-radius: 1px;
}

.navbar__links a:hover {
    color: var(--white);
}

.navbar__links a:hover::after {
    width: 100%;
}

.navbar.scrolled .navbar__links a {
    color: var(--text-light);
}

.navbar.scrolled .navbar__links a:hover {
    color: var(--primary);
}

.navbar__lang {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.navbar__lang::after {
    display: none !important;
}

.navbar__lang:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .navbar__lang {
    border-color: var(--gray-lighter);
    color: var(--primary);
}

.navbar.scrolled .navbar__lang:hover {
    background: var(--light);
}

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.navbar__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}

.navbar.scrolled .navbar__toggle span {
    background: var(--primary-dark);
}

.navbar__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, #1a6e7a 70%, var(--teal-dark) 100%);
}

.hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbFloat 20s ease-in-out infinite;
}

.hero__orb--1 {
    width: 600px;
    height: 600px;
    background: var(--teal);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.hero__orb--2 {
    width: 400px;
    height: 400px;
    background: var(--orange);
    bottom: -100px;
    left: -50px;
    animation-delay: -7s;
}

.hero__orb--3 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero__content {
    position: relative;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 820px;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
    font-weight: 400;
}

.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Animate In --- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-in--delay-1 {
    animation-delay: 0.2s;
}

.animate-in--delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SECTIONS — General
   ======================================== */
.section {
    padding: 100px 0;
}

.section--alt {
    background: var(--light);
}

.section__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section__tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(59, 191, 178, 0.1), rgba(240, 160, 48, 0.1));
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section__subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* --- Scroll Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   SERVICES
   ======================================== */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--orange));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

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

.service-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(59, 191, 178, 0.1), rgba(30, 77, 110, 0.08));
    color: var(--teal-dark);
    margin-bottom: 20px;
    transition: all var(--transition);
}

.service-card:hover .service-card__icon {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    transform: scale(1.05);
}

.service-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.service-card__text {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ========================================
   ABOUT
   ======================================== */
.about__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about__content .section__tag,
.about__content .section__title {
    text-align: left;
}

.about__text {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat__number {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat__label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ========================================
   WHY US
   ======================================== */
.why-us__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    display: flex;
    gap: 20px;
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow);
    border-color: transparent;
    transform: translateY(-2px);
}

.feature-card__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(59, 191, 178, 0.1), rgba(240, 160, 48, 0.08));
    color: var(--teal-dark);
}

.feature-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.feature-card__text {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ========================================
   CTA BANNER
   ======================================== */
.cta-banner {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--teal-dark) 100%);
}

.cta-banner__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.cta-banner__inner {
    position: relative;
    text-align: center;
}

.cta-banner__title {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.cta-banner__subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   CONTACT
   ======================================== */
.contact__inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: start;
}

.contact__form {
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--light);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-light);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--teal);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 191, 178, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-feedback {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-top: 12px;
}

.form-feedback--success {
    background: rgba(59, 191, 178, 0.1);
    color: var(--teal-dark);
}

.form-feedback--error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.form-feedback.show {
    display: block;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact__info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact__info-item svg {
    flex-shrink: 0;
    color: var(--teal);
    margin-top: 2px;
}

.contact__info-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--primary-dark);
    margin-bottom: 2px;
}

.contact__info-item a,
.contact__info-item span {
    font-size: 0.95rem;
    color: var(--text-light);
}

.contact__info-item a:hover {
    color: var(--teal);
}

.contact__trust {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-lighter);
}

.contact__trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.contact__trust-item svg {
    color: var(--teal);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding-top: 64px;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer__brand .navbar__logo {
    color: var(--white);
    margin-bottom: 16px;
}

.footer__brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer__col h4 {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer__col a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 0;
    transition: color var(--transition);
}

.footer__col a:hover {
    color: var(--teal);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer__legal {
    display: flex;
    gap: 24px;
}

.footer__legal a:hover {
    color: var(--teal);
}

/* ========================================
   COOKIE BANNER
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: -200px;
    left: 24px;
    right: 24px;
    max-width: 480px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    bottom: 24px;
}

.cookie-banner p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
}

.cookie-banner__actions {
    flex-shrink: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about__content .section__tag,
    .about__content .section__title {
        text-align: center;
    }

    .about__text {
        text-align: center;
    }

    .footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .navbar__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 32px 32px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
    }

    .navbar__links.open {
        right: 0;
    }

    .navbar__links a {
        color: var(--text) !important;
        padding: 12px 0;
        width: 100%;
        font-size: 16px;
        border-bottom: 1px solid var(--gray-lighter);
    }

    .navbar__links a::after {
        display: none;
    }

    .navbar__lang {
        border-color: var(--gray-lighter) !important;
        color: var(--primary) !important;
        margin-top: 16px;
    }

    .navbar__toggle {
        display: flex;
        z-index: 1001;
    }

    .hero__content {
        padding: 100px 24px 60px;
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 32px 24px;
    }

    .why-us__grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .contact__inner {
        grid-template-columns: 1fr;
    }

    .contact__form {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .cookie-banner {
        left: 12px;
        right: 12px;
        flex-direction: column;
        text-align: center;
    }

    .section {
        padding: 70px 0;
    }

    .section__header {
        margin-bottom: 40px;
    }

    .about__stats {
        gap: 16px;
    }

    .stat {
        padding: 24px 16px;
    }

    .stat__number {
        font-size: 2rem;
    }

    .contact__trust {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .hero__cta .btn {
        width: 100%;
    }

    .about__stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Mobile menu overlay --- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* --- Selection --- */
::selection {
    background: var(--teal);
    color: var(--white);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}
