/* THEME: Milan Tech (Light Mode)
   FONTS: Space Grotesk (Headers), Outfit (Body)
*/

:root {
    --bg-body: #F2F4F6;
    --bg-white: #FFFFFF;
    --primary: #1A1A1A;
    --accent-1: #5D3FD3;
    /* Iris Purple */
    --accent-2: #00C896;
    /* Mint Green */
    --text-main: #2C2C2C;
    --text-muted: #666666;
    --border: #E0E0E0;
    --radius: 16px;
    /* 2xl radius requirement */
    --shadow: 0 12px 32px rgba(93, 63, 211, 0.08);
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 90px 0;
}

.bg-soft {
    background-color: #E8EAF6;
}

.bg-dark {
    background-color: var(--primary);
    color: #fff;
}

.text-center {
    text-align: center;
}

.text-white {
    color: #fff;
}

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

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary);
}

.section__title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section__desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn--primary {
    background: var(--accent-1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.3);
}

.btn--primary:hover {
    background: #4a32a8;
    transform: translateY(-2px);
}

.btn--outline {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.btn--outline:hover {
    background: var(--accent-1);
    color: #fff;
}

.btn--sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn--xs {
    padding: 6px 12px;
    font-size: 0.8rem;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(242, 244, 246, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo__img {
    flex-shrink: 0;
    display: block;
}

.logo__accent {
    color: var(--accent-1);
}

.nav__list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav__link {
    font-weight: 600;
    color: var(--primary);
}

.nav__link:hover {
    color: var(--accent-1);
}

/* Burger & Mobile Menu */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1100;
}

.burger span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav__close {
    display: none;
    font-size: 2.5rem;
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--primary);
}

@media (max-width: 1024px) {
    .burger {
        display: flex;
    }

    /* !!! CRITICAL FIX FOR OVERLAP !!! */
    .burger[aria-expanded="true"] {
        opacity: 0;
        pointer-events: none;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 100px;
        transition: var(--transition);
        z-index: 1050;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        font-size: 1.2rem;
    }

    .nav__close {
        display: block;
    }
}

/* Hero */
.hero {
    padding-top: 140px;
    padding-bottom: 60px;
}

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

.badge {
    background: rgba(0, 200, 150, 0.15);
    color: #008f6b;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 20px;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero__note {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: var(--primary);
}

.hero__buttons {
    display: flex;
    gap: 15px;
}

.hero__visual {
    position: relative;
}

.hero__img {
    border-radius: var(--radius);
}

.hero__card-float {
    position: absolute;
    bottom: 30px;
    left: -20px;
    background: var(--bg-white);
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-2);
}

.hero__card-float span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__note {
        justify-content: center;
    }

    .hero__card-float {
        left: 50%;
        transform: translateX(-50%);
        bottom: -20px;
        width: 80%;
    }
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--accent-1);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Services (Asymmetric) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-item {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid transparent;
}

.service-item:hover {
    border-color: var(--accent-2);
}

.item-main {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--primary), #333);
    color: #fff;
}

.item-main h3 {
    color: #fff;
}

.item-main .link-arrow {
    color: var(--accent-2);
    font-weight: 600;
    margin-top: 15px;
    display: inline-block;
}

.item-wide {
    grid-column: span 3;
    flex-direction: column;
    align-items: center;
}

.badge-sm {
    background: var(--accent-2);
    color: #004d3a;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    width: fit-content;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .item-main,
    .item-wide {
        grid-column: span 1;
    }

    .item-wide {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* Reviews */
.reviews-scroller {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.review-card {
    min-width: 300px;
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: var(--radius);
    scroll-snap-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stars {
    color: #FFD700;
    margin-bottom: 10px;
}

.author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ccc;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.av-1 {
    background-image: url('./images/avatar-1.jpg');
}

.av-2 {
    background-image: url('./images/avatar-2.jpg');
}

.av-3 {
    background-image: url('./images/avatar-3.jpg');
}

/* Contact Form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.info-list {
    margin-top: 30px;
}

.info-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent-1);
    stroke: currentColor;
}

.form-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-title {
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #FAFAFA;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--accent-1);
    outline: none;
    background: #fff;
}

.error-text {
    color: #E74C3C;
    font-size: 0.8rem;
    display: block;
    min-height: 18px;
    margin-top: 4px;
}

.checkbox-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.link-modal {
    color: var(--accent-1);
    text-decoration: underline;
    padding: 0;
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background: #fff;
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-logo .logo__img {
    width: 32px;
    height: 32px;
}

.footer h4 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-1);
    stroke: currentColor;
}

.footer button:hover,
.footer a:hover {
    color: var(--accent-1);
}

.footer__bottom {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* Modals & Cookie */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal {
    background: var(--bg-white);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    padding: 0;
    border-radius: var(--radius);
    transform: translateY(20px);
    transition: 0.4s ease;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.modal__head {
    padding: 30px 30px 0 30px;
}

.modal__body {
    padding: 20px 30px 30px 30px;
}

.modal.active {
    display: block;
    transform: translateY(0);
}

.modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 0 30px;
    flex-shrink: 0;
}

.modal__close {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.modal__body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.modal__body h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--primary);
    font-family: var(--font-head);
}

.modal__body p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal__body ul {
    margin-left: 20px;
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal__body ul li {
    margin-bottom: 8px;
    list-style-type: disc;
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--primary);
    color: #fff;
    padding: 15px 25px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    z-index: 1500;
    transform: translateY(150%);
    transition: 0.5s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-text button {
    color: var(--accent-2);
    text-decoration: underline;
    padding: 0;
}

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

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}