/* Base Styles - Following new_index.html visual design */
:root {
    /* Color System - Matching new_index.html */
    --primary-bg: #000000;
    --secondary-bg: #111111;
    --card-bg: #0c0c0c;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-tertiary: #888888;
    --accent-color: rgba(139, 92, 246, 1); /* Purple accent from new_index.html */
    --accent-hover: rgb(106, 52, 232);
    
    /* Spacing System */
    --section-padding: 100px 0;
    --transition: all 0.3s ease;
    
    /* Layout */
    --container-padding: 20px;
    --border-radius-sm: 5px;
    --border-radius-md: 10px;
    --border-radius-lg: 50px; /* Rounded buttons */
    
    /* Shadows from new_index.html */
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-button: 0 5px 15px rgba(225, 143, 228, 0.137);
    --shadow-button-hover: 0 8px 20px rgba(178, 74, 226, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Typography System - Matching new_index.html fonts */
body {
    font-family: 'Muli', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Hierarchy - Matching new_index.html */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Work Sans', sans-serif;
    font-weight: normal;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-family: 'Inter', sans-serif;
    font-size: 6rem;
    color: white;
    margin-bottom: 20px;
}

h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
}

h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

h5 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

h6 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Body Text */
p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

p.lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Hero tagline - Matching new_index.html positioning */
.primary {
    font-size: 1.5rem;
    margin-left: 1.5rem;
    margin-top: -2.5rem;
    margin-bottom: 0rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout System */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

/* Section Titles - Matching new_index.html style */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    z-index: 9999;
}

/* Purple underline bar - Matching new_index.html */
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

.section-divider {
    display: none; /* Use the h2::after instead */
}

/* Button System - Matching new_index.html exactly */
.btn {
    font-family: 'Work Sans', sans-serif;
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: var(--border-radius-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    font-size: 14px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-button-hover);
    color: white;
}

.btn:active {
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
}

.btn-large {
    padding: 16px 40px;
    font-size: 16px;
    min-height: 56px;
}

.btn i {
    font-size: 0.9em;
}

/* Particles */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: var(--primary-bg);
    z-index: 1;
}

/* Header & Navigation - Matching new_index.html */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.header.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo - Matching new_index.html DM Serif Display */
.logo {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(3rem, 8vw, 8rem);
    color: white;
    text-decoration: none;
    line-height: 1;
}

.logo span {
    color: var(--accent-color);
}

/* Navigation Links - Matching new_index.html */
.nav-links {
    font-family: 'Work Sans', sans-serif;
    display: flex;
    list-style: none;
    justify-content: flex-end;
    width: 100%;
    font-size: 1.2rem;
    gap: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 300;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Hero Section - Matching new_index.html */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.7), var(--primary-bg));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero .primary {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.7s;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.9s;
    margin-top: 5rem;
    margin-left: 1.5rem;
}

.hero-buttons .btn {
    margin-right: 15px;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
.about {
    background-color: var(--secondary-bg);
    z-index: 100;
}

.about-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 48px;
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about-image img {
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Services Section - Matching new_index.html exactly */
.services {
    background-color: var(--primary-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    grid-gap: 30px;
    margin-top: 60px;
}

/* Service Card - Matching new_index.html design exactly */
.service-card {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius-md);
    padding: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--shadow-card);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card-hover);
}

.service-card:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Purple top accent line - Matching new_index.html */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 2;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Service Icon - Matching new_index.html */
.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-tertiary);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Read More Link - Matching new_index.html */
.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--accent-hover);
}

.read-more:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.read-more i {
    margin-left: 5px;
    transition: var(--transition);
    font-size: 0.8em;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Contact Section - Matching new_index.html */
.contact {
    background-color: var(--primary-bg);
    z-index: 100;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    padding-right: 50px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

/* Form System - Matching new_index.html */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: var(--accent-color);
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: 'Muli', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    min-height: 44px;
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-control:hover {
    border-color: var(--text-tertiary);
    background-color: rgba(255, 255, 255, 0.1);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Form validation states */
.form-control.error {
    border-color: #ff3b30;
    background-color: rgba(255, 59, 48, 0.05);
}

.form-control.error:focus {
    border-color: #ff3b30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.form-control.success {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.05);
}

.form-control.success:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
    padding-top: 15px;
}

.form-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 32px;
}

/* Form Messages */
.form-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
    background-color: rgba(255, 87, 34, 0.1);
    color: #FF5722;
    border: 1px solid rgba(255, 87, 34, 0.3);
}

