/* Mobile-First Base Styles */
* {
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Custom Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

@keyframes zoom-slow {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animate-zoom-slow {
    animation: zoom-slow 8s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
}

/* Swiper Custom Styles */
.tracksSwiper {
    padding-bottom: 60px;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: #10b981;
    opacity: 0.5;
}

/* Countdown Timer Styles */
.countdown-item {
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.countdown-item:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.countdown-value {
    font-size: 2rem;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
}

.countdown-label {
    font-size: 0.85rem;
    color: #a7f3d0;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-separator {
    color: #10b981;
    font-size: 2rem;
    font-weight: 800;
    align-self: center;
    opacity: 0.6;
}

@media (max-width: 640px) {
    .countdown-item {
        padding: 8px 10px;
        min-width: 60px;
    }
    
    .countdown-value {
        font-size: 1.5rem;
    }
    
    .countdown-label {
        font-size: 0.7rem;
    }
    
    .countdown-separator {
        font-size: 1.5rem;
    }
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background-color: #10b981;
}

.swiper-button-next,
.swiper-button-prev {
    color: #10b981;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 30px;
}

/* Custom Hover Effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Timeline Responsive */
@media (max-width: 768px) {
    .timeline-vertical .timeline-item {
        flex-direction: column;
    }
}

/* FAQ Accordion Styles */
.faq-answer {
    max-height: 1000px;
    overflow: hidden;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.faq-answer.hidden {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 1000px;
    }
    to {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
}

.faq-question i:last-child {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question.active i:last-child {
    transform: rotate(180deg);
}

/* Button Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.pulse-button {
    animation: pulse 2s infinite;
}

/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
}

/* Search Input Focus */
input:focus, textarea:focus {
    outline: none;
    border-color: #10b981;
}

/* Custom Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.25rem;
    }
    
    /* Improve button padding on mobile */
    button, a[class*="btn"], a[class*="px-8"] {
        font-size: 1rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    /* Responsive padding for sections */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Fix navigation padding */
    nav {
        padding: 0;
    }
    
    /* Better text sizing for descriptions */
    p {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    /* Reduce gap on grid items for tablets */
    .grid {
        gap: 1.5rem;
    }
    
    /* Adjust flex directions */
    .flex-col {
        margin-bottom: 1rem;
    }
    
    /* Better spacing for components */
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }
}

@media (max-width: 1024px) {
    /* Optimize max-width containers */
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Improved mobile menu styling */
@media (max-width: 768px) {
    #mobile-menu {
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
        opacity: 0;
    }
    
    #mobile-menu.block {
        display: block;
        max-height: 500px;
        opacity: 1;
    }
    
    #mobile-menu.open {
        display: block;
        max-height: 500px;
        opacity: 1;
    }
    
    /* Mobile menu items */
    #mobile-menu a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #mobile-menu a:last-child {
        border-bottom: none;
    }
}

/* Touch-friendly sizes for mobile */
@media (max-width: 640px) {
    button, a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Input fields touch target */
    input, textarea {
        min-height: 48px;
        font-size: 16px;
    }
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Better hero section on mobile */
@media (max-width: 640px) {
    .hero-content {
        padding: 1rem;
    }
    
    /* Fix countdown layout on small screens */
    .countdown-item {
        min-width: 50px;
        padding: 6px 8px;
    }
    
    .countdown-separator {
        display: none;
    }
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Swiper responsive adjustments */
@media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    .swiper-pagination {
        bottom: 10px;
    }
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
}

/* Landscape mode adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        height: 100vh;
    }
    
    section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Ultra-small screens (< 320px) */
@media (max-width: 320px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    p {
        font-size: 0.875rem;
    }
    
    .max-w-7xl {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Improved container queries for better responsiveness */
@supports (container-type: inline-size) {
    @container (max-width: 640px) {
        .grid {
            grid-template-columns: 1fr;
        }
    }
}

/* ==========================================
   Chatbot Styles
   ========================================== */

/* Container */
#chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

/* Toggle Button */
#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #0d9488);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.5);
}

#chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.chatbot-toggle-icon.hidden {
    display: none;
}

.chatbot-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    filter: brightness(0) invert(1);
}

.chatbot-header-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: chatbot-pulse 2s infinite;
}

.chatbot-badge.hidden {
    display: none;
}

@keyframes chatbot-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Chat Window */
#chatbot-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 380px;
    max-height: 560px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}

#chatbot-window.chatbot-hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

#chatbot-window.chatbot-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Header */
#chatbot-header {
    background: linear-gradient(135deg, #10b981, #0d9488);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chatbot-status-dot {
    width: 7px;
    height: 7px;
    background: #a7f3d0;
    border-radius: 50%;
    display: inline-block;
    animation: chatbot-blink 2s infinite;
}

@keyframes chatbot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

#chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Messages Area */
#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 280px;
    max-height: 340px;
    scroll-behavior: smooth;
}

#chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

/* Message Bubbles */
.chatbot-message {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
}

.chatbot-message-visible {
    opacity: 1;
    transform: translateY(0);
}

.chatbot-message-bot {
    align-items: flex-start;
}

.chatbot-message-user {
    align-items: flex-end;
}

.chatbot-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.55;
    word-wrap: break-word;
}

.chatbot-bubble-bot {
    background: #f0fdf4;
    color: #1f2937;
    border-bottom-left-radius: 6px;
    border: 1px solid #d1fae5;
}

.chatbot-bubble-user {
    background: linear-gradient(135deg, #10b981, #0d9488);
    color: white;
    border-bottom-right-radius: 6px;
}

.chatbot-bubble a.chatbot-link {
    color: #059669;
    text-decoration: underline;
    font-weight: 600;
}

.chatbot-bubble-user a.chatbot-link {
    color: #d1fae5;
}

.chatbot-time {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}

/* Typing Indicator */
.chatbot-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.chatbot-dots span {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    animation: chatbot-bounce 1.4s infinite ease-in-out;
}

.chatbot-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Quick Replies */
#chatbot-quick-replies {
    padding: 0 16px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chatbot-quick-btn {
    padding: 6px 14px;
    border: 1.5px solid #d1fae5;
    background: white;
    color: #059669;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.chatbot-quick-btn:hover {
    background: #ecfdf5;
    border-color: #10b981;
    transform: translateY(-1px);
}

/* Input Area */
#chatbot-input-area {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
    flex-shrink: 0;
    border-radius: 0 0 20px 20px;
}

#chatbot-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

#chatbot-input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    font-size: 13.5px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

#chatbot-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#chatbot-input::placeholder {
    color: #9ca3af;
}

#chatbot-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #0d9488);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

#chatbot-send:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #chatbot-container {
        bottom: 16px;
        right: 16px;
    }

    #chatbot-window {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 120px);
        bottom: 70px;
        right: -8px;
    }

    #chatbot-messages {
        min-height: 200px;
        max-height: calc(100vh - 320px);
    }

    .chatbot-bubble {
        max-width: 90%;
    }
}
