/* Table of Contents
--------------------
1.  Variables & Global Styles
2.  Utility Classes
3.  Header & Navigation
4.  Mobile Menu
5.  Footer
6.  Buttons & Forms
7.  Hero Section
8.  Services Section
9.  Why Choose Us Section
10. Industries Section
11. Testimonials Section
12. CTA Section
13. Subpage & Legal Content
14. Animations & Effects
15. Responsiveness (Media Queries)
-------------------- */

/* 1. Variables & Global Styles */
:root {
    --primary-color: #E53935;
    /* Strong Red from Logo */
    --secondary-color: #F9A825;
    /* Orange/Gold from Logo */
    --dark-bg: #101010;
    --medium-bg: #1a1a1a;
    --light-text: #F5F5F5;
    --medium-text: #A0A0A0;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Roboto Mono', monospace;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--dark-bg);
    color: var(--light-text);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--medium-text);
}

.section-padding {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

#neural-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

/* 2. Utility Classes */
.section-tag {
    display: inline-block;
    font-family: var(--font-secondary);
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

.highlight {
    color: var(--primary-color);
}

/* 3. Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(16, 16, 16, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.header.scrolled {
    background-color: rgba(26, 26, 26, 0.9);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo a {
    display: block;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--light-text);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 4. Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--medium-bg);
    border-bottom: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.mobile-menu.active {
    max-height: 500px;
}

.mobile-menu ul {
    list-style: none;
    padding: 1rem 0;
}

.mobile-menu li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--light-text);
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.mobile-menu li a:hover,
.mobile-menu li a.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
}

.btn-mobile {
    display: block;
    text-align: center;
    margin: 1rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 5px;
}

/* 5. Footer */
.footer {
    background-color: var(--medium-bg);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo img {
    height: 45px;
    margin-bottom: 1rem;
}

.footer-about p {
    color: var(--medium-text);
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--light-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.footer-links h4 {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--medium-text);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.footer-contact i {
    margin-top: 5px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--medium-text);
}

/* 6. Buttons & Forms */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.btn span {
    position: relative;
    z-index: 2;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #c0312e;
    border-color: #c0312e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.2);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-text);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--medium-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--light-text);
    font-family: var(--font-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.5);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

/* 7. Hero Section */
.hero-section {
    padding-top: calc(var(--header-height) + 6rem);
    padding-bottom: 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 650px;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.stat-item .stat-number {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.stat-item .stat-label {
    color: var(--medium-text);
    margin-bottom: 0;
}

.hero-visual {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 50%;
    height: 100%;
    z-index: -1;
}

.sphere-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    perspective: 1000px;
}

.sphere {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, var(--primary-color), var(--dark-bg) 70%);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(50px);
    animation: rotateSphere 20s infinite linear;
    transform-style: preserve-3d;
}

@keyframes rotateSphere {
    from {
        transform: rotateY(0deg) rotateX(0deg);
    }

    to {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

/* 8. Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background-color: var(--medium-bg);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.service-card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-card-title {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.service-card-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.service-card-link i {
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.service-card:hover .service-card-link i {
    transform: translateX(5px);
}

/* 9. Why Choose Us Section */
.why-choose-us-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.features-list {
    list-style: none;
    margin: 2rem 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.features-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-3d-container {
    perspective: 1500px;
}

.card-3d-content {
    background: linear-gradient(135deg, var(--medium-bg), #2a2a2a);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 15px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-3d-content i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* 10. Industries Section */
.industries-section {
    background-color: var(--medium-bg);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.industry-item {
    background-color: var(--dark-bg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.industry-item:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.industry-item:hover i {
    color: white;
}

.industry-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.industry-item span {
    font-weight: 600;
}

/* 11. Testimonials Section */
.testimonial-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    flex: 0 0 80%;
    /* Each card takes up 80% of the container width */
    padding: 2rem;
    margin: 0 1.5rem;
    text-align: center;
    background-color: var(--medium-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transform: scale(0.9);
    opacity: 0.6;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.testimonial-card.active {
    transform: scale(1);
    opacity: 1;
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.testimonial-text {
    font-size: 1.3rem;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: var(--light-text);
}

.testimonial-text::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary-color);
    line-height: 0;
    margin-right: 0.5rem;
}

.testimonial-author {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.author-name {
    margin: 0;
    color: var(--light-text);
}

.author-title {
    color: var(--medium-text);
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0;
    pointer-events: none;
    /* Let clicks pass through to elements behind */
}

.slider-controls button {
    background-color: var(--medium-bg);
    border: 1px solid var(--border-color);
    color: var(--light-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: all;
    /* Make buttons clickable */
}

.slider-controls button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.slider-controls .prev-btn {
    transform: translateX(-25px);
}

.slider-controls .next-btn {
    transform: translateX(25px);
}


.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s ease, width 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* 12. CTA Section */
.cta-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://source.unsplash.com/random/1600x900/?digital,marketing,office') no-repeat center center/cover;
    background-attachment: fixed;
}

.cta-title {
    font-size: 2.8rem;
    color: white;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--light-text);
}

/* 13. Subpage & Legal Content */
body.subpage .main-content {
    padding-top: var(--header-height);
}

.page-header-section {
    padding: 6rem 0;
    text-align: center;
    background-color: var(--medium-bg);
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 3rem;
    color: var(--light-text);
}

.page-subtitle {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.contact-section .contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-form-wrapper,
.contact-info-wrapper {
    background-color: var(--medium-bg);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-info-list {
    margin-top: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-info-item h4 {
    margin-bottom: 0.25rem;
    color: var(--light-text);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--medium-bg);
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-icon i {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
}

.legal-content-section .legal-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--medium-bg);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--light-text);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-content ul {
    list-style-position: inside;
    margin-left: 1rem;
}


/* 14. Animations & Effects */
.animate-item {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-item[data-animation="fade-in"] {
    transform: translateY(20px);
}

.animate-item[data-animation="reveal-up"] {
    transform: translateY(50px);
}

.animate-item[data-animation="reveal-left"] {
    transform: translateX(-50px);
}

.animate-item[data-animation="reveal-right"] {
    transform: translateX(50px);
}

.animate-item.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}


/* 15. Responsiveness (Media Queries) */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .nav,
    .header-actions .btn-primary {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-section {
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .why-choose-us-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .features-list {
        text-align: left;
        max-width: 400px;
        margin: 2rem auto;
    }

    .contact-section .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .section-padding {
        padding: 4rem 0;
    }

    .hero-section {
        padding-top: calc(var(--header-height) + 4rem);
        padding-bottom: 4rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-about,
    .footer-links,
    .footer-contact {
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
        text-align: left;
    }

    .testimonial-card {
        flex: 0 0 90%;
        margin: 0 1rem;
    }

    .slider-controls {
        display: none;
        /* Hide side arrows on mobile for a cleaner look */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .testimonial-text {
        font-size: 1.2rem;
    }
}