@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

:root {
    --color-dark: #0D0D1A;
    --color-graphite: #1A1A2E;
    --color-anthracite: #2C2C3A;
    --color-light: #F0F0F0;
    --color-gray: #a0a0b0;

    --aurora-green: #00FFC2;
    --aurora-cyan: #00D4FF;
    --aurora-purple: #A855F7;

    --font-main: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo img {
    max-height: 100px;
    margin-bottom: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-anthracite);
    border-top-color: var(--aurora-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-dark);
    color: var(--color-light);
    line-height: 1.6;
}

h1, h2, h3, .logo {
    font-family: 'Secular One', sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(13, 13, 26, 0.8);
    padding: 0.6rem 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-anthracite);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-light);
    text-decoration: none;
    position: relative;
    top: 10px;
}

.logo img {
    max-height: 70px;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 1rem;
}

.main-nav ul li a {
    color: var(--color-gray);
    text-decoration: none;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--color-dark);
    background-color: var(--color-light);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-highlight {
    background: linear-gradient(90deg, var(--aurora-cyan), var(--aurora-green));
    color: var(--color-dark);
    border: none;
}

.btn-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 194, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010; /* Higher than header's z-index */
}

.hamburger-line {
    width: 2rem;
    height: 0.25rem;
    background-color: var(--color-light);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px; /* Header height */
    overflow: hidden;
}

.aurora-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#aurora-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0.4;
    z-index: 1;
    object-fit: cover;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--color-gray);
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

.cta-buttons .btn {
    margin: 0 0.5rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--aurora-purple), var(--aurora-cyan));
    color: var(--color-light);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-light);
    border: 2px solid var(--color-light);
}

.btn-secondary:hover {
    background-color: var(--color-light);
    color: var(--color-dark);
}

/* --- Sections General --- */
section {
    padding: 6rem 0;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

/* --- Services Section --- */
.services-section {
    background-color: var(--color-graphite);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-anthracite);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(0, 255, 194, 0.2), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--aurora-green);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--aurora-cyan);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--color-gray);
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.portfolio-item .portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    cursor: pointer;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(13, 13, 26, 0.9), transparent);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-light);
}

.btn-visit {
    color: var(--aurora-green);
    text-decoration: none;
    font-weight: 600;
    pointer-events: auto;
}

.btn-visit:hover {
    text-decoration: underline;
}

/* --- Why Us Section --- */
.why-us-section {
    background-color: var(--color-graphite);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--aurora-green);
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--color-gray);
}

/* --- Testimonials Section --- */
.testimonial-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    flex: 0 0 100%;
    background-color: var(--color-anthracite);
    padding: 2rem;
    border-left: 4px solid var(--aurora-cyan);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.testimonial-card::before {
    content: '\f10d'; /* Font Awesome quote-left */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 2rem;
    color: var(--aurora-cyan);
    opacity: 0.1;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1rem;
    padding-left: 3rem;
}

.testimonial-card span {
    font-weight: 600;
    color: var(--color-light);
    padding-left: 3rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--aurora-cyan);
    color: var(--color-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: background-color 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(0, 212, 255, 0.2);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

/* --- CTA Final Section --- */
.cta-final-section {
    background-color: var(--color-graphite);
    text-align: center;
}

.cta-final-section h2 {
    font-size: 2.2rem;
}

/* --- Footer --- */
.main-footer-section {
    background-color: var(--color-dark);
    padding: 4rem 0 2rem 0;
    border-top: 1px solid var(--color-anthracite);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-about h3, .footer-contact h3, .footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--aurora-green);
}

.footer-about p, .footer-contact p {
    color: var(--color-gray);
}

.footer-social a {
    color: var(--color-gray);
    font-size: 1.5rem;
    margin-right: 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--aurora-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-anthracite);
    color: var(--color-gray);
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1001;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        z-index: 1005;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-dark);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        margin-top: 0;
    }

    .main-nav.is-active {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul li {
        margin: 1.5rem 0;
    }

    .main-nav ul li a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: flex;
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
    }

    .btn-highlight {
        display: none;
    }

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

    .hamburger.is-active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

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

    .hero-section {
        height: auto;
        padding: 120px 0 60px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    section {
        padding: 4rem 0;
    }

    h2 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-social a {
        margin: 0 0.5rem;
    }
}
