/* =================================================================
   BASE & UTILITY STYLES
================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #6C00D0;
    --accent: #E6BF00;
    --dark: #0A0A0A;
    --darker: #050505;
    --light: #FFFFFF;
    --gray: #7E7E7E;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

h1 { font-size: clamp(2.5rem, 8vw, 5rem); }
h2 { font-size: clamp(2rem, 6vw, 3.5rem); color: var(--accent); }
h3 { font-size: 1.5rem; }
p { color: rgba(255, 255, 255, 0.8); }

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.4s var(--ease-out);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
    position: relative;
}

/* =================================================================
   COMPONENTS (Buttons, Preloader)
================================================================= */

/* THIS IS THE FIX: Unified button styles */
.btn, .read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s var(--ease-out);
    border: none;
    background: var(--primary);
    color: var(--light);
}

.btn:hover, .read-more:hover {
    background: var(--accent);
    color: var(--darker);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(108, 0, 208, 0.3);
}

.btn-primary { margin-right: 0.75rem; }
.btn-secondary { margin-left: 0.75rem; }
.read-more { margin-top: auto; }


.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s var(--ease-out);
}
.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}
.preloader-content { text-align: center; }
.preloader h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--accent);
    margin-bottom: 2rem;
    animation: textFade 2s infinite alternate;
}
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(230, 191, 0, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes textFade {
    from { opacity: 0.7; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1.05); }
}

/* =================================================================
   HEADER & NAVIGATION
================================================================= */
header {
    position: sticky;
    top: 0;
    background: #000;
    padding: 1rem 0;
    z-index: 1000;
    height: 100px;
    display: flex;
    align-items: center;
    transition: height 0.3s ease, background-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-desktop {
    width: 210px;
    height: auto;
    display: block;
}
.logo-mobile {
    display: none;
}
.logo:hover { 
    transform: scale(1.05); 
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.nav-menu a {
    font-weight: 500;
    position: relative;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out);
}
.nav-menu a:hover::after { width: 100%; }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 150%; 
    left: 50%;
    transform: translateX(-50%);
    background: var(--darker);
    border-radius: 0.5rem;
    padding: 1rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: 100%;
}
.dropdown-menu a {
    display: block;
    padding: 0.5rem 0;
}
.dropdown-menu a::after { display: none; }

.hamburger {
    display: none; 
    cursor: pointer;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: var(--light);
    transition: all 0.4s var(--ease-in-out);
}
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =================================================================
   SECTION STYLES
================================================================= */
#home {
    background-color: #923cb5;
    background-image: linear-gradient(240deg, #561470 0%, #000000 74%);
    height: calc(100vh - 100px);
    display: flex;
    align-items: center;
}
#home .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}
.hero-content { flex: 1; max-width: 800px; }
.hero-content h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #FFD600, #6C00D0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}
.logo-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
}
.rotating-logo {
    width: 100%;
    max-width: 500px;
    animation: smooth-rotate 60s linear infinite;
}
@keyframes smooth-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
#about .content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}
#about h2 span {
    display: block;
    font-size: 1.5rem;
    color: var(--light);
    text-transform: none;
    margin-top: 1rem;
}
#about .right-panel p {
    margin-bottom: 1.5rem;
}
#about .right-panel p:last-child {
    margin-bottom: 0;
}
#past-projects {
    background: linear-gradient(135deg, #F5F5F5 0%, #FFFFFF 100%);
}
#past-projects .container { color: var(--dark); }
#past-projects h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 51px;
    letter-spacing: -0.5px;
}
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.project-item {
    background-color: #FFFFFF;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.project-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
}
.project-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.project-item h3 {
    color: #333333;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    font-size: 20px;
    font-family: 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
}
.project-item p {
    color: #666666;
    margin-bottom: 1.5rem;
    font-size: 16px;
    line-height: 1.6;
    flex-grow: 1;
}
#services {
    background: var(--darker);
}
#services h2, #team h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}
#services h2::after, #team h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent);
}
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.product-item {
    background: #1A1A1A;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s var(--ease-out);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(108, 0, 208, 0.2);
    border-color: rgba(108, 0, 208, 0.3);
}
.product-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
}
.product-item h3 {
    color: var(--light);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.product-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.team-member {
    background: #1A1A1A;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.4s var(--ease-out);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}
.team-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(108, 0, 208, 0.3);
}
.team-image { padding: 2rem 2rem 1rem; }
.team-image img {
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(108, 0, 208, 0.3);
    transition: all 0.4s ease;
}
.team-member:hover .team-image img {
    filter: grayscale(0%);
    border-color: var(--accent);
    transform: scale(1.05);
}
.team-content {
    padding: 1.5rem 1.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.team-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.team-content .role {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.team-content .description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}
#testimonials {
    text-align: center;
}
#testimonials .subtitle {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: var(--light);
}
.testimonials-container {
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
    min-height: 450px;
}
.testimonial-card {
    display: none;
    min-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.testimonial-card.active {
    display: block;
    opacity: 1;
}
.testimonial-content {
    background: #4A0091;
    border-radius: 15px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.author-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
}
.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.testimonial-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}
.author h4 {
    color: var(--accent);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}
