/* Dark Theme Variables */
:root {
    --primary-color: #FF5722;
    /* Deep Orange */
    --primary-hover: #E64A19;
    --secondary-color: #9C27B0;
    /* Light Purple (Accent only) */
    --background-dark: #1F1F1F;
    /* Main Background */
    --surface-dark: #282828;
    /* Cards/Sections */
    --surface-darker: #121212;
    /* Footer/Header Contrast */
    --text-primary: #E0E0E0;
    --text-secondary: #B0B0B0;
    --text-muted: #757575;
    --border-color: #383838;

    --font-heading: 'SF Pro Display', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global Reset & Typography */
body {
    background-color: var(--background-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Header / Navbar */
#header {
    background: rgba(31, 31, 31, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

#header .logo h1 a {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar a,
.navbar a:focus {
    color: var(--text-secondary);
    font-weight: 500;
}

.navbar a:hover,
.navbar .active,
.navbar .active:focus,
.navbar li:hover>a {
    color: var(--primary-color);
}

.navbar .getstarted,
.navbar .getstarted:focus {
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 10px 25px;
}

.navbar .getstarted:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* Mobile Nav */

/* Mobile Nav */

/* Mobile Nav */
.navbar-mobile {
    background: var(--surface-dark);
}

.navbar-mobile a {
    color: var(--text-primary);
}

/* Hero Section */
#hero {
    background: var(--background-dark);
    height: auto;
    min-height: 50vh;
    /* Reduced from 80vh */
    padding-top: 100px;
    padding-bottom: 40px;
}

#hero h1 {
    font-size: 3rem;
    /* Slightly smaller */
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #FF5722 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero h2 {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 30px;
}

#hero .btn-get-started {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: #fff;
    border-radius: 8px;
    padding: 10px 30px;
    font-weight: 600;
    font-size: 1rem;
}

#hero .btn-get-started:hover {
    background: transparent;
    color: var(--primary-color);
}

#hero .btn-outline-primary {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 30px;
    font-weight: 600;
    font-size: 1rem;
    margin-left: 15px;
    transition: all 0.3s ease;
}

#hero .btn-outline-primary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#hero .btn-secondary-link {
    margin-left: 20px;
    color: var(--text-secondary);
    font-weight: 500;
}

#hero .btn-secondary-link:hover {
    color: var(--primary-color);
}

/* Sections General */
section {
    background-color: var(--background-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.section-bg {
    background-color: var(--surface-dark);
}

.section-title h2 {
    color: var(--text-primary);
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.section-title h2::after {
    background: var(--primary-color);
}

.section-title p {
    color: var(--text-secondary);
}

/* Global Text Overrides (Fix for invisible Qsense text) */
p,
li {
    color: var(--text-secondary);
}

/* Cards (Services / Features) - Stronger Selectors */
section .card,
section .icon-box,
.services .icon-box,
.more-services .card {
    background: var(--surface-dark) !important;
    /* Force dark background */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section .card:hover,
section .icon-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.icon-box .icon i {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.icon-box h4,
.card-title {
    margin-top: 15px;
    margin-bottom: 15px;
}

.icon-box h4 a,
.card-title a {
    color: var(--text-primary) !important;
}

/* Fix for QuantaCloud icon structure (Direct i.icon child) */
.icon-box i.icon {
    color: var(--primary-color);
    font-size: 3.5rem;
    /* Increased size */
    margin-bottom: 15px;
    display: block;
}

/* Fix for Index icon structure (Wrapper div.icon) */
.icon-box .icon i {
    color: var(--primary-color);
    font-size: 3rem;
    /* Index icons */
}

.icon-box h3,
.icon-box h4,
.card-title,
#services .icon-box h3 {
    margin-top: 15px;
    margin-bottom: 15px;
    color: var(--text-primary) !important;
    /* Forced override */
    font-size: 1.5rem;
}

.icon-box p,
.card-text {
    color: var(--text-secondary) !important;
    line-height: 1.6;
}

/* AI Agent Cards (Special Styling) */
.agent-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    height: 100%;
    /* Ensure full height */
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.agent-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.agent-header {
    padding: 24px;
    background: rgba(255, 87, 34, 0.08);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.agent-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.agent-header .badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
    vertical-align: middle;
}

.agent-body {
    padding: 24px;
    flex-grow: 1;
}

.agent-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agent-body li {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 24px 170px 1fr;
    gap: 8px;
    align-items: start;
    color: var(--text-secondary);
}

.agent-body li i {
    color: var(--primary-color);
    margin-top: 4px;
}

/* Footer */
#footer {
    background: #1a1a1a;
    /* Slightly lighter than #121212 */
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

#footer h3 {
    color: var(--text-primary);
}

#footer p {
    color: var(--text-secondary);
    /* Increased contrast */
}

#footer .footer-links a {
    color: var(--text-secondary) !important;
}

#footer .footer-links a:hover {
    color: var(--primary-color) !important;
}

