/* =================================================================
   RESET & BASE STYLES
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #fff;
    background-color: #000;
}

/* =================================================================
   LAYOUT UTILITIES
   ================================================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =================================================================
   TYPOGRAPHY
   ================================================================= */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 3em; }
h2 { font-size: 2.5em; }
h3 { font-size: 2em; }
h4 { font-size: 1.75em; }
h5 { font-size: 1.5em; }
h6 { font-size: 1.25em; }

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 16px;
}

/* =================================================================
   HEADER & NAVIGATION
   ================================================================= */
header {
    background-color: #111;
    padding: 1rem 0;
    border-bottom: 2px solid #00ffcc;
}

header h1 {
    color: #00ffcc;
    margin: 0;
    font-size: 2.5em;
    text-align: center;
}

/* Modern navigation with backdrop blur */
nav {
    position: relative;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .nav-links {
        /* ... existing styles ... */
        
        /* Fix 2: Ensure proper positioning */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: inherit;
    }
    
    .nav-links.active {
        display: flex;
        /* ... other active styles ... */
    }
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ffcc;
    text-decoration: none;
}

header nav ul,
.nav-links {
    list-style: none;
    padding: 0;
    text-align: center;
    display: flex;
    gap: 2rem;
}

header nav ul li {
    display: inline-block;
    margin: 0 15px;
}

header nav ul li a,
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s;
}

header nav ul li a:hover,
.nav-links a:hover {
    color: #00ffcc;
    opacity: 0.8;
}

/* =================================================================
   HERO SECTIONS
   ================================================================= */
#hero,
.hero {
    color: #fff;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Add this to contain the video */
}

/* Video background for modern hero */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 800px;
    z-index: 1;
    position: relative; /* Add this to ensure proper stacking */
}

#hero h2,
.tagline {
    font-size: 2.8em;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #00ffcc;
    line-height: 1.2;
}

#hero p,
.subtitle {
    font-size: 1.2em;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* =================================================================
   MAIN CONTENT & SECTIONS
   ================================================================= */
main section,
.section {
    padding: 3rem 0;
    border-bottom: 1px solid #222;
}

main section:last-child {
    border-bottom: none;
}

main h2,
.section h2 {
    font-size: 2.2em;
    color: #00ffcc;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* =================================================================
   CARDS & GRIDS
   ================================================================= */
.expertise-grid,
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.expertise-item,
.expertise-card,
.option-card {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #00ffcc20;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.expertise-item:hover,
.expertise-card:hover,
.option-card:hover {
    transform: translateY(-5px);
}

.expertise-item h3,
.expertise-card h3,
.option-card h3 {
    font-size: 1.8em;
    color: #00ffcc;
    margin-bottom: 0.5rem;
}

.expertise-item p,
.expertise-card p,
.option-card p {
    font-size: 1em;
    margin-bottom: 1rem;
    color: #ccc;
}

.option-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00ffcc;
}

/* =================================================================
   BUTTONS & LINKS
   ================================================================= */
a {
    color: #00ffcc;
    text-decoration: none;
}

a:hover {
    color: #00e6b8;
    text-decoration: underline;
}

button,
.button-link,
.cta-button,
.option-button,
.submit-button,
.expertise-item a {
    display: inline-block;
    padding: 0.75em 1.5em;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    background-color: #00ffcc;
    color: #000;
    text-decoration: none;
    transition: all 0.3s;
}

button:hover,
.button-link:hover,
.cta-button:hover,
.option-button:hover,
.submit-button:hover,
.expertise-item a:hover {
    background-color: #00e6b8;
    color: #000;
    text-decoration: none;
    transform: translateY(-2px);
}

.cta-button {
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.cta-button:hover {
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.back-link {
    text-align: center;
    margin-top: 2rem;
}

.back-link a {
    color: #00ffcc;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* =================================================================
   FORMS
   ================================================================= */
.form-section {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
    display: none;
}

.form-section.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #00ffcc;
}

.form-group input,
.form-group textarea,
.form-group select,
input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #00ffcc;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #000;
    color: #fff;
}

input[type="text"] {
    display: block;
    width: 50%;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Radio buttons */
input[type="radio"] {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 10px 0 0;
    opacity: 0;
}

input[type="radio"]:checked + label {
    background-color: #eeeeee4f;
    border: 1px solid #ddd;
}

label {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
}

/* =================================================================
   LISTS
   ================================================================= */
ul, ol {
    padding-left: 0;
    list-style-position: inside;
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Left-aligned lists for specific sections */
#projects ul,
#contact ul,
#core-architectures ul,
#modern-client-side ul,
#iam ul,
#scalability-availability ul,
#essential-tools ul,
#ecommerce-automation ul,
#platform-integration ul,
#data-strategy ul,
#large-language-models ul,
#vector-embeddings-databases ul,
#multimodal-ai ul,
#ai-agents ul,
#local-ai-tools ul,
#cloud-ai-platforms ul,
#ai-projects ul {
    text-align: left;
    padding-left: 40px;
    list-style-position: outside;
}

/* Nested lists */
#scalability-availability ul ul,
#platform-integration ul ul,
#vector-embeddings-databases ul ul {
    text-align: left;
    margin-top: 0.5rem;
    padding-left: 20px;
}

li {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* =================================================================
   TABLES
   ================================================================= */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 1rem;
    border: 1px solid #00ffcc;
    color: #fff;
    text-align: left;
}

/* =================================================================
   IMAGES & MEDIA
   ================================================================= */
img {
    max-width: 100%;
    height: auto;
    filter: grayscale(100%);
}

iframe {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================
   HTMX SPECIFIC
   ================================================================= */
.htmx-indicator {
    display: none;
    max-width: 50%;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline;
}

/* =================================================================
   FOOTER
   ================================================================= */
footer {
    background-color: #111;
    color: #00ffcc;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 2px solid #00ffcc;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* =================================================================
   MOBILE MENU
   ================================================================= */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.mobile-menu-toggle.active {
    /* Remove any color changes - keep the same appearance as non-active state */
    background: none;
}
.mobile-menu-toggle:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.mobile-menu-toggle:active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Fix 3: Remove persistent highlight after click */
.mobile-menu-toggle:focus:not(:focus-visible) {
    outline: none;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */
@media (max-width: 768px) {
    /* Typography */
    header h1 { font-size: 2em; }
    #hero h2, .tagline { font-size: 2.2em; }
    #hero p, .subtitle { font-size: 1.1em; }
    main h2, .section h2 { font-size: 1.8em; }
    
    /* Layout */
    .container { padding: 1rem; }
    .section { padding: 3rem 1.5rem; }
    
    /* Navigation */
    header nav ul li {
        display: block;
        margin: 10px 0;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Grids */
    .expertise-grid,
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    input[type="text"] {
        width: 80%;
    }
}