﻿html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

:target {
    scroll-margin-top: 100px;
    color: var(--bs-white) !important;
    background: var(--bs-primary) !important;
}

/* Base Theme Variables */
.light {
    --bg-primary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4b5563;
    --primary-rgb: 0, 0, 0;
    --glass-effect-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-effect-bg-simulator: #d9d9d9;
    --card-bg: rgba(255, 255, 255, 0.9);
    --input-bg: rgba(255, 255, 255, 0.1);
    --gradient-text: linear-gradient(to right, #1a1a1a, #333333);
    --hero-gradient: radial-gradient(circle at 50% 50%, rgba(230, 230, 230, 0.3) 0%, rgba(230, 230, 230, 0.2) 25%, rgba(255, 255, 255, 0) 50%);
    --image-filter: brightness(0.1) invert(0);
    --image-hover-filter: brightness(0.0);
    --primary-colored-rgb: 30, 30, 30;
    --player-primary: #333333;
    --player-secondary: #555555;
    --player-background: rgba(255, 255, 255, 0.8);
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --accent-primary: #333333;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --bg-primary-rgb: 0, 0, 0;
    --secondary-rgb: 255, 255, 255;
    --button-hover-bg: rgba(230, 230, 230, 0.8);
    --active-highlight: rgba(230, 230, 230, 0.8);
    --bs-gray-300: #475569;

}

.dark {
    --bg-primary: #111827;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --primary-rgb: 255, 255, 255;
    --glass-effect-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-effect-bg-simulator: #373d4a;
    --gradient-text: linear-gradient(to right, white, #3b82f6);
    --hero-gradient: radial-gradient(circle at 50% 50%, rgba(29, 78, 216, 0.15) 0%, rgba(30, 64, 175, 0.15) 25%, rgba(17, 24, 39, 0) 50%);
    --image-filter: brightness(0) invert(1);
    --image-hover-filter: brightness(0.0) invert(1);
    --primary-colored-rgb: 59, 130, 246;
    --player-primary: #5436DA;
    --player-secondary: #8B7CE8;
    --player-background: rgba(17, 24, 39, 0.8);
    --bg-secondary: #2c3e50;
    --bg-tertiary: #34495e;
    --accent-primary: #3498db;
    --border-color: #4a5568;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --bg-primary-rgb: 255, 255, 255;
    --secondary-rgb: 0, 0, 0;
    --button-hover-bg: rgba(59, 130, 246, 0.2);
    --active-highlight: rgba(59, 130, 246, 0.1);
    --bs-gray-300: #dddfeb;

}

.black-filter {
    filter: grayscale(1);
}

/* Theme-aware styles */
.theme-bg {
    background-color: var(--bg-primary);
    fill: var(--bg-primary);
}

.theme-text {
    color: var(--text-primary);
}

.theme-text-secondary {
    color: var(--text-secondary);
}

/* Glass Effect */
.glass-effect {
    background: var(--glass-effect-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.hero-gradient {
    background: var(--hero-gradient);
}

h1.bg-clip-text.text-transparent {
    background-image: var(--gradient-text);
}

/* Mobile Menu */
.mobile-menu {
    transform-origin: top;
    transition: all 0.3s ease-in-out;
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Utility classes */
.bg-blue-600 {
    color: white;
    background: #333333 !important;
}

.bg-blue-600:hover {
    color: white;
    background: #444444 !important;
}

.dark .bg-blue-600 {
    background: #2e5a98 !important;
}

.dark .bg-blue-600:hover {
    background: #447bcc !important;
}

/* Theme Switch */
.theme-switch svg {
    display: none;
}

.dark .theme-switch svg.dark\:block {
    display: block;
    color: white;
}

/* Noise Effect */
.noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
}

.dark .noise {
    opacity: 0.05;
}

/* Wave Animation */
.wave-animation {
    position: relative;
    overflow: hidden;
}

.wave-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #333333, transparent);
}

.dark .wave-animation::before {
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    animation: wave 2s linear infinite;
}

/* Pricing Card */
.pricing-popular {
    transform: scale(1.05);
}

#pricing .scroll-reveal {
    padding-bottom: 5rem !important;
}

.pricing-btn {
    left: 0;
    right: 0;
    margin-inline: auto !important;
    width: 70% !important;
    position: absolute !important;
    bottom: 1.5rem;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Reveal for Grid Items */
.grid .scroll-reveal:nth-child(1) {
    transition-delay: 0s;
}

.grid .scroll-reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.grid .scroll-reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.grid .scroll-reveal:nth-child(4) {
    transition-delay: 0.3s;
}

/* Team Card Image Hover Effect */
.team-card:hover img {
    transform: scale(1.05);
}

/* Glass Effect Hover States */
.glass-effect.hover\:glow:hover {
    background: rgba(var(--bg-primary-rgb), 0.1);
}

.dark .glass-effect.hover\:glow:hover {
    background: rgba(var(--bg-primary-rgb), 0.1);
}

/* Font and Text Adjustments */
.font-mono {
    color: var(--text-primary);
}

/* Theme Switch Button States */
.theme-switch svg.dark\:hidden {
    display: block;
    color: var(--text-primary);
}

.dark .theme-switch svg.dark\:hidden {
    display: none;
}

/* Text Color Overrides */
.text-gray-400 {
    color: var(--text-secondary) !important;
}

/* Heading Colors */
h1, h2, h3, h4 {
    color: var(--text-primary);
}

/* Input and Textarea Styles */
textarea {
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    background-color: var(--glass-effect-bg);
    border-radius: 0.375rem;
    padding: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--text-primary);
    background-color: var(--glass-effect-bg);
}

/* Card and Container Shadows */
.glass-effect {
    box-shadow: 0 4px 6px -1px rgba(var(--secondary-rgb), 0.1), 0 2px 4px -1px rgba(var(--secondary-rgb), 0.06);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .pricing-popular {
        transform: scale(1);
    }

    .scroll-reveal {
        transition-delay: 0s !important;
    }
}

/* General Section Styling */
.trusted-partners {
    background: transparent;
    overflow: hidden;
}

.partners-grid {
    position: relative;
    width: 100%;
}

/* Marquee Styling */
.marquee-wrapper {
    position: relative;
    overflow: hidden;
    mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.marquee {
    display: flex;
    width: fit-content;
}

.marquee-content {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    animation: scroll 40s linear infinite;
    position: relative;
}

/* Partner Card Styling */
.partner-card {
    flex: 0 0 auto;
    width: 280px;
    height: 160px;
    background: var(--bg-primary-rgb);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-card:hover {
    background: rgba(var(--glass-effect-bg), 0.1);
    border-color: rgba(var(--glass-effect-bg), 0.2);
    transform: translateY(-2px);
}

.partner-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: var(--image-filter);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-card:hover img {
    filter: var(--image-hover-filter);
    transform: scale(1.05);
}

.partner-card:last-child {
    margin-inline-end: 2rem;
}

/* Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .partner-card {
        width: 220px;
        height: 120px;
    }
}

.waveform-container {
    width: 100%;
    max-width: 800px;
    height: 200px;
    margin: 0 auto;
}

#waveformCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Preloader Transition */
#preloader {
    transition: opacity 0.5s ease;
}

/* Prevent FOUC */
.js-loading *,
.js-loading *:before,
.js-loading *:after {
    animation-play-state: paused !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(var(--primary-rgb), 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 15vh auto;
    padding: 2rem;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    width: 90%;
    max-width: 800px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(var(--secondary-rgb), 0.1);
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.close:hover {
    color: var(--text-primary);
}

/* RTL Support */
[dir="rtl"] .modal-content {
    text-align: right;
}

[dir="rtl"] .close {
    right: auto;
    left: 1rem;
}

/* Modal Content Styling */
#modalContent {
    padding: 1rem 0;
}

#modalContent h1 {
    margin-top: 0;
    font-size: 2rem;
    margin-bottom: 1rem;
}

#modalContent h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#modalContent p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Scrollbar Styling */
*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(var(--primary-rgb), 0.1);
}

*::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.2);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.3);
}