/* Forms */
.form-control {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--surface-dark);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.2rem;
    }

    #hero {
        padding-top: 100px;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* Utilities */
.text-primary-color {
    color: var(--primary-color) !important;
}

.text-secondary-color {
    color: var(--secondary-color) !important;
}

.bg-dark {
    background-color: var(--background-dark) !important;
}

/* Overrides for specific existing elements */
.breadcrumbs {
    background-color: var(--surface-dark) !important;
}

.breadcrumbs h2 {
    color: var(--text-primary) !important;
}

.breadcrumbs ol li+li::before {
    color: var(--text-secondary) !important;
}

.breadcrumbs a {
    color: var(--primary-color) !important;
}

/* Qsense/Jobs specific */
.inner-page {
    background-color: var(--background-dark);
}

/* Navbar Dropdown (Submenu) Overrides */
.navbar .dropdown ul {
    background: var(--surface-dark);
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.navbar .dropdown ul a {
    color: var(--text-primary);
}

.navbar .dropdown ul li:hover>a {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Contact Text Override */
.contact .contact-about h3,
.contact .contact-about p {
    color: var(--text-primary) !important;
}



/* Case Studies (More Services) Specific Overrides */
.more-services .card {
    padding: 20px !important;
    /* Reset padding from 160px */
    background: var(--surface-dark) !important;
}

.more-services .card-body {
    background: transparent !important;
    /* Remove white bg */
    box-shadow: none !important;
    padding: 15px 0 !important;
}

.more-services .card-title a {
    color: var(--text-primary) !important;
}

.more-services .card-text {
    color: var(--text-secondary) !important;
}

.more-services .read-more a {
    color: var(--primary-color) !important;
}

.more-services .card:hover .card-title a {
    color: var(--primary-color) !important;
}

/* ==================================================================
   MOBILE RESPONSIVE STYLES
   ================================================================== */

/* ---------------------- Large Tablets (max-width: 991px) ---------------------- */
@media (max-width: 991px) {
    #hero {
        padding-top: 80px;
        padding-bottom: 30px;
        min-height: auto;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero h2 {
        font-size: 1.1rem;
    }

    #hero .hero-img img {
        max-width: 80%;
        margin: 0 auto;
        display: block;
    }

    /* Navbar mobile overlay */
    .navbar-mobile ul {
        background: var(--surface-dark);
        border: 1px solid var(--border-color);
    }

    .navbar-mobile a {
        color: var(--text-primary);
    }

    .navbar-mobile a:hover {
        color: var(--primary-color);
    }

    /* Agent Cards - 2 columns */
    #agents .row>[class*="col-"] {
        margin-bottom: 20px;
    }
}

