/* 
  Quadifly IT Consulting - Global Styles
  Corporate Style: Deep Blue, Slate Gray, Clean White
*/

:root {
    --primary-color: #003366; /* Deep Corporate Blue */
    --secondary-color: #00aaff; /* Modern Tech Blue */
    --accent-color: #f39c12; /* Professional Orange Accent */
    --text-dark: #333333;
    --text-light: #f9f9f9;
    --bg-light: #f4f7f6;
    --transition: all 0.3s ease;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden !important;
}

/* Global Reset for Horizontal Scroll Fix */
* {
    box-sizing: border-box;
}

/* Fix for AOS and other horizontal overflow causes */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Ensure no horizontal scroll on all pages */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.container, .container-fluid {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Navigation Styling */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 1rem 0 !important;
    transition: var(--transition);
    z-index: 1050;
    width: 100% !important;
    max-width: 100% !important;
}

.navbar-scrolled {
    padding: 0.5rem 0 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
    letter-spacing: -1px;
}

.navbar-brand span {
    color: var(--secondary-color);
}

.nav-link {
    font-weight: 600;
    color: var(--primary-color) !important;
    margin: 0 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar Toggler Fix */
.navbar-toggler {
    border-color: var(--secondary-color);
    padding: 0.5rem;
}

.navbar-brand {
    margin-right: 1rem;
}

@media (max-width: 991.98px) {
    .navbar > .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        display: flex;
        flex-direction: row;
        justify-content: flex-start; /* Keeps the toggler on the left */
        align-items: center;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        position: relative; /* Base for absolute positioning of the brand */
        min-height: 50px;
    }

    .navbar-toggler {
        order: 1;
        position: relative;
        z-index: 10;
        margin-right: 0;
    }

    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        order: 2;
        margin: 0 !important;
        padding: 0;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-collapse {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 575.98px) {
    .navbar-toggler {
        padding: 0.25rem;
    }
    .navbar-brand {
        font-size: 1.1rem; 
        margin-left: 0;
    }
    .navbar-logo {
        height: 24px;
    }
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 170, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 51, 102, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Logo Styles */
.navbar-logo {
    height: 35px; /* Increased from 28px */
    width: auto;
    transition: var(--transition);
}

.footer-logo {
    height: 45px; /* Increased from 35px */
    width: auto;
    margin-bottom: 1.2rem;
}

/* Hero Slideshow Styles */
.hero-slider .carousel-item {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-slider .carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.7); /* Corporate blue overlay */
    z-index: 1;
}

.hero-slider .carousel-container {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    width: 100%;
    z-index: 2;
    color: white;
}

.hero-slider .carousel-title {
    font-family: 'Roboto', sans-serif;
    font-size: 4.5rem;
    font-weight: 900; /* Ultra bold for hero title */
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    letter-spacing: -1px;
}

.hero-slider .carousel-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 300; /* Light weight for elegant contrast */
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.2s;
    letter-spacing: 0.5px;
}

.hero-slider .carousel-btns {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.4s;
}

.hero-slider .active .carousel-title,
.hero-slider .active .carousel-subtitle,
.hero-slider .active .carousel-btns {
    opacity: 1;
    transform: translateY(0);
}

.carousel-fade .carousel-item {
    transition-duration: 1.5s;
}

/* Animations for Slides */
@keyframes zoomInEffect {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.hero-slider .active img {
    animation: zoomInEffect 10s infinite alternate;
}

/* Fix for Hero Section default */
.hero-section {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #001a33 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section-static {
    background: linear-gradient(135deg, var(--primary-color) 0%, #001a33 100%);
    color: white;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--secondary-color);
    border: none;
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background-color: #0088cc;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.4);
}

/* Section Styling */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background-color: var(--secondary-color);
    bottom: -10px;
    left: 0;
}

/* Card Styling */
.card-custom {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    height: 100%;
    padding: 30px;
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
    padding-left: 5px;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* New Content Sections Styles */

/* Stats Counter */
.stats-section {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0;
}

.stat-item h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Testimonials */
.testimonial-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    position: relative;
}