/* Loading and Error States */
.modal .loading,
.modal .error {
    text-align: center;
    padding: 2rem;
}

.modal .error {
    color: #ef4444;
}

.play-icon {
    border-color: transparent transparent transparent var(--bg-primary);
}

.play-button.playing .play-icon {
    background: var(--bg-primary);
}

/* Control Button Hover */
.control-btn:hover {
    background: rgba(var(--primary-colored-rgb), 0.15);
}

/* Waveform Wrapper */
.waveform-wrapper {
    background: rgba(var(--primary-colored-rgb), 0.05);
}

.progress-overlay {
    background: linear-gradient(90deg, rgba(var(--primary-colored-rgb), 0.15), rgba(var(--primary-colored-rgb), 0.08));
}

.pill {
    background: rgb(var(--primary-colored-rgb));
    opacity: 0.2;
}

/* Time Display and Text */
.time-display {
    color: var(--text-primary);
}

.track-title {
    color: var(--text-primary);
}

/* Canvas Visualization Colors Update */
.visualization-gradient {
    --start-color: rgba(var(--primary-colored-rgb), 0.8);
    --end-color: rgba(var(--primary-colored-rgb), 0.3);
}

.bg-gradient {
    background: linear-gradient(45deg, rgba(230, 230, 230, 0.3), rgba(240, 240, 240, 0.3), rgba(230, 230, 230, 0.3));
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
}

