/* 
   =========================================
   AYLENCE EXPERIENTIAL LEARNING THEME
   Premium Design System & Responsive Styles
   =========================================
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Brand Design Tokens - Light Book Theme (Blue, Red, White) */
:root {
    --bg-dark: #FFFFFF;
    /* Pure clean white background */
    --bg-deep: #FFFFFF;
    /* Pure page white */
    --bg-glass: rgba(255, 255, 255, 0.95);
    /* Clean white page glass */
    --border-glass: rgba(59, 130, 246, 0.08);
    /* Minimalist clean blue border */
    --border-glass-hover: rgba(37, 99, 235, 0.25);
    /* Active brand blue border */

    --primary: #1E3A8A;
    /* Premium Royal Oxford Blue */
    --primary-light: #3B82F6;
    /* Vibrant sky blue */
    --primary-dark: #172554;
    /* Extra deep navy */
    --accent: #E53E3E;
    /* Premium Academic Crimson Red */
    --accent-glow: rgba(229, 62, 62, 0.12);
    --warning: #EA580C;
    /* Highlighter Amber Warning */

    --text-white: #0F172A;
    /* Deep Indigo Ink for main titles */
    --text-lavender: #334155;
    /* Charcoal text for high body copy readability */
    --text-muted: #64748B;
    /* Soft slate gray notes */

    --card-shadow: 0 10px 30px rgba(59, 130, 246, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
    --glow-shadow: 0 0 20px rgba(37, 99, 235, 0.1);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, monospace;
}

/* Global Reset & Styling */
body {
    background-color: var(--bg-dark);
    color: var(--text-lavender);
    font-family: var(--font-sans);
    overflow-x: hidden;
    position: relative;
}

/* Unfolding Book Texture Grid & Ledger Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.02) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(229, 62, 62, 0.01) 0%, transparent 40%);
    z-index: -10;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-weight: 700;
}

p {
    line-height: 1.7;
    color: var(--text-muted);
}

/* Page Book-Fold Unfolding Entry Animation */
@keyframes pageUnfold {
    0% {
        transform: rotateY(-8deg) rotateX(1.5deg) translateZ(-20px);
        transform-origin: left center;
        opacity: 0;
    }

    100% {
        transform: rotateY(0deg) rotateX(0deg) translateZ(0);
        transform-origin: left center;
        opacity: 1;
    }
}

/* Premium Soft-Touch Cards with Unfold Hover Effects */
.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: pageUnfold 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: left center;
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-5px) rotateY(-2.5deg) translateZ(10px);
    box-shadow: 0 16px 36px rgba(26, 54, 93, 0.08), 0 4px 12px rgba(229, 62, 62, 0.04);
}

/* Custom Translucent Book Navbar */
.custom-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    transition: all 0.3s ease;
    z-index: 1050;
}

.custom-navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.04);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-white) !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand span {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px !important;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    margin-top: 4px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Book theme buttons with soft unfolding glow */
.btn-glow-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #FFFFFF !important;
    font-family: var(--font-heading);
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-glow-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: all 0.5s ease;
}

.btn-glow-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.25), 0 0 20px rgba(229, 62, 62, 0.12);
}

.btn-glow-primary:hover::before {
    left: 100%;
}

.btn-glass-secondary {
    background: rgba(26, 54, 93, 0.04);
    border: 1px solid rgba(26, 54, 93, 0.1);
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 10px;
    padding: 12px 28px;
    transition: all 0.3s ease;
}

.btn-glass-secondary:hover {
    background: rgba(26, 54, 93, 0.08);
    border-color: rgba(229, 62, 62, 0.25);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Custom Accent Highlights */
.text-accent-mint {
    color: var(--accent) !important;
}

.text-gradient {
    background: linear-gradient(135deg, #2563EB 0%, #E53E3E 100%);
    /* Blue to Red Gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Hero Section */
.hero-section {
    padding: 160px 0 100px 0;
    position: relative;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-deep) 100%);
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26, 54, 93, 0.06);
    border: 1px solid rgba(26, 54, 93, 0.12);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-tag i {
    color: var(--accent);
}

/* Interactive Countdown Timer */
.countdown-container {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.countdown-box {
    flex: 1;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(255, 255, 255, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.countdown-box:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
    transform: translateY(-3px) scale(1.03);
}

.countdown-val {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.countdown-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Stats Section */
.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.03);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.08);
}

.stat-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.8rem;
    color: var(--text-white);
    background: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Platform Features Grid */
.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(108, 58, 237, 0.15) 0%, rgba(6, 214, 160, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(84, 169, 240, 0.2);
    transition: all 0.3s ease;
}

.glass-card:hover .feature-icon-wrapper {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-white);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(108, 58, 237, 0.3);
}

