/* Welcome Modal Styles */
.welcome-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    margin: 0;
    padding: 0;
}

/* When modal is open, ensure flexbox centering */
.welcome-modal[style*="display: flex"],
.welcome-modal[style*="display:flex"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: row !important;
}

.welcome-modal-content {
    background-color: #fff;
    border-radius: 20px;
    width: 560px;
    max-width: 90%;
    height: 600px;
    max-height: 80vh;
    margin: 0;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.welcome-carousel-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

/* Top/Visual Section - Reduced top space */
.welcome-visual-section {
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px 10px 20px;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.welcome-visual-section svg {
    width: 100%;
    max-width: 360px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.08));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-visual-section:hover svg {
    transform: scale(1.01);
}

/* Logo styling for first slide */
.welcome-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s ease-out;
}

.welcome-logo {
    max-width: 180px;
    width: auto;
    height: auto;
    opacity: 0.95;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

/* Bottom/Info Section - Modern spacing */
.welcome-info-section {
    flex: 0 0 auto;
    padding: 32px 40px 24px 40px; /* Reduced bottom padding */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #fff;
    text-align: center;
}

.welcome-header-container {
    text-align: center;
    margin-bottom: 32px;
}

.welcome-header-container h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.75rem;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.welcome-header-container p {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Controls - Modern design */
.welcome-controls {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    justify-content: space-between; /* Space between dots and buttons */
    gap: 20px;
    margin-top: auto;
    width: 100%;
    padding-top: 8px; /* Reduced from 20px */
    position: relative; /* For absolute positioning of dots */
}

.welcome-dots {
    display: flex;
    gap: 8px;
    justify-content: center; /* Center align */
    align-items: center;
    position: absolute; /* Absolute center */
    left: 50%;
    transform: translateX(-50%);
}

.welcome-dot {
    width: 8px;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.welcome-dot.active {
    background-color: #3B82F6; /* Use blue brand color */
    width: 8px; /* Keep it a circle */
    transform: scale(1.2); /* Slightly larger */
    box-shadow: none; /* Remove shadow */
}

.welcome-dot:hover:not(.active) {
    background-color: #d1d5db;
    transform: scale(1.1);
}

.welcome-buttons {
    display: flex;
    gap: 12px;
    width: auto;
    margin-left: auto; /* Push to right */
    justify-content: flex-end;
    min-width: 0;
}

.welcome-buttons button {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    border: none;
    outline: none;
    min-width: 100px;
    letter-spacing: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.welcome-buttons button .arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.welcome-buttons button:hover .arrow {
    transform: translateX(2px);
}

.btn-primary {
    background-color: #3B82F6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563EB;
    opacity: 0.95;
}

.btn-primary:active {
    opacity: 0.9;
}

.btn-success {
    background-color: #10B981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    opacity: 0.95;
}

.btn-success:active {
    opacity: 0.9;
}

.welcome-skip-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    font-weight: 500;
}

.welcome-skip-btn:hover {
    color: #1f2937;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.welcome-skip-btn:active {
    transform: translateY(0);
}

/* Close button styles */
.welcome-modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    color: #6b7280;
    padding: 0;
    outline: none;
}

.welcome-modal-close-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    color: #1f2937;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.welcome-modal-close-btn:active {
    transform: scale(0.95);
}

.welcome-modal-close-btn svg {
    width: 18px;
    height: 18px;
}

/* Slide transition animation */
.welcome-visual-section,
.welcome-header-container {
    opacity: 1; /* Default state */
}

/* Animations classes for JS */
.slide-out-left {
    animation: slideOutLeft 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-in-right {
    animation: slideInRight 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-out-right {
    animation: slideOutRight 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-in-left {
    animation: slideInLeft 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideOutLeft {
    to { transform: translateX(-40px); opacity: 0; }
}
@keyframes slideInRight {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
    to { transform: translateX(40px); opacity: 0; }
}
@keyframes slideInLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-height: 800px) {
    .welcome-modal-content {
        height: 90vh;
    }
    .welcome-visual-section {
        flex: 0.9;
        padding: 0 20px 5px 20px;
    }
    .welcome-info-section {
        padding: 24px 32px 32px 32px;
    }
}

@media (max-width: 600px) {
    .welcome-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-width: 100%;
        max-height: 100%;
    }
    
    .welcome-visual-section svg {
        max-width: 280px;
    }
    
    .welcome-info-section {
        padding: 24px 24px 32px 24px;
    }
    
    .welcome-header-container h2 {
        font-size: 1.5rem;
    }
}