.dark .bg-gradient {
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.05), rgba(147, 197, 253, 0.05), rgba(59, 130, 246, 0.05));
}

@keyframes gradientMove {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Glass Effect */
.glass-effect {
    position: relative;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 16px;
    overflow: hidden;
}

.play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--player-primary);
    border: none;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.05);
}

/* Loading State */
.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

/* Module Container */
.module-container {
    position: relative;
    border-radius: 1rem;
    margin-left: 4rem;
}

/* Service Tabs */
.service-tabs {
    position: absolute;
    left: -7.8rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 1;
}

.tab {
    user-select: none;
    cursor: pointer;
    position: relative;
    border-inline-end: none;
    border-radius: 16px 0 0 16px !important;
}

.tab input {
    display: none;
}

.tab-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    border-radius: 0.8rem 0 0 0.8rem;
    transition: all 0.3s ease;
    height: 100%;
}

/* Active tab styling */
.tab input:checked + .tab-content {
    color: var(--bg-primary);
    background: var(--accent-primary);
}

.tab input:checked + .tab-content::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-primary);
}

/* Mobile Responsive update */
@media (max-width: 768px) {
    .speech-module {
        padding: 0;
    }

    .module-container {
        margin-left: 0;
        margin-top: 1rem;
    }

    .article-box {
        margin-inline: 0 !important;
    }
}

/* Update Module Content to have proper spacing */
.module-content {
    padding: 1rem;
    min-height: 400px;
}

/* Message Box */
.article-box {
    padding: 2rem;
    margin-inline: 5rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Audio Player */
.audio-player {
    padding: 1rem;
    margin: 1rem;
    border-radius: 0.5rem;
}

.player-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.timecode {
    color: var(--accent-primary);
    font-family: monospace;
    display: block;
    text-align: end;
    width: 100%;
}

.select {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    padding: 0.4rem;
    border-radius: 0.4rem;
    margin-top: 0.2rem;
}

.select-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    transform: translateY(-50%);
    border-radius: 4px;
}

.player-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.progress-bar {
    cursor: pointer;
    flex: 1;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    cursor: pointer;
    width: 0;
    height: 100%;
    background: var(--accent-primary);
}