/* ---------------------- Tablets (max-width: 768px) ---------------------- */
@media (max-width: 768px) {

    /* Hero Section - Major Overhaul */
    #hero {
        padding-top: 90px;
        padding-bottom: 40px;
        min-height: auto;
        text-align: center;
    }

    #hero .row {
        flex-direction: column-reverse;
    }

    #hero .col-lg-7 {
        order: 2;
        padding-top: 20px;
    }

    #hero .hero-img {
        order: 1;
        margin-bottom: 20px;
    }

    #hero .hero-img img {
        max-width: 60%;
        margin: 0 auto;
        display: block;
    }

    #hero h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    #hero h2 {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    /* Hero Buttons - Stack vertically */
    #hero .btn-get-started,
    #hero .btn-outline-primary {
        display: block;
        width: 100%;
        margin: 0 0 12px 0 !important;
        padding: 14px 20px;
        text-align: center;
        font-size: 0.9rem;
    }

    #hero div[data-aos="fade-up"] {
        padding: 0 15px;
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 1.5rem;
        padding: 0 10px;
    }

    .section-title h2::before,
    .section-title h2::after {
        width: 30px;
    }

    .section-title p {
        font-size: 0.9rem;
        padding: 0 15px;
    }

    /* General Section Padding */
    section {
        padding: 40px 0;
    }

    /* Platform Ecosystem Cards */
    .services .icon-box {
        padding: 20px;
        margin-bottom: 20px;
    }

    .services .icon-box h4.title {
        font-size: 1.2rem;
    }

    .services .icon-box p.description {
        font-size: 0.9rem;
    }

    /* Agent Cards */
    .agent-card {
        margin-bottom: 20px;
    }

    .agent-header {
        padding: 18px;
    }

    .agent-header h3 {
        font-size: 1.3rem;
    }

    .agent-body {
        padding: 18px;
    }

    .agent-body li {
        grid-template-columns: 22px 1fr;
        gap: 10px;
        font-size: 0.9rem;
    }

    .agent-body li strong {
        display: block;
        margin-bottom: 2px;
    }

    .agent-body li span {
        display: block;
    }

    /* Case Studies Cards */
    .more-services .card {
        margin-bottom: 20px;
    }

    .more-services .card-body {
        padding: 15px !important;
    }

    .more-services .card-title {
        font-size: 1.1rem;
    }

    .more-services .card-text {
        font-size: 0.9rem;
    }

    /* Contact Section */
    .contact {
        padding: 40px 0;
    }

    .contact .contact-about {
        text-align: center;
        margin-bottom: 30px;
    }

    .contact .contact-about h3 {
        font-size: 1.5rem;
    }

    .contact .info {
        text-align: center;
        margin-bottom: 30px;
    }

    .contact .info i {
        float: none;
        display: block;
        margin-bottom: 10px;
    }

    .contact .info p {
        padding-left: 0;
    }

    /* Footer */
    #footer {
        text-align: center;
    }

    #footer .row {
        flex-direction: column;
    }

    #footer .footer-links {
        margin-top: 20px;
    }

    #footer .footer-links a {
        padding: 0 10px;
    }

    /* Breadcrumbs */
    .breadcrumbs {
        padding: 12px 0;
    }

    .breadcrumbs h2 {
        font-size: 1.3rem;
        text-align: center;
    }

    .breadcrumbs ol {
        justify-content: center;
    }

    /* Features Section (QuantaCloud) */
    .features .row>.col-lg-6:first-child {
        margin-bottom: 30px;
    }

    .features .row>.col-lg-6:first-child img {
        max-width: 80%;
        margin: 0 auto;
        display: block;
    }

    .features .feature-box {
        padding: 15px;
    }

    .features .feature-box h3 {
        font-size: 0.9rem;
    }

    /* Alt Services / Benefits Section */
    .alt-services .img-bg {
        min-height: 250px;
        margin-bottom: 30px;
        border-radius: 12px;
    }

    .alt-services h3 {
        font-size: 1.4rem;
        text-align: center;
    }

    .alt-services>.container>.row>.col-lg-5>p {
        text-align: center;
    }

    .alt-services .icon-box {
        padding: 15px;
    }

    .alt-services .icon-box h4 {
        font-size: 1rem;
    }

    .alt-services .icon-box p {
        font-size: 0.9rem;
    }

    /* CTA Section */
    .cta {
        padding: 40px 0;
        text-align: center;
    }

    .cta h3 {
        font-size: 1.4rem;
    }

    .cta p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .cta .cta-btn {
        display: inline-block;
        padding: 12px 30px;
    }
}

/* ---------------------- Small Mobile (max-width: 576px) ---------------------- */
@media (max-width: 576px) {

    /* Hero - Extra Small */
    #hero {
        padding-top: 80px;
    }

    #hero h1 {
        font-size: 1.5rem;
    }

    #hero h2 {
        font-size: 0.85rem;
    }

    #hero .hero-img img {
        max-width: 70%;
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 1.3rem;
    }

    .section-title h2::before,
    .section-title h2::after {
        display: none;
    }

    /* Agent Cards - Single Column Full Width */
    .agent-body li {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .agent-body li i {
        display: none;
    }

    .agent-body li strong {
        color: var(--primary-color);
    }

    /* Services icon-box */
    .services .icon-box {
        padding: 15px;
    }

    .services .icon i {
        font-size: 48px;
    }

    /* Contact Form */
    .contact .php-email-form button[type=submit] {
        width: 100%;
    }

    /* Footer links */
    #footer .footer-links a {
        display: block;
        padding: 8px 0;
    }
}

/* ---------------------- Extra Small Mobile (max-width: 400px) ---------------------- */
@media (max-width: 400px) {
    #hero h1 {
        font-size: 1.3rem;
    }

    #hero h2 {
        font-size: 0.8rem;
    }

    .section-title h2 {
        font-size: 1.2rem;
    }

    .agent-header h3 {
        font-size: 1.1rem;
    }

    .agent-body {
        padding: 15px;
    }

    .agent-body li {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
}