/* Custom CSS for $TTR Website */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Navigation Bar Styles */
#navbar {
    background: rgba(26, 37, 47, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: none !important;
    outline: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
    background: rgba(26, 37, 47, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    margin: 16px 18%;
    width: calc(100% - 36%);
    border: none !important;
    outline: none !important;
    transform: translateY(0) scale(1);
}

#navbar.floating {
    background: rgba(26, 37, 47, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    margin: 20px 18%;
    width: calc(100% - 36%);
    border: none !important;
    outline: none !important;
    transform: translateY(0) scale(1.02);
}

/* Hover effects for floating states */
#navbar.scrolled:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    border: none !important;
    outline: none !important;
}

#navbar.floating:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
    border: none !important;
    outline: none !important;
}

/* Ensure smooth transitions for all navbar elements */
#navbar * {
    transition: all 0.3s ease;
}

/* Prevent any browser default outlines and borders */
#navbar,
#navbar:focus,
#navbar:active,
#navbar:hover {
    border: none !important;
    outline: none !important;
    box-shadow: none;
}

#navbar.scrolled,
#navbar.scrolled:focus,
#navbar.scrolled:active {
    border: none !important;
    outline: none !important;
}

#navbar.floating,
#navbar.floating:focus,
#navbar.floating:active {
    border: none !important;
    outline: none !important;
}

/* Mobile responsiveness for floating navbar */
@media (max-width: 768px) {
    #navbar.scrolled {
        margin: 12px 8%;
        width: calc(100% - 16%);
        border-radius: 12px;
    }
    
    #navbar.floating {
        margin: 16px 8%;
        width: calc(100% - 16%);
        border-radius: 16px;
    }
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Apply animations */
.fade-in {
    animation: fadeIn 1s ease-out;
}

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

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Custom hover effects */
.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transition: box-shadow 0.3s ease;
}

/* Navigation active state */
.nav-link.active {
    color: #FFD700;
    border-bottom: 2px solid #FFD700;
}

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

::-webkit-scrollbar-track {
    background: #1A252F;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
    opacity: 0.8;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Section spacing */
section {
    scroll-margin-top: 80px;
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1A252F;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FFA500, #FFD700);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #FFD700;
    border: 2px solid #FFD700;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #FFD700;
    color: #1A252F;
    transform: translateY(-2px);
}

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

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: #FFD700;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Custom focus states for accessibility */
button:focus,
a:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gold {
        background-color: #FFD700 !important;
    }
    
    .text-gold {
        color: #FFD700 !important;
    }
    
    .border-gold {
        border-color: #FFD700 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .navbar,
    .mobile-menu-button,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-navy {
        background: white !important;
        color: black !important;
    }
    
    .bg-gold {
        background: white !important;
        color: black !important;
    }
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Intersection Observer animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Custom grid animations */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.stagger-animation.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animation.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation.visible > *:nth-child(5) { transition-delay: 0.5s; }

/* Custom form styles */
.form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Custom progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Custom tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1A252F;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1A252F transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Custom modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #FFD700;
    text-decoration: none;
}

/* Custom notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #FFD700;
    color: #1A252F;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #ff4444;
    color: white;
}

.notification.success {
    background: #44ff44;
    color: #1A252F;
}

/* Custom loading spinner */
.spinner {
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Custom badge styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gold {
    background: #FFD700;
    color: #1A252F;
}

.badge-navy {
    background: #1A252F;
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-error {
    background: #ef4444;
    color: white;
}