:root {
    /* New Color Palette: Cyber Edu */
    --primary-color: #4338ca;
    /* Indigo 700 */
    --primary-hover: #3730a3;
    --secondary-color: #0f172a;
    /* Slate 900 (Background) */
    --accent-color: #2dd4bf;
    /* Teal 400 */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --error: #ef4444;
    --success: #10b981;

    --font-main: 'Space Grotesk', sans-serif;

    --border-radius: 12px;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 20px);
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.4);
}

.btn--primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

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

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

.btn--small {
    padding: 8px 20px;
    font-size: 0.9rem;
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

.btn--small:hover {
    filter: brightness(1.1);
}

.btn--full {
    width: 100%;
    background: var(--accent-color);
    color: var(--secondary-color);
}

/* Header */
.header {
    padding: clamp(12px, 2.5vw, 20px) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 10px);
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-main);
}

.logo svg {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
}

.nav {
    position: fixed;
    top: clamp(60px, 15vw, 80px);
    right: -100%;
    width: 100%;
    height: calc(100vh - clamp(60px, 15vw, 80px));
    background: var(--secondary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav.active {
    right: 0;
}

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

.nav__link {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 500;
}

.burger {
    display: block;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    position: relative;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    position: absolute;
    transition: var(--transition);
}

.burger span:nth-child(1) {
    top: 0;
}

.burger span:nth-child(2) {
    top: 9px;
}

.burger span:nth-child(3) {
    bottom: 0;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

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

.burger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9px;
}

/* Hero */
.hero {
    height: 100vh;
    min-height: clamp(500px, 100vh, 800px);
    display: flex;
    align-items: center;
    position: relative;
    background: url('images/hero-bg.jpg') center/cover no-repeat;
    margin-top: clamp(60px, 15vw, 80px);
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: min(600px, 90vw);
    width: 100%;
}

.badge {
    display: inline-block;
    background: rgba(45, 212, 191, 0.1);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    border: 1px solid var(--accent-color);
}

.hero__title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: clamp(16px, 4vw, 20px);
}

.hero__subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-muted);
    margin-bottom: clamp(20px, 5vw, 30px);
}

/* Sections General */
.section {
    padding: clamp(50px, 12vw, 80px) 0;
}

.section__title {
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(30px, 8vw, 50px);
}

/* Features */
.features__grid {
    display: grid;
    gap: clamp(20px, 5vw, 30px);
    grid-template-columns: 1fr;
}

.feature-card {
    background: var(--card-bg);
    padding: clamp(20px, 5vw, 30px);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

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

.feature-card__icon {
    font-size: clamp(2.5rem, 6vw, 3rem);
    margin-bottom: clamp(15px, 4vw, 20px);
}

/* Services */
.services__grid {
    display: grid;
    gap: clamp(20px, 5vw, 30px);
    grid-template-columns: 1fr;
}

.service-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.service-card__image {
    height: clamp(180px, 40vw, 200px);
    overflow: hidden;
}

.service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.service-card__content {
    padding: clamp(20px, 5vw, 25px);
}

.service-card__content h3 {
    margin-bottom: 10px;
}

/* Reviews */
.reviews__grid {
    display: grid;
    gap: clamp(20px, 5vw, 30px);
    grid-template-columns: 1fr;
}

.review-card {
    background: rgba(255, 255, 255, 0.03);
    padding: clamp(20px, 5vw, 30px);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 4vw, 20px);
    transition: var(--transition);
}

.review-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.review-card__image {
    width: clamp(70px, 15vw, 80px);
    height: clamp(70px, 15vw, 80px);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
    flex-shrink: 0;
}

.review-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-card__content {
    flex: 1;
}

.review-card__text {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.6;
}

.review-card__author {
    font-weight: 700;
    color: var(--text-main);
}

/* Contact */
.contact__container {
    display: grid;
    gap: clamp(30px, 8vw, 50px);
    grid-template-columns: 1fr;
}

.contact__list {
    margin-top: 30px;
}

.contact__list li {
    margin-bottom: clamp(12px, 3vw, 15px);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.contact__form {
    background: var(--card-bg);
    padding: clamp(20px, 5vw, 30px);
    border-radius: var(--border-radius);
}

.contact__form h3 {
    margin-bottom: 25px;
    text-align: center;
}

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

.form-group input {
    width: 100%;
    padding: clamp(12px, 3vw, 15px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-group {
    flex-wrap: wrap;
}

.captcha-group label {
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.2rem);
    white-space: nowrap;
}

/* Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

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

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .spinner {
    display: block;
}

/* Footer */
.footer {
    background: #0b1120;
    padding: clamp(40px, 10vw, 60px) 0 clamp(15px, 4vw, 20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__grid {
    display: grid;
    gap: clamp(25px, 6vw, 40px);
    grid-template-columns: 1fr;
    margin-bottom: clamp(25px, 6vw, 40px);
}

.logo--footer {
    margin-bottom: 15px;
}

.footer__col h4 {
    margin-bottom: 20px;
    color: var(--accent-color);
}

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

.footer__col ul li a {
    color: var(--text-muted);
}

.footer__col ul li a:hover {
    color: var(--accent-color);
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: clamp(15px, 4vw, 20px);
    left: clamp(15px, 4vw, 20px);
    right: clamp(15px, 4vw, 20px);
    background: var(--card-bg);
    padding: clamp(15px, 4vw, 20px);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 900;
    border: 1px solid var(--primary-color);
    display: none;
    /* JS handles this */
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal__content {
    position: relative;
    background: var(--card-bg);
    padding: clamp(25px, 6vw, 40px);
    border-radius: var(--border-radius);
    max-width: min(600px, 90vw);
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal__body h3 {
    margin-bottom: 20px;
    margin-top: 0;
    color: var(--accent-color);
    font-size: clamp(1.3rem, 4vw, 1.5rem);
}

.modal__body h4 {
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: clamp(1.1rem, 3vw, 1.2rem);
    font-weight: 600;
}

.modal__body p,
.modal__body ul {
    margin-bottom: 15px;
    color: var(--text-muted);
    line-height: 1.7;
}

.modal__body ul {
    padding-left: 25px;
}

.modal__body ul li {
    margin-bottom: 8px;
}

.modal__body ul {
    list-style: disc;
    padding-left: 20px;
}

/* Mobile Small (up to 480px) */
@media (max-width: 480px) {
    .hero__title {
        font-size: 1.6rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

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

    .review-card__image {
        width: 60px;
        height: 60px;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-buttons .btn {
        width: 100%;
    }
}

/* Tablet (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .hero__title {
        font-size: 2rem;
    }
}

/* Tablet and up (768px+) */
@media (min-width: 768px) {

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

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

    .review-card {
        flex-direction: row;
        align-items: flex-start;
    }

    .review-card__image {
        width: clamp(90px, 12vw, 100px);
        height: clamp(90px, 12vw, 100px);
    }

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

    .cookie-popup {
        max-width: 500px;
        left: auto;
        right: clamp(15px, 4vw, 20px);
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .burger {
        display: none;
    }

    .nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        transform: none;
        display: block;
    }

    .nav__list {
        flex-direction: row;
        gap: clamp(20px, 3vw, 30px);
    }

    .nav__link {
        font-size: 1rem;
    }

    .hero__title {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }

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

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

    .reviews__grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }

    .cookie-popup {
        width: clamp(350px, 25vw, 400px);
        left: auto;
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        padding: 0 40px;
    }

    .hero__content {
        max-width: 700px;
    }
}