/* Transcription */
.transcription {
    max-height: 300px !important;
    overflow: auto !important;
    margin: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.transcription-line {
    cursor: pointer;
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.time-tag {
    color: var(--accent-primary);
    font-family: monospace;
}

/* Utility */
.hidden {
    display: none;
}

.remove {
    display: none !important;
}

nav, footer {
    border-radius: 0 !important;
}

footer {
    bottom: 0 !important;
}

.active-line {
    background-color: var(--active-highlight);
    font-weight: bold;
    transition: background-color 0.3s ease-in-out;
}

.section {
    position: relative;
    padding: 30px;
    border-radius: 10px;
    overflow: hidden;
}

.section-label {
    font-family: "Tw Cen MT", sans-serif !important;
    position: absolute;
    top: 5px;
    inset-inline-start: 0.5rem;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: bold;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.moknah-word {
    display: inline-block !important;
    position: relative !important;
    color: inherit !important;
    transition: color 0.3s ease !important;
}

.moknah-word:hover {
    color: inherit !important;
}

.moknah-word::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 3px;
    background-color: rgb(246 162 31);
    transition: width 0.3s ease-in-out;
}

.moknah-word.highlight {
    color: inherit !important;
    font-weight: bold;
}

.moknah-word.highlight::after {
    width: 100%;
}

.logo {
    filter: var(--logo-filter);
}

.video-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.video-container {
    width: 100%;
    margin-top: 1rem;
}

.video-player {
    width: 100%;
    border-radius: 8px;
}

.video-title {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.video-metadata {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.paragraph {
    direction: rtl;
    line-height: 2rem;
    text-align: justify;
    padding: 1rem;
    overflow: auto;
    max-height: 300px;
}

.disabled {
    background: rgba(var(--primary-rgb), 0.3);
    border: 1px solid rgba(var(--secondary-rgb), 0.1);
    backdrop-filter: blur(10px);
    cursor: not-allowed !important;
    opacity: 0.5;
    pointer-events: none;
}

.voices-container {
    position: relative;
    max-width: 100vw;
    margin: 0 auto;
    overflow: hidden;
}

.voices-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.voice-card {
    flex: 0 0 300px;
    width: 300px;
    height: 300px;
    margin: 0 1rem;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    transform: scale(0.85);
    opacity: 0.6;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.voice-card.active {
    transform: scale(1);
    opacity: 1;
}

.wave-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    transform-origin: center;
}

.wave-animation {
    animation: waveMove 3s ease-in-out infinite alternate;
}

@keyframes waveMove {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.1) rotate(3deg);
    }
}

.voice-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.voice-card.active:hover .voice-overlay {
    opacity: 1;
}

.voice-name {
    color: rgb(var(--bg-primary-rgb), 0.7);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px var(--shadow-color);
}

.play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .play-button {
    color: white;
}

.active .play-button:hover {
    background: rgba(var(--primary-rgb), 0.3);
    transform: scale(1.1);
}

.time-display {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark .time-display {
    color: white;
}

.voice-card.active:hover .time-display {
    opacity: 1;
}

.nav-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.nav-button {
    background: rgba(var(--bg-primary-rgb), 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark .nav-button {
    color: white;
}

.nav-button:hover:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.2);
}

.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-container {
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .voice-card {
        flex: 0 0 240px;
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 374px) {
    .voice-card {
        flex: 0 0 180px;
        width: 180px;
        height: 180px;
    }
}

.space-x-3 > :not([hidden]) ~ :not([hidden]) {
    margin: 0 !important;
    margin-inline-start: .75rem !important;
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
    margin: 0 !important;
    margin-inline-start: .75rem !important;
}

.space-x-8 > :not([hidden]) ~ :not([hidden]) {
    margin: 0 !important;
    margin-inline-start: 2rem !important;
}

.end-2 {
    inset-inline-end: 0.5rem;
}

.mr-1 {
    margin: 0 !important;
    margin-inline-end: .25rem !important;
}

.mr-2 {
    margin: 0 !important;
    margin-inline-end: .5rem !important;
}

.mr-3 {
    margin: 0 !important;
    margin-inline-end: .75rem !important;
}

.mr-4 {
    margin: 0 !important;
    margin-inline-end: 1rem !important;
}

@media (min-width: 640px) {
    .sm\:space-x-6 > :not([hidden]) ~ :not([hidden]) {
        --tw-space-x-reverse: 0 !important;
        margin-inline-end: calc(1.5rem * var(--tw-space-x-reverse)) !important;
        margin-inline-start: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))) !important;
    }
}

@media (min-width: 640px) {
    .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
        --tw-space-x-reverse: 0;
        margin-inline-end: calc(1rem * var(--tw-space-x-reverse)) !important;
        margin-inline-start: calc(1rem * calc(1 - var(--tw-space-x-reverse))) !important;
    }
}

@media (min-width: 768px) {
    .md\:space-x-6 > :not([hidden]) ~ :not([hidden]) {
        --tw-space-x-reverse: 0 !important;
        margin-inline-end: calc(1.5rem * var(--tw-space-x-reverse)) !important;
        margin-inline-start: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))) !important;
    }
}

