:root {
    --primary-color: #0a192f;
    --secondary-color: #ffc107;
    --text-light: #ffffff;
    --text-gray: #555;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-white);
    color: var(--text-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hide content until translation is ready to prevent flash */
/* Optimized: Use opacity instead of visibility for smoother transitions */
body:not(.translated):not(.translation-failed) {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

body.translated,
body.translation-failed {
    opacity: 1;
    visibility: visible;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Block */
.header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header__logo img {
    height: 70px;
    width: auto;
    display: block;
    transition: var(--transition);
    /* Optimize image rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.header__logo img:hover {
    transform: scale(1.05);
}

.header__hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.header__hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: var(--transition);
}

/* Nav Block */
.nav__list {
    display: flex;
    gap: 2.5rem;
}

.nav__item--dropdown {
    position: relative;
}

.nav__link {
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    color: rgba(255, 255, 255, 0.8);
}

.nav__link:hover,
.nav__link--active {
    color: var(--secondary-color);
}

/* Dropdown Block */
.dropdown {
    position: absolute;
    top: 100%;
    left: -50%;
    background-color: var(--bg-white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
    margin-top: 1rem;
    border-radius: 4px;
}

.nav__item--dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem;
    min-width: 800px;
}

.dropdown__col h4 {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.dropdown__col ul {
    list-style: none;
}

.dropdown__col ul li {
    margin-bottom: 0.75rem;
}

.dropdown__col ul li a {
    color: var(--text-gray);
    font-size: 0.9rem;
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
}

.dropdown__col ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

/* Hero Block */
.hero {
    height: 85vh;
    background: linear-gradient(rgba(10, 25, 47, 0.85), rgba(10, 25, 47, 0.7)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Remove if causing performance issues on mobile */
    display: flex;
    align-items: center;
    color: var(--text-light);
    position: relative;
    /* Optimize background rendering */
    will-change: transform;
    transform: translateZ(0);
}

.hero__content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.hero__title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero__text {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1.2s ease;
}

/* Button Block */
.btn {
    padding: 15px 35px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 2px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    font-size: 0.9rem;
    animation: fadeInUp 1.4s ease;
}

.btn:hover {
    background-color: #fff;
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
}

/* Section Utility */
.section {
    padding: 6rem 0;
    background-color: var(--bg-white);
}

.section--alt {
    background-color: var(--bg-light);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section__title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section__subtitle {
    color: var(--text-gray);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Feature Block */
.feature__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature__content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.feature__content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-gray);
}

.feature__image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.feature__image img:hover {
    transform: scale(1.02);
}

/* Services Block */
.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card Block */
.card {
    background: white;
    padding: 3rem 2rem;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: var(--transition);
    text-align: left;
}

.card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card__title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card__text {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.card__link {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card__link:hover {
    gap: 10px;
}

/* Footer Block */
.footer {
    background-color: #020c1b; /* Darker than primary for contrast */
    color: var(--text-light);
    padding: 4rem 0 2rem;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), #ffdb58, var(--secondary-color));
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2 columns as per user request */
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer__col h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.footer__col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer__col p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #a8b2d1; /* Softer text color */
    max-width: 400px;
}

.footer__col ul li {
    margin-bottom: 1rem;
}

.footer__col ul li a {
    color: #a8b2d1;
    transition: var(--transition);
    display: inline-block;
}

.footer__col ul li a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer__copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #8892b0;
}

/* Form Block */
.form {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-family: inherit;
    transition: var(--transition);
}

.form__input:focus,
.form__textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.form__textarea {
    height: 150px;
    resize: vertical;
}

/* FAQ Block */
.faq-item {
    background: white;
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #eee;
}

.faq-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-item__question {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-color);
}

.faq-item__answer {
    margin-top: 1rem;
    color: var(--text-gray);
    display: none;
}

.faq-item--active .faq-item__answer {
    display: block;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal--active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .feature__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .section--alt .feature__grid {
        direction: ltr;
    }

    .feature__image {
        order: -1;
    }

    .hero__title {
        font-size: 2.8rem;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .dropdown__container {
        grid-template-columns: 1fr 1fr;
        min-width: 600px;
    }
}

@media (max-width: 768px) {
    /* Remove fixed background on mobile for better performance */
    .hero {
        background-attachment: scroll;
    }
    
    .nav__list {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: var(--primary-color);
        height: calc(100vh - 70px);
        width: 70%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav__list--active {
        transform: translateX(0);
    }

    .header__hamburger {
        display: flex;
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0.5rem;
    }

    .dropdown__container {
        grid-template-columns: 1fr;
        min-width: auto;
        padding: 1rem;
    }

    .nav__item--dropdown .dropdown {
        display: none;
    }

    .nav__item--dropdown:hover .dropdown,
    .nav__item--dropdown.active .dropdown {
        display: block;
    }

    .header__logo img {
        height: 40px;
    }
}

/* Language Switcher Block */
.language-switcher {
    position: relative;
    margin-left: 2rem;
}

.language-switcher__btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.language-switcher__btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: var(--secondary-color);
}

.language-switcher__btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

.language-switcher__dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.language-switcher__dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-white);
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.language-switcher__dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-switcher__option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-gray);
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
}

.language-switcher__option:last-child {
    border-bottom: none;
}

.language-switcher__option:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    padding-left: 1.8rem;
}

.language-switcher__option.active {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
    font-weight: 700;
}

.language-switcher__option .flag {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}