.testimonial-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    color: rgba(0, 170, 255, 0.1);
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.author-info h5 {
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.author-info span {
    font-size: 0.9rem;
    color: #777;
}

/* Timeline (About Page) */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    width: 50%;
    padding: 0 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    position: absolute;
    border-radius: 50%;
    top: 10px;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-date {
    font-weight: 800;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Team Section */
.team-card {
    text-align: center;
    overflow: hidden;
    border-radius: 15px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-img-wrapper {
    position: relative;
    overflow: hidden;
}

.team-img-wrapper img {
    transition: transform 0.5s ease;
}

.team-card:hover .team-img-wrapper img {
    transform: scale(1.1);
}

.team-social {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(0, 51, 102, 0.9);
    padding: 10px 0;
    transition: var(--transition);
}

.team-card:hover .team-social {
    bottom: 0;
}

.team-social a {
    color: white;
    margin: 0 10px;
    font-size: 1.1rem;
}

.team-info {
    padding: 25px;
}

.team-info h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.team-info span {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* FAQ Section (Services Page) */
.accordion-item {
    border: none;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border-radius: 10px !important;
    overflow: hidden;
}

.accordion-button {
    font-weight: 700;
    color: var(--primary-color);
    padding: 20px;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bg-light);
    color: var(--secondary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,0.125);
}

/* Process Section */
.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 20px;
    border: 5px solid white;
    box-shadow: 0 0 0 5px var(--bg-light);
}

/* AI & ML Specific Styles */
.ai-glow-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 170, 255, 0.2);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 35px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ai-glow-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 170, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.ai-glow-card:hover::before {
    opacity: 1;
}

.ai-glow-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 30px rgba(0, 170, 255, 0.2);
    transform: translateY(-5px);
}

.pulse-animation {
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 170, 255, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(0, 170, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 170, 255, 0); }
}

.circuit-pattern {
    background-image: radial-gradient(var(--secondary-color) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-section span {
    color: var(--secondary-color);
    text-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
}

/* Fix chart placeholders in high contrast sections */
.high-contrast-section .analysis-chart-placeholder {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.high-contrast-section .chart-bar {
    background: var(--secondary-color) !important;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
}

.high-contrast-section .chart-bar:nth-child(even) {
    background: #ffffff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.ai-gradient-bg {
    background: #001a33 !important; /* Solid fallback */
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #004d99 100%) !important;
    color: white !important;
    border: none;
}

/* Color Utilities */
.text-primary-custom { color: var(--primary-color) !important; }
.text-secondary-custom { color: var(--secondary-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }
.bg-secondary-custom { background-color: var(--secondary-color) !important; }

/* High Contrast Section for visibility fixes */
.high-contrast-section {
    background-color: #001a33 !important;
    background: linear-gradient(135deg, #001a33 0%, #002244 100%) !important;
    color: #ffffff !important;
}

.high-contrast-section h1,
.high-contrast-section h2,
.high-contrast-section h3,
.high-contrast-section h4,
.high-contrast-section h5,
.high-contrast-section p,
.high-contrast-section span,
.high-contrast-section li {
    color: #ffffff !important;
}

.high-contrast-section .section-title::after {
    background-color: var(--secondary-color) !important;
}

.ai-gradient-bg .section-title::after {
    background-color: var(--secondary-color) !important;
}

.ai-gradient-bg .analysis-chart-placeholder {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-gradient-bg .chart-bar {
    background: var(--secondary-color) !important;
}

.ai-gradient-bg .chart-bar:nth-child(even) {
    background: #ffffff !important;
}

.ai-gradient-bg h1, 
.ai-gradient-bg h2, 
.ai-gradient-bg h3, 
.ai-gradient-bg h4, 
.ai-gradient-bg h5, 
.ai-gradient-bg p, 
.ai-gradient-bg li, 
.ai-gradient-bg span {
    color: white !important;
}

.ai-gradient-bg .opacity-90 {
    opacity: 0.9 !important;
}

.ai-gradient-bg .opacity-25 {
    opacity: 0.25 !important;
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.ai-feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    transition: var(--transition);
}

.ai-feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
    transform: translateY(-10px);
}

.ai-icon-box {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 25px;
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.3);
}

.analysis-chart-placeholder {
    background: #f0f4f8;
    border-radius: 15px;
    height: 300px;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    gap: 15px;
}

.chart-bar {
    flex: 1;
    background: var(--secondary-color);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    transition: height 1s ease-out;
}

.chart-bar:nth-child(even) {
    background: var(--primary-color);
}

.data-node {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--secondary-color);
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.2);
    display: inline-block;
    margin: 10px;
    font-weight: 700;
    color: var(--primary-color) !important; /* Force visibility */
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.data-node:hover {
    background: var(--secondary-color);
    color: white !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 170, 255, 0.4);
}

.high-contrast-section .data-node {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.high-contrast-section .data-node:hover {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color);
}

.tech-tag {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 170, 255, 0.1);
    color: var(--secondary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 5px;
    border: 1px solid rgba(0, 170, 255, 0.2);
}

.ai-step-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border-top: 5px solid var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 100%;
    transition: var(--transition);
}

.ai-step-card:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.ai-step-number {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(0, 170, 255, 0.1);
    line-height: 1;
    margin-bottom: 10px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    transform: scale(1.1);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.whatsapp-float i {
    margin-top: 2px;
}

@media (max-width: 767px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}

/* Responsive Timeline */
@media (max-width: 767px) {
    .timeline::before {
        left: 30px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left !important;
    }
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-dot {
        left: 20px !important;
    }
}
