/* Neo Design System & Glassmorphism Global Styles */
.new-page-wrapper {
    --primary-gradient: linear-gradient(135deg, #0070bb 0%, #00d2ff 100%);
    --surface-color: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    margin: -20px 0;
    /* Offset main-content padding if any */
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    .new-page-wrapper {
        --glass-bg: rgba(16, 18, 27, 0.6);
        --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
        --surface-border: rgba(255, 255, 255, 0.05);
        --text-primary: #ffffff;
        --text-secondary: #a0a0b8;
    }
}

/* Neo Hero Section */
.hero-neo {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    overflow: hidden;
    background: #0f172a;
}

.hero-neo.hero-neo-sm {
    min-height: 50vh;
}

.hero-neo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 112, 187, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 210, 255, 0.1) 0%, transparent 30%);
    animation: rotateGradient 20s linear infinite;
    z-index: 0;
}

.hero-neo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.05)"/></svg>') repeat;
    background-size: 20px 20px;
    z-index: 1;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    color: #ffffff;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: #94a3b8;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    animation: fadeUp 1s ease-out 0.4s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeUp 1s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
    flex-wrap: wrap;
}

/* Neo Buttons */
.btn-neo {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 112, 187, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 112, 187, 0.6);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: white;
    color: white;
}

/* Services Neo */
.services-neo {
    padding: 6rem 2rem;
    background: var(--glass-bg);
}

.section-head {
    text-align: center;
    margin-bottom: 4rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-head p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card-neo {
    background: var(--glass-bg);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.card-neo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(0, 112, 187, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #0070bb;
    transition: all 0.4s ease;
}

.card-icon svg {
    width: 30px;
    height: 30px;
}

/* Fallback for Bootstrap Icons */
.card-icon i {
    font-size: 1.8rem;
}

.card-neo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 0.4s ease;
}

.card-neo p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    transition: color 0.4s ease;
}

.card-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #0070bb;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.card-link svg {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.card-neo:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-neo:hover::before {
    opacity: 1;
}

.card-neo:hover .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.card-neo:hover h3,
.card-neo:hover p,
.card-neo:hover .card-link {
    color: white;
}

.card-neo:hover .card-link svg {
    transform: translateX(5px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn-neo {
        width: 100%;
    }
}

/* Header Overrides for Neo Design */
.header {
    background: rgba(16, 18, 27, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}

.header .nav-links a {
    color: #e2e8f0 !important;
    font-weight: 600;
}

.header .nav-links a:hover {
    color: #00d2ff !important;
}

.header .nav-links a:after {
    background-color: #00d2ff !important;
}

.header .nav-toggle .hamburger,
.header .nav-toggle .hamburger:before,
.header .nav-toggle .hamburger:after {
    background: #00d2ff !important;
}

/* Adjust logo filter for dark header if necessary to improve visibility (like turning dark text to light) */
.header .logo img {
    filter: drop-shadow(0px 0px 2px rgba(255, 255, 255, 0.2));
}

@media(max-width: 768px) {
    .header .nav-links {
        background: rgba(16, 18, 27, 0.95) !important;
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}