/* Components */

/* Modern AI Grid Background */
.bg-grid {
    background-color: var(--color-bg); /* Use base bg color, or slightly darker if needed */
    background-image:
        linear-gradient(rgba(0, 95, 158, 0.08) 1px, transparent 1px), /* Using primary blue tint */
        linear-gradient(90deg, rgba(0, 95, 158, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    position: relative;
}

/* Toggleable vignette for BG Grid */
.bg-grid.vignette::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--color-bg) 90%);
    pointer-events: none;
}

/* Ensure content stays above the vignette overlay for readability */
.bg-grid.vignette > * {
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3) var(--spacing-8);
    background-color: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-colored);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
}

.btn-gradient {
    background: var(--color-gradient-primary);
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: rgba(0, 120, 212, 0.05);
    color: var(--color-primary-light);
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Cards (Floating Content) */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-8);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--color-border);
    position: relative;
    z-index: 1;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    border-color: var(--color-accent);
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

/* Images */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-responsive-shadow {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.img-responsive-shadow:hover {
    transform: scale(1.02);
}

/* Feature/Tech Chips */
.chip {
    display: inline-block;
    padding: var(--spacing-1) var(--spacing-3);
    background: linear-gradient(to right, rgba(0, 120, 212, 0.1), rgba(0, 183, 195, 0.1));
    color: var(--color-primary);
    border: 1px solid rgba(0, 120, 212, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-right: var(--spacing-2);
    margin-bottom: var(--spacing-2);
}

/* Icon Box */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: rgba(0, 120, 212, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-4);
    font-size: 32px; /* Adjust based on icon library sizing */
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-6);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-2);
    font-weight: 600;
    color: var(--color-text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--color-bg-alt);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1);
}

/* Timeline (About Page) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-12) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--color-border);
    transform: translateX(-50%);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-8);
    position: relative;
    margin-bottom: var(--spacing-12);
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-content {
    background: var(--color-surface);
    padding: var(--spacing-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
    border: 1px solid var(--color-border);
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: var(--spacing-2);
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Alternating Layout */
.timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
    text-align: right;
}

/* Markers */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 50%;
    border: 4px solid var(--color-bg);
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .timeline::before { left: 20px; }
    .timeline-item { display: block; padding-left: 50px; }
    .timeline-item::after { left: 20px; }
    .timeline-item:nth-child(odd) .timeline-content { text-align: left; }
}

/* Service Cards */
.card-service {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-service:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.card-service-image {
    height: 200px;
    background-color: var(--color-surface);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.card-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-service:hover .card-service-image img {
    transform: scale(1.05);
}

.card-service-content {
    padding: var(--spacing-6);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-service-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-3);
    color: var(--color-primary);
}

.card-service-text {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-6);
    flex-grow: 1;
}

.card-service-footer {
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop by default */
    background: transparent;
    border: none;
    color: #0078D4 !important; /* Force Primary Blue with priority */
    font-size: 2.5rem; /* Make it bigger */
    cursor: pointer;
    padding: var(--spacing-2);
    z-index: 2000;
    position: relative; /* Ensure it captures clicks */
}

.mobile-menu-toggle:hover {
    color: var(--color-primary);
}

/* Optional: Rotate icon when active if class is applied */
.mobile-menu-toggle.active {
    transform: rotate(90deg);
}

/* Responsive Max Height Image Utility */
.img-max-height-responsive {
    width: 100%;
    object-fit: cover;
    max-height: 500px; 
}

@media (max-width: 1024px) {
    .img-max-height-responsive {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .img-max-height-responsive {
        max-height: 300px;
    }
}