.author .role {
    font-style: normal;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}
.carousel-prev, .carousel-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
.carousel-prev:hover, .carousel-next:hover {
    background: var(--accent);
    color: #333;
}
.progress-bar-container {
    width: 200px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s linear;
}
.carousel-dots {
    display: none;
}
#contact {
    background-color: #f5f5f5;
    color: var(--dark);
}
#contact .container {
    display: flex;
    align-items: center;
    gap: 4rem;
}
#contact .text-section { flex: 1; }
#contact .text-section h2 { color: var(--primary); }
#contact .text-section p { color: #666; }
#contact .text-section a { color: var(--primary); }
#contact .form-section {
    flex: 1;
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#contact .form-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
#contact .form-group input { flex: 1; }
#contact .form-section input, #contact .form-section textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
#contact .form-section button {
    background-color: var(--primary);
    color: var(--light);
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    float: right;
    transition: all 0.3s ease;
}
#contact .form-section button:hover {
    background-color: var(--accent);
    color: var(--dark);
}
footer {
    text-align: center;
    padding: 4rem 2rem;
    font-size: 0.9rem;
}
.footer-contact p {
    color: var(--gray);
    margin-bottom: 0.5rem;
}
.footer-contact a {
    color: var(--light);
}

/* =================================================================
   RESPONSIVE STYLES (TABLET & MOBILE)
================================================================= */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    #about .content, #contact .container {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 3rem;
    }
}
@media (max-width: 768px) {
    section { 
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    .container { 
        padding: 0 1rem;
    }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    header {
        height: 70px;
        background: #000000;
        padding: 0;
    }
    .header-container { 
        padding: 0 1rem;
    }
    
    .logo-desktop {
        display: none;
    }
    .logo-mobile {
        display: block; 
        height: 40px;
        width: auto;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hamburger { 
        display: block; 
    }
    .nav-menu {
        display: none;
    }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
    }
    .nav-menu.active a { font-size: 1.5rem; }
    .nav-menu.active .dropdown { text-align: center; }
    .nav-menu.active .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none;
        padding: 0.5rem 0 0 0;
    }
    .nav-menu.active .dropdown:hover .dropdown-menu { display: block; }
    .nav-menu.active .dropdown-menu a { font-size: 1rem; color: var(--gray); }

    #home {
        height: auto;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    #home .container { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .logo-container { 
        order: -1; 
        margin-bottom: 2rem;
        margin-top: 0;
    }
    .rotating-logo { max-width: 250px; }
    .hero-buttons { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
    .btn { width: 80%; max-width: 300px; margin: 0 !important; }
    
    .projects-container,
    .products-container,
    .team-grid {
        grid-template-columns: 1fr;
    }
    .project-item img { height: 200px; }
    
    .testimonial-content { padding: 1.5rem; }
    .author-image { width: 100px; height: 100px; }
    .testimonial-content p { font-size: 1rem; }
    
    #contact .form-group { flex-direction: column; gap: 0; }
}
