/* 
 * Opti Trackx CSS
 * Theme: Dark Neon Tech
 */

:root {
    /* Colors */
    --bg-color: #0B0C15;
    --surface-color: #161825;
    --primary-color: #7B61FF;
    --primary-hover: #5A3FFF;
    --secondary-color: #00D4FF;
    --accent-color: #FF2E63;
    --text-color: #E2E2E2;
    --text-muted: #A0A0A0;

    /* Typography */
    --font-main: 'Manrope', sans-serif;
    --fs-h1: clamp(2.2rem, 5vw + 1rem, 3.5rem);
    --fs-h2: clamp(1.8rem, 4vw + 0.8rem, 2.5rem);
    --fs-h3: clamp(1.3rem, 3vw + 0.5rem, 1.8rem);
    --fs-body: clamp(1rem, 1vw + 0.75rem, 1.1rem);

    /* Spacing */
    --container-width: 1200px;
    --section-padding: clamp(60px, 10vw, 80px) 0;

    /* Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-2xl: 32px;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(123, 97, 255, 0.3);

    /* Transitions */
    --transition-fast: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: var(--fs-body);
}

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

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2.5rem);
}

/* Typography */
h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

h4 {
    font-size: 1.25rem;
}

h1,
h2,
h3,
h4 {
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: var(--fs-h2);
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1.25rem, 3vw, 2.5rem);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: all 0.3s ease;
    text-align: center;
}

.btn--primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.4);
}

.btn--primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.5);
}

.btn--secondary {
    background-color: transparent;
    border: 2px solid var(--text-muted);
    color: #fff;
}

.btn--secondary:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

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

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

.btn--outline {
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(11, 12, 21, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header__container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.35rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.logo img {
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(123, 97, 255, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover img {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 25px rgba(123, 97, 255, 0.6);
}

.nav__list {
    display: flex;
    gap: 40px;
}

.nav__link {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav__link:hover::after {
    width: 100%;
}

.nav__close {
    display: none;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 102;
}

.burger span {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: 0.3s;
}

/* Hero */
.hero {
    position: relative;
    padding: clamp(120px, 15vh, 160px) 0 clamp(60px, 10vh, 100px);
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(123, 97, 255, 0.2) 0%, rgba(11, 12, 21, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero__container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--secondary-color);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.hero__title {
    font-weight: 800;
    margin-bottom: 24px;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero__actions {
    display: flex;
    gap: 20px;
}

.hero__img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-soft), 0 0 30px rgba(123, 97, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-fast);
}

.hero__img:hover {
    transform: scale(1.02);
}

/* Features */
.features {
    padding: var(--section-padding);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
}

.feature-card {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: var(--radius-md);
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.feature-card:hover {
    transform: translateY(-10px);
    background-color: #1E2135;
    box-shadow: var(--shadow-soft);
}

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(123, 97, 255, 0.1);
    border-radius: 12px;
    color: var(--primary-color);
    margin-bottom: 24px;
    transition: var(--transition-fast);
}

.feature-card:hover .feature-card__icon {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.feature-card__icon svg {
    width: 32px;
    height: 32px;
}

.feature-card__title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.feature-card__text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Services */
.services {
    padding: var(--section-padding);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
}

.service-card {
    background-color: var(--surface-color);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.service-card__image {
    height: 240px;
    background-image: url('images/services_grid.jpg');
    background-size: 200% 200%;
    position: relative;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card__image {
    transform: scale(1.05);
}

.service-card__image--1 {
    background-position: 0 0;
}

.service-card__image--2 {
    background-position: 100% 0;
}

.service-card__image--3 {
    background-position: 0 100%;
}

.service-card__image--4 {
    background-position: 100% 100%;
}

.service-card__content {
    padding: 30px;
}

.service-card__title {
    font-size: 1.5rem;
    margin-bottom: 1px;
}

.link-arrow {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 20px;
    transition: 0.3s;
}

.link-arrow:hover {
    color: #fff;
    transform: translateX(5px);
}

/* Reviews */
.reviews {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(123, 97, 255, 0.05) 50%, var(--bg-color) 100%);
}

.reviews__slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 40px;
}

.review-card {
    background: rgba(22, 24, 37, 0.8);
    backdrop-filter: blur(5px);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.review-card__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.review-author {
    font-size: 1rem;
    margin-bottom: 0px;
}

.review-role {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.review-text {
    font-style: italic;
    color: #ccc;
}

/* Contact */
.contact {
    padding: var(--section-padding);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    background-color: var(--surface-color);
    padding: 60px;
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.contact__info h2 {
    font-size: 2.5rem;
}

.contact__list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-size: 1.1rem;
}

.contact__list li {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact__list li svg {
    color: var(--secondary-color);
    flex-shrink: 0;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    transition: 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.form-input--short {
    width: 100px;
}

.error-message {
    color: var(--accent-color);
    font-size: 0.8rem;
    height: 14px;
}

.form-checkbox {
    flex-direction: row;
    align-items: center;
    font-size: 0.9rem;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.contact-cta {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(123, 97, 255, 0.03) 100%);
    text-align: center;
}

.contact-cta__content {
    max-width: 600px;
    margin: 0 auto;
}

.mb-8 {
    margin-bottom: 2rem !important;
}

/* Footer */
.footer {
    padding: 80px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer__title {
    color: #fff;
    margin-bottom: 24px;
}

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

.footer__list a,
.footer__link-btn {
    color: var(--text-muted);
    transition: 0.3s;
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}

.footer__list a:hover,
.footer__link-btn:hover {
    color: #fff;
}

.footer__bottom {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
    width: 340px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-popup.visible {
    transform: translateY(0);
}

.cookie-popup h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.cookie-popup p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.cookie-popup__actions {
    display: flex;
    gap: 10px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 600px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: 0.3s;
}

.modal__close:hover {
    color: #fff;
}

.modal__title {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        z-index: 101;
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-top: 200px;
    }

    .nav__link {
        font-size: 1.5rem;
    }

    .burger {
        display: flex;
    }

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

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

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


    .hero__actions {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
    }

    .hero__actions .btn {
        width: 100%;
        text-align: center;
    }

    .contact__container {
        padding: 30px 20px;
    }

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

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero__container {
        grid-template-columns: 1fr;
        padding-top: 40px;
    }

    .hero__image {
        display: none;
    }

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

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

    .footer__container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        text-align: center;
    }

    .footer__list a,
    .footer__link-btn {
        text-align: center;
        /* center align for mobile footer layout */
        display: block;
    }
}