/* Footer - Matching new_index.html */
.footer {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 60px 0 30px;
    position: relative;
    width: 100%;
    clear: both;
    margin-top: 2rem;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--text-primary);
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-tertiary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}



/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow::after {
        animation: none;
    }
    
    .scroll-indicator:hover {
        transform: translateX(-50%);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .scroll-indicator {
        background: rgba(0, 0, 0, 1);
        border-color: rgba(139, 92, 246, 1);
    }
    
    .scroll-progress-ring .progress-bg {
        stroke: rgba(139, 92, 246, 0.5);
    }
    
    .scroll-mouse {
        border-color: rgba(139, 92, 246, 1);
    }
    
    .scroll-text {
        color: rgba(139, 92, 246, 1);
    }
}

/* Scroll Down Button */
.scroll-down {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.scroll-down.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-down:hover {
    background: rgba(139, 92, 246, 0.9);
    transform: scale(1.1);
    box-shadow: 
        0 12px 35px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.scroll-down:active {
    transform: scale(0.95);
}

.scroll-down i {
    font-size: 20px;
    color: white;
    transition: transform 0.3s ease;
}

.scroll-down:hover i {
    transform: translateY(2px);
}

/* Adjust back-to-top position when scroll-down is visible */
.back-to-top {
    bottom: 30px;
    right: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-down.show ~ .back-to-top {
    bottom: 90px; /* Move up when scroll-down is visible */
}

@media (max-width: 768px) {
    /* Hero section mobile adjustments */
    .hero h1 {
        font-size: 4rem;
        margin-bottom: 15px;
    }
    
    .primary {
        font-size: 1.2rem;
        margin-left: 0;
        margin-top: -1.5rem;
        text-align: left;
    }
    
    .hero-buttons {
        margin-top: 3rem;
        margin-left: 0;
        text-align: left;
    }
    
    .hero-buttons .btn {
        margin-right: 15px;
        margin-bottom: 15px;
        display: inline-block;
        width: auto;
        max-width: none;
        margin-left: 0;
    }
    
    /* Navigation mobile adjustments */
    .nav-links {
        display: none;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.95);
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links li {
        margin-left: 0;
        margin-bottom: 15px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* About section mobile adjustments */
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-text {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    /* Services grid mobile adjustments */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Contact section mobile adjustments */
    .contact-content {
        flex-direction: column;
    }
    
    .contact-info {
        padding-right: 0;
        margin-bottom: 30px;
        text-align: center;
    }
    
    /* Footer mobile adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Scroll down button adjustments */
    .scroll-down {
        bottom: 25px;
        right: 25px;
        width: 45px;
        height: 45px;
    }
    
    .scroll-down i {
        font-size: 18px;
    }
    
    .scroll-down.show ~ .back-to-top {
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    /* Hero section small mobile adjustments */
    .hero h1 {
        font-size: 3rem;
        margin-bottom: 10px;
    }
    
    .primary {
        font-size: 1rem;
        margin-top: -1rem;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .hero-buttons .btn {
        max-width: 200px;
        font-size: 12px;
        padding: 10px 20px;
    }
    
    /* Section padding adjustments */
    .section {
        padding: 60px 0;
    }
    
    /* Container padding adjustments */
    .container {
        padding: 0 15px;
    }
    
    /* Services grid small mobile adjustments */
    .services-grid {
        gap: 15px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    /* Footer small mobile adjustments */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        gap: 20px;
    }
    
    /* Scroll down button small mobile adjustments */
    .scroll-down {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .scroll-down i {
        font-size: 16px;
    }
    
    .scroll-down.show ~ .back-to-top {
        bottom: 70px;
    }
}