/* ===== Custom CSS & Premium Variables ===== */

:root {
    --color-deep: #060B19;      /* Midnight Indigo */
    --color-primary: #111827;   /* Rich Dark Gray/Blue for cards */
    --color-electric: #38bdf8;  /* Light Sky Blue (Premium) */
    --color-orange: #f43f5e;    /* Rose/Coral instead of harsh orange */
}

/* Base Styles & Scrollbar */
html {
    scroll-behavior: smooth;
    background-color: var(--color-deep);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-deep);
}

::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-electric);
}

/* Custom Scrollbar for inner components */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-electric);
}

/* Mobile Menu Animation */
.clip-path-circle-0 {
    clip-path: circle(0% at top right);
}
.clip-path-circle-full {
    clip-path: circle(150% at top right);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    transform: translateY(-2px);
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-electric);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

.cursor-glow {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background-color: rgba(56, 189, 248, 0.05);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    transition-timing-function: ease-out;
}

/* Hover effects for cursor */
.cursor-hover .cursor-dot {
    width: 0;
    height: 0;
}

.cursor-hover .cursor-glow {
    width: 48px;
    height: 48px;
    background-color: rgba(244, 63, 94, 0.1);
    border-color: var(--color-orange);
    backdrop-filter: blur(1px);
}

/* Typography Enhancements */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.gradient-primary {
    background-image: linear-gradient(135deg, var(--color-electric), #818cf8);
}
.gradient-secondary {
    background-image: linear-gradient(135deg, var(--color-orange), #fb923c);
}

/* Animated Wave Footer Setup */
.wave-animate-1 {
    animation: waveX 20s linear infinite;
    transform-origin: bottom;
}

@keyframes waveX {
    0% { transform: translateX(0) scaleY(1); }
    50% { transform: translateX(-5%) scaleY(1.1); }
    100% { transform: translateX(0) scaleY(1); }
}

/* Pulse Animation */
.pulse-animation {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.4);
}

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

/* Utilities */
.visibility-hidden {
    visibility: hidden;
}

/* ===== Chatbot Styles ===== */
#chatbot-window {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#chatbot-window.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}
#chatbot-window.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}
#chatbot-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.4) transparent;
}
#chatbot-messages::-webkit-scrollbar { width: 4px; }
#chatbot-messages::-webkit-scrollbar-track { background: transparent; }
#chatbot-messages::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.4); border-radius: 4px; }

.chat-bubble-bot {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.8), rgba(10, 15, 37, 0.8));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 0 1rem 1rem 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #e2e8f0;
    max-width: 80%;
    word-break: break-word;
    animation: chatFadeIn 0.3s ease;
}
.chat-bubble-user {
    background: linear-gradient(135deg, #ff6200, #ff0055);
    border-radius: 1rem 0 1rem 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: white;
    max-width: 80%;
    margin-left: auto;
    word-break: break-word;
    animation: chatFadeIn 0.3s ease;
}
.chat-typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00f0ff;
    animation: chatBounce 1s infinite;
}
.chat-typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}
@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-quick-btn {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #00f0ff;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.chat-quick-btn:hover {
    background: rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   Calculator Central Styles - Dark Glassmorphism Theme
   ========================================================================== */
.calc-box {
    width: 100%;
}
.calc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 16px;
    margin: 8px 0;
}
.calc-table td {
    padding: 6px 12px;
    vertical-align: middle;
}
.calc-table td.lbl {
    width: 40%;
    text-align: right;
    padding-right: 20px;
}
.calc-table label {
    font-weight: 700;
    color: #e5e7eb;
    font-size: 0.9rem;
    font-family: inherit;
}
.calc-table input, 
.calc-table select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding: 0.8rem 1rem !important;
    border-radius: 0.75rem !important;
    outline: none !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}
.calc-table input:focus, 
.calc-table select:focus {
    border-color: #00f0ff !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}
.calc-btn {
    background: linear-gradient(135deg, #ff6200, #ff0055) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    padding: 0.85rem 2rem !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(255, 98, 0, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 5px;
}
.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 98, 0, 0.5) !important;
}
.calc-btn-clear {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #9ca3af !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    padding: 0.85rem 2rem !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 5px;
}
.calc-btn-clear:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Calculator Result Panel */
.calc-result {
    margin-top: 2rem;
    background: rgba(0, 240, 255, 0.04) !important;
    border: 1px solid rgba(0, 240, 255, 0.2) !important;
    border-radius: 1.25rem !important;
    overflow: hidden;
    display: none;
    box-shadow: 0 8px 32px 0 rgba(0, 240, 255, 0.05);
}
.calc-result.show {
    display: block !important;
    animation: chatFadeIn 0.4s ease;
}
.result-header {
    background: rgba(0, 240, 255, 0.06);
    padding: 1.5rem;
    text-align: center;
    border-b: 1px solid rgba(0, 240, 255, 0.1);
}
.result-main-label {
    font-size: 0.85rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.result-main-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: #ffffff;
    font-family: inherit;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}
.result-body {
    padding: 1.5rem;
}
.result-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}
.result-label {
    color: #9ca3af;
    font-weight: 600;
}
.result-value {
    color: #ffffff;
    font-weight: 700;
    margin-left: auto;
    margin-right: 12px;
}
.result-copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 2px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.result-copy-btn:hover {
    opacity: 1;
}
.result-timestamp {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 1.25rem;
}

/* Custom Toast & Field Validation Errors */
#calc-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #00f0ff;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
    color: #ffffff;
    padding: 0.8rem 1.75rem;
    border-radius: 9999px;
    z-index: 9999;
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#calc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.field-error {
    color: #ff3b30;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
    display: none;
    animation: chatFadeIn 0.3s ease;
}
.field-error.show {
    display: block;
}
.form-group.has-error input {
    border-color: #ff3b30 !important;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.2) !important;
}

/* Explanations & FAQ Sections Styling */
.content-section {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.5rem;
    padding: 2rem;
}
.content-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}
.content-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.content-section p {
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 1rem;
}
.formula-box {
    background: rgba(0, 240, 255, 0.03);
    border-left: 3px solid #00f0ff;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    color: #00f0ff;
    font-family: monospace;
    font-size: 0.95rem;
    margin: 1.25rem 0;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.1);
}
.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.25rem 0;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.faq-answer {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Custom Scrollbar for sidebar list */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.3);
}

/* Range input / slider customizations */
.input-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    margin: 15px 0;
    transition: background 0.3s;
}
.input-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00f0ff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    transition: transform 0.1s, background-color 0.1s;
}
.input-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #ffffff;
}

@media (max-width: 768px) {
    .calc-table td.lbl {
        width: auto;
        text-align: left;
        display: block;
        padding-bottom: 4px;
    }
    .calc-table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }
    .calc-table tr {
        display: block;
        margin-bottom: 12px;
    }
}

/* ==========================================
   Home Page News Ticker Styling
   ========================================== */
@keyframes ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.ticker-track {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker-scroll 35s linear infinite;
    will-change: transform;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-wrap:hover .ticker-track {
    animation-play-state: paused;
}

