/**
 * VIRALIX DIGITAL - Global Layout Styles
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-body);
    color: var(--text-gray-light);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Three.js background canvas styling */
#three-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Custom Loader Screen */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-logo-container {
    text-align: center;
}

.loader-logo-text {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--text-white);
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 20px;
}

.loader-bar-bg {
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--gradient-hero);
    transition: width 0.3s ease;
}

/* Structure and Container Grid */
.content-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

.full-height-flex {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    color: var(--text-white);
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 20px;
}

.badge-glow {
    background: rgba(225, 103, 244, 0.08);
    border: 1px solid rgba(225, 103, 244, 0.3);
    color: var(--color-primary);
    box-shadow: 0 0 15px rgba(225, 103, 244, 0.1);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    transform: translateY(-6px);
}

.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-6px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--gradient-hero);
    color: #FFFFFF !important;
}

.btn-primary:hover {
    transform: scale(1.03);
}

.btn-secondary {
    background: #FFFFFF;
    border: 1px solid #6326E1;
    color: #6326E1 !important;
}

.btn-secondary:hover {
    background: rgba(99, 38, 225, 0.05);
    transform: scale(1.03);
}

.btn-glow:hover {
    box-shadow: 0 10px 30px rgba(168, 66, 245, 0.2);
}

/* Header & Navbar Custom Layout */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: var(--transition-smooth);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-image {
        height: 38px;
    }
}

.footer-logo-image {
    height: 55px;
    width: auto;
    display: inline-block;
    object-fit: contain;
    margin-bottom: 20px;
}

.logo-accent {
    color: var(--color-primary);
}

.logo-dot {
    color: var(--color-light-blue);
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-gray-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.desktop-nav a:hover,
.desktop-nav a.active {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Footer layout */
.main-footer {
    background: #F8FAFC;
    border-top: 1px solid var(--border-glass);
    padding: 80px 0 30px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 50px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-gray-muted);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 30px 24px 0;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-gray-muted);
    font-size: 0.85rem;
}

.legal-links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-gray-muted);
}

.legal-links a:hover {
    color: var(--text-white);
}

/* Mobile Navigation Toggle and Drawer */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1010;
    position: relative;
}

.hamburger-box {
    width: 24px;
    height: 18px;
    display: inline-block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--text-white);
    position: absolute;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    border-radius: 4px;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: "";
    top: -8px;
    left: 0;
}

.hamburger-inner::after {
    content: "";
    bottom: -8px;
    left: 0;
}

.mobile-nav-toggle.is-active .hamburger-inner {
    background-color: transparent;
}

.mobile-nav-toggle.is-active .hamburger-inner::before {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--color-primary);
}

.mobile-nav-toggle.is-active .hamburger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--color-primary);
}

.mobile-nav-drawer{position:fixed;top:0;right:-100%;width:100%;max-width:400px;height:100vh;background:rgba(255,255,255,0.95);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-left:1px solid var(--border-glass);z-index:999;transition:right 0.5s cubic-bezier(0.16,1,0.3,1), visibility 0.5s;display:flex;flex-direction:column;visibility:hidden;}.mobile-nav-drawer.nav-drawer-open{right:0;visibility:visible;}