/* Tab Filters */
.tab-filter-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 24px;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.filter-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    color: var(--text-white);
    background: var(--primary);
    border-color: var(--primary-light);
    box-shadow: 0 5px 15px rgba(108, 58, 237, 0.35);
}

/* Workshop Cards Style */
.workshop-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workshop-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(6, 214, 160, 0.3);
}

.workshop-banner-placeholder {
    height: 150px;
    background: linear-gradient(135deg, rgba(14, 7, 30, 0.9) 0%, rgba(108, 58, 237, 0.25) 100%);
    position: relative;
    overflow: hidden;
    border-top-left-radius: 19px;
    border-top-right-radius: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workshop-banner-placeholder i {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
}

.workshop-card:hover .workshop-banner-placeholder i {
    transform: scale(1.15) rotate(-5deg);
    color: var(--primary-light);
}

.workshop-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.workshop-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.workshop-meta span i {
    color: var(--primary-light);
    margin-right: 4px;
}

.workshop-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.workshop-card:hover .workshop-title {
    color: var(--accent);
}

.workshop-bullets {
    padding-left: 0;
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
}

.workshop-bullets li {
    font-size: 0.85rem;
    color: var(--text-lavender);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.workshop-bullets li i {
    color: var(--accent);
    margin-top: 3px;
    font-size: 0.8rem;
}

.workshop-price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    margin-top: auto;
}

.workshop-price {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-white);
}

.workshop-price span {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: var(--text-muted);
    margin-left: 6px;
    font-weight: 400;
}

/* ==========================================================================
   ADVANCED INTERACTIVE PYTHON & GEN-AI TERMINAL SANDBOX
   ========================================================================== */
.terminal-sandbox {
    margin-top: 30px;
    overflow: hidden;
}

.terminal-header {
    background: #140d24;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.close {
    background: #FF5F56;
}

.terminal-dot.minimize {
    background: #FFBD2E;
}

.terminal-dot.maximize {
    background: #27C93F;
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 400px;
    background: #FFFFFF;
    border: 1px solid var(--border-glass);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

/* Terminal Sidebar: List of available scripts */
.terminal-sidebar {
    background: #F8FAFC;
    border-right: 1px solid var(--border-glass);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-white);
    font-weight: 700;
}

.sandbox-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sandbox-tab {
    background: none;
    border: 1px solid transparent;
    color: var(--text-lavender);
    text-align: left;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.sandbox-tab i {
    font-size: 0.95rem;
    width: 16px;
    text-align: center;
    color: var(--primary-light);
}

.sandbox-tab:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.04);
}

.sandbox-tab.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.18);
    font-weight: 600;
}

.sandbox-tab.active i {
    color: var(--accent);
}

/* Terminal Main Console Window */
.terminal-main {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.code-container {
    background: #FBFDFE;
    padding: 20px;
    border-bottom: 1px solid var(--border-glass);
    min-height: 200px;
    position: relative;
}

.code-editor {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #1E293B;
    white-space: pre-wrap;
    line-height: 1.6;
}

.code-comment {
    color: #64748B;
    font-style: italic;
}

.code-keyword {
    color: #2563EB;
    font-weight: bold;
}

.code-string {
    color: #0D9488;
}

.code-func {
    color: #4F46E5;
}

.terminal-controls {
    background: #F1F5F9;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.terminal-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-hint i {
    color: var(--accent);
}

.console-container {
    background: #F8FAFC;
    flex: 1;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #1E3A8A;
    /* Academic Blue Ink */
    min-height: 140px;
    overflow-y: auto;
    position: relative;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.console-line {
    margin-bottom: 8px;
    line-height: 1.5;
}

.console-line.input {
    color: #0F172A;
}

.console-line.input::before {
    content: '$ ';
    color: var(--accent);
    font-weight: 700;
}

.console-line.error {
    color: #4ea2e7;
}

.console-line.system {
    color: #5b88c9;
}

/* Typing anim cursor */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #1E3A8A;
    margin-left: 4px;
    animation: terminalBlink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes terminalBlink {
    50% {
        opacity: 0;
    }
}

/* ==========================================================================
   CUSTOM ACCORDIONS (FAQs)
   ========================================================================== */
.faq-accordion .accordion-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 14px !important;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-accordion .accordion-item:hover {
    border-color: var(--border-glass-hover);
}

.faq-accordion .accordion-button {
    background: transparent;
    color: var(--text-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 20px 24px;
    box-shadow: none !important;
    border: none;
}

.faq-accordion .accordion-button::after {
    filter: invert(1) hue-rotate(180deg);
    transition: transform 0.3s ease;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--accent);
}

.faq-accordion .accordion-body {
    padding: 0 24px 24px 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   FULLY INTERACTIVE FLOATING AI CHATBOT WIDGET
   ========================================================================== */
#aylence-chatbot-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
}

/* Pulse bubble toggler */
.chat-toggle-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(108, 58, 237, 0.45);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-toggle-btn:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 12px 35px rgba(108, 58, 237, 0.65);
}

/* Pulsing Outer Rings */
.pulse-ring-out {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.5);
    animation: ripple 2s cubic-bezier(0.25, 0, 0, 1) infinite;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Chat container popup */
.chat-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
}