@media (min-width: 768px) {
    .md\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
        --tw-space-x-reverse: 0;
        margin-inline-end: calc(1rem * var(--tw-space-x-reverse)) !important;
        margin-inline-start: calc(1rem * calc(1 - var(--tw-space-x-reverse))) !important;
    }
}

.text-left {
    text-align: start !important;
}

.left-2 {
    left: inherit !important;
    inset-inline-end: 0.5rem !important;
}


@media (min-width: 1000px) {
    .gallery-container {
        padding-inline-start: 50px;
    }
}

/* Improved UI/UX for speech module */
.speech-module {
    padding: 2rem 0;
}

/* Section headers with modern styling */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 0.5rem;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1rem;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

/* Improved tabs with tooltips */
.tab {
    position: relative;
}

.tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.tab-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.tab[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: -12rem;
    top: 50%;
    transform: translateY(-50%);
    width: 10rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 0;
    animation: fade-in 0.3s ease forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Select inputs with custom styling */
.select-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.select-wrapper {
    position: relative;
}

.select {
    appearance: none;
    padding-right: 2rem;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Improved player controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.play-button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.play-button:active {
    transform: scale(0.95);
}

/* Improved progress bar */
.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: #9ca3af;
    overflow: hidden;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: var(--text-primary);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.timecode {
    align-self: flex-end;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Transcription list */
.transcription-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.transcription-line {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.transcription-line:hover {
    background-color: var(--bg-secondary);
}

.transcription-line.active-line {
    background-color: var(--active-highlight);
    font-weight: 500;
}

.time-tag {
    color: var(--accent-primary);
    font-family: monospace;
    font-size: 0.8rem;
    min-width: 5rem;
}

/* Gallery improvements */
.gallery-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gallery-navigation {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-nav-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.gallery-nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 1250px) {
    .service-tabs {
        flex-direction: row;
        left: 0;
        right: 0;
        top: -3.5rem;
        transform: none;
    }

    .tab-content {
        flex-direction: column;
        padding: 0.75rem;
    }

    .tab[data-tooltip]:hover::after {
        left: 50%;
        top: -3.5rem;
        transform: translateX(-50%);
    }

    .gallery-nav-button {
        width: 2.5rem;
        height: 2.5rem;
    }

    .service-tabs {
        text-align: center;
        left: 0;
        right: 0;
        top: -4.3rem;
        transform: none;
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
    }

    .tab-content {
        padding: 0.8rem 1.2rem;
        border-radius: 0.8rem 0.8rem 0 0;
        width: auto;
        flex-direction: column;
        font-size: 0.9rem;
    }

    .tab input:checked + .tab-content::after {
        background: none;
    }

    .tab {
        border-inline-end: 1px solid var(--glass-border);
        border-bottom: none;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: none !important;
    }

}

@media (max-width: 500px) {
    .service-tabs {
        gap: 0.2rem;
    }

    .module-content {
        border-radius: 0.5rem;
    }
}

@media (max-width: 445px) {
    .service-tabs {
        gap: 0.2rem;
        top: -5.4rem;
    }

    .module-content {
        border-radius: 0.5rem;
    }
}

.text-gray-300 {
    color: var(--bs-gray-300) !important
}

.ml-3 {
    margin-inline-start: .75rem;
}

.pl-16 {
    padding-left: 0 !important;
    padding-inline-start: 4rem !important;

}

@media (min-width: 768px) {
    .md\:text-right {
        text-align: end !important;
    }

    .md\:pl-12 {
        padding-left: 0 !important;
        padding-inline-start: 3rem !important;

    }

    .md\:pr-12 {
        padding-inline-end: 3rem !important;
    }

    .md\:pl-0 {
        padding-inline-start: 0 !important;
    }
}

.cls-1 {
    fill: #fff;
}

.cls-2 {
    fill: #333333;
}

.dark .cls-2 {
    fill: #2e5a98;
}

.cls-3 {
    fill: none;
    stroke: #fff;
    stroke-miterlimit: 10;
    stroke-width: 2px;
}