.drawer-inner {
    height: 100%;
    padding: 100px 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-list a {
    text-decoration: none;
    color: var(--text-gray-light);
    font-family: var(--font-headings);
    font-size: 1.25rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
    color: var(--color-primary);
}

.drawer-actions {
    margin-top: 30px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Responsive CSS */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .header-actions .btn {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (min-width: 769px) {
    .mobile-nav-drawer {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: none !important;
    }
}

/* Premium circular analog timezone clocks */
.clocks-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.analog-clock-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.analog-clock-card:hover {
    transform: translateY(-8px);
}

.clock-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    position: relative;
    background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)) padding-box,
        linear-gradient(135deg, #E167F4, #A842F5, #6326E1, #2A52BE, #1D91F2) border-box;
    border: 3px solid transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(99, 38, 225, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.clock-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.clock-dot {
    position: absolute;
    background: rgba(99, 38, 225, 0.25);
    border-radius: 50%;
}

.dot-12 {
    width: 6px;
    height: 6px;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.dot-3 {
    width: 6px;
    height: 6px;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.dot-6 {
    width: 6px;
    height: 6px;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.dot-9 {
    width: 6px;
    height: 6px;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 4px;
    z-index: 5;
    transition: transform 0.15s cubic-bezier(0.4, 2.08, 0.55, 1);
}

.hour-hand {
    width: 4px;
    height: 38px;
    background: #111827;
    margin-left: -2px;
}

.minute-hand {
    width: 3px;
    height: 52px;
    background: #4B5563;
    margin-left: -1.5px;
}

.second-hand {
    width: 1.5px;
    height: 60px;
    background: #E167F4;
    /* Brand accent pink */
    margin-left: -0.75px;
    z-index: 6;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clock-center {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6326E1;
    /* Brand accent purple */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(99, 38, 225, 0.6);
}

@media (max-width: 992px) {
    .clocks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .clocks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clocks-grid .analog-clock-card:nth-child(n+3) {
        display: none !important;
    }
}

/* =========================================
   GLOBAL RESPONSIVE FIXES
   ========================================= */

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.container,
.content-container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Base grids for Desktop */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

/* Decorative Elements global */
.floating-square,
.decorative-shape,
.background-shape {
    max-width: 100%;
}

@media (max-width: 992px) {

    /* Tablet: 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .contact-split-grid,
    .contact-form-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .container,
    .content-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    h1 {
        font-size: 36px !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 28px !important;
    }

    section {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    /* Fix hero section padding behind fixed header and remove vertical centering empty space */
    .hero-section,
    .page-hero,
    .hero-content,
    .contact-hero,
    .blog-hero,
    .crm-hero,
    .about-hero {
        padding-top: 140px !important;
        /* Increased to 140px to be safe */
        padding-bottom: 60px !important;
        min-height: auto !important;
        height: auto !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    /* Fix badges cut off on mobile */
    .section-badge,
    .hero-badge,
    .badge-pill,
    .badge,
    .badge-glow {
        display: inline-flex !important;
        align-items: center !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        position: relative !important;
        z-index: 2 !important;
        transform: translateY(0) !important;
    }

    /* Problem 1: Fix Services Page excessive gaps */
    .service-card,
    .service-row,
    .service-block,
    .service-section,
    .service-row-layout {
        min-height: auto !important;
        height: auto !important;
        margin-top: 0 !important;
        margin-bottom: 40px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .service-visual,
    .service-image {
        margin-bottom: 24px !important;
        min-height: auto !important;
        /* Overrides inline min-height: 350px */
    }

    .service-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Problem 2: Fix Contact Page huge empty area before footer */
    .contact-page,
    .contact-wrapper,
    .contact-content,
    .contact-container,
    .contact-split-grid,
    main,
    #main-content {
        height: auto !important;
        min-height: auto !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        display: block !important;
    }

    .contact-section {
        margin-bottom: 40px !important;
    }

    .instant-assistance {
        margin-bottom: 40px !important;
    }

    .main-footer,
    footer,
    .footer {
        margin-top: 0 !important;
    }

    /* Grids to 1 column */
    .services-grid,
    .blog-grid,
    .contact-split-grid,
    .contact-form-grid,
    .article-layout-grid,
    .founder-grid,
    .metrics-grid,
    .leader-grid,
    .values-grid,
    .achievements-grid,
    .why-grid,
    .testimonial-grid,
    .grid-columns {
        grid-template-columns: 1fr !important;
    }

    /* Buttons full width on mobile (excluding icon buttons) */
    .btn:not(.btn-icon-only) {
        width: 100%;
        text-align: center;
    }
    
    .btn-icon-only {
        width: auto !important;
    }

    /* Contact Forms */
    .contact-form .form-row {
        flex-direction: column;
    }

    /* Hide Decorative Elements on mobile */
    .floating-square,
    .decorative-shape,
    .background-shape {
        display: none !important;
    }

    /* Global Operations Section */
    .clock-card.india,
    .clock-card.usa,
    .clock-card.australia,
    .analog-clock-card.india,
    .analog-clock-card.usa,
    .analog-clock-card.australia {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .clocks-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- NEW COMPREHENSIVE RESPONSIVE FIXES --- */

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0 !important;
    }
}

html,