.chat-popup.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Chat Header */
.chat-popup-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.bot-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.bot-status {
    font-size: 0.75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.bot-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent);
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chat-close-btn:hover {
    color: var(--primary);
}

/* Chat Messages Content area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

/* Message speech bubbles */
.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    font-size: 0.85rem;
    line-height: 1.5;
    border-radius: 16px;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes slideIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
}

.chat-msg.bot {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.1);
    color: var(--text-lavender);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Chat Quick reply buttons */
.chat-quick-replies {
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    scrollbar-width: none;
    /* Firefox */
}

.chat-quick-replies::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

.quick-reply-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--primary-light);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    font-weight: 500;
}

.quick-reply-btn:hover {
    background: rgba(108, 58, 237, 0.15);
    border-color: rgba(108, 58, 237, 0.35);
    color: var(--text-white);
}

/* Chat Input Bar */
.chat-input-form {
    padding: 12px 16px;
    background: rgba(7, 3, 17, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 4px 6px 4px 14px;
    transition: all 0.3s ease;
}

.chat-input-group:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 10px rgba(108, 58, 237, 0.2);
}

.chat-input-field {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 0.85rem;
    padding: 8px 0;
}

.chat-input-field::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: var(--text-white);
    transform: scale(1.05);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 100px 0;
}

.form-control {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-lavender) !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 12px rgba(108, 58, 237, 0.25) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.contact-info-list {
    list-style: none;
    padding-left: 0;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(108, 58, 237, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
}

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

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-right: 12px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.footer-social-link:hover {
    background: var(--primary);
    border-color: var(--primary-light);
    color: var(--text-white);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

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

.footer-links li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.25s ease;
}

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

/* Modal Dark Theme Overrides */
.modal-content {
    background-color: var(--bg-deep) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 20px !important;
    color: var(--text-lavender) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.btn-close-white {
    filter: invert(1);
}

/* Global Mobile & iOS Safari Reset overrides */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Touch targets optimization */
button,
a,
select,
input,
textarea {
    touch-action: manipulation;
}

/* Prevent container overflow from pre elements on narrow mobile viewports */
.code-container,
.console-container {
    max-width: 100%;
    overflow-x: auto !important;
}

.code-editor {
    word-break: break-word;
    white-space: pre-wrap;
}

/* Mobile & Tablet Specific Breakpoints */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 120px 0 60px 0;
        background-image: linear-gradient(to bottom, rgba(245, 247, 250, 0.97) 40%, rgba(245, 247, 250, 0.85) 100%), url('ai_robots_bg.png');
        background-size: cover;
        background-position: center;
    }

    .terminal-layout {
        grid-template-columns: 1fr;
    }

    .terminal-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .sandbox-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .sandbox-tab {
        white-space: nowrap;
        width: auto;
    }

    .chat-popup {
        width: calc(100vw - 40px);
        max-height: calc(100vh - 120px);
        height: 480px;
    }

    /* Collapsed Glassmorphism Mobile Navbar Dropdown */
    .navbar-collapse {
        background: rgba(14, 7, 30, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 16px;
        padding: 20px;
        margin-top: 15px;
        border: 1px solid rgba(139, 92, 246, 0.18);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.3rem;
    }

    .stat-num {
        font-size: 2.2rem;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    #aylence-chatbot-wrapper {
        bottom: 20px;
        right: 20px;
    }

    .chat-toggle-btn {
        width: 54px;
        height: 54px;
    }

    .chat-popup {
        bottom: 70px;
        right: 0;
        width: calc(100vw - 40px);
        max-height: calc(100vh - 100px);
        height: 440px;
    }

    .countdown-container {
        gap: 8px;
    }

    .countdown-box {
        padding: 6px;
    }

    .countdown-val {
        font-size: 1.1rem;
    }

    .glass-card {
        padding: 20px !important;
    }
}