/* General Styles */
:root {
    /* Blue Palette */
    --primary-blue: #024157;
    --primary-blue-light: #105670;
    --primary-blue-lighter: #6BA3BE;
    
    /* Yellow/Orange Palette */
    --primary-yellow: #FFB700;
    --primary-yellow-light: #FFC107;
    --primary-yellow-lighter: #FFECB3;
    --primary-orange: #FF9800;
    --primary-orange-dark: #F57C00;

    /* Gray Palette */
    --gray-100: #ffffff;
    --gray-200: #f8f9fa;
    --gray-300: #e9ecef;
    --gray-400: #dee2e6;
    --gray-500: #ced4da;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Theme Colors */
    --primary-color: #024157;
    --secondary-color: #FFB700;
    --accent-color: #FF9800;
    --light-color: #ffffff;
    --dark-color: #024157;
    --success-color: #6BA3BE;
    --danger-color: #FF9800;
    --warning-color: #FFB700;
    --info-color: #105670;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-900);
    /* Darker, more readable text */
    background-color: var(--gray-100);
    line-height: 1.6;
    padding-top: 76px;
    /* Height of fixed navbar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* Navbar */
.navbar {
    padding: 0.75rem 0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.1);
    background-color: white !important;
    backdrop-filter: blur(10px);
    height: 76px;
    border-bottom: 2px solid var(--primary-yellow);
}

/* Navbar Menu Spacing */
.navbar-nav {
    gap: 0.5rem;
}

@media (min-width: 992px) {
    .navbar-nav {
        gap: 1.5rem;
    }
}

/* Slide-in Animations */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation Classes */
.slide-in-left {
    animation: slideInFromLeft 1s ease-out forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInFromRight 1s ease-out forwards;
    opacity: 0;
}

/* Delay for staggered animations */
.delay-1 {
    animation-delay: 0.3s;
}

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

.delay-3 {
    animation-delay: 0.9s;
}

.nav-item {
    position: relative;
}

.nav-link {
    padding: 0.5rem 1rem !important;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-yellow);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Mobile Menu Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        border-radius: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        padding: 1rem;
        margin-top: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .navbar-nav {
        padding: 0.5rem 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 0.375rem;
        transition: all 0.2s ease;
    }

    .nav-link:hover,
    .nav-link:focus {
        background-color: var(--gray-100);
    }

    .d-flex.gap-2 {
        padding-top: 1rem;
        border-top: 1px solid var(--gray-200);
        margin-top: 0.5rem;
    }
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-yellow) !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* Logo Responsive Styles */
.navbar-logo {
    height: 50px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Desktop - larger logo */
@media (min-width: 992px) {
    .navbar-logo {
        height: 55px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-logo {
        height: 45px;
    }
}

/* Mobile - smaller logo */
@media (max-width: 767.98px) {
    .navbar-logo {
        height: 40px;
    }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    .navbar-logo {
        height: 35px;
    }
}

/* Brand text responsive sizing */
.navbar-brand span span {
    transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
    .navbar-brand span span {
        font-size: 28px !important;
    }
}

@media (max-width: 767.98px) {
    .navbar-brand span span {
        font-size: 24px !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand span span {
        font-size: 20px !important;
    }
}

/* Duplicate nav-link removed - defined above */

/* Buttons */
.btn {
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Primary Button - solid yellow/gold */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-orange));
    border: none;
    color: var(--gray-900);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-yellow-light));
    border: none;
    color: var(--gray-900);
}

/* Text Gradients (for headings, not buttons) */
.text-gradient-1 {
    background: linear-gradient(45deg, var(--primary-yellow), var(--primary-orange));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-2 {
    background: linear-gradient(45deg, #F5F5F5, #E0E0E0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Animation for the heading */
@keyframes textShine {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.text-animation h1 {
    animation: textShine 8s ease-in-out infinite;
    background-size: 200% auto;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-warning:hover,
.btn-warning:focus {
    background: linear-gradient(135deg, var(--primary-yellow-light), var(--primary-orange));
    border: none;
    color: var(--gray-900);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 200, 0, 0.4);
}

/* Focus visible for accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid var(--primary-yellow);
    outline-offset: 2px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 0.2rem rgba(255, 183, 0, 0.25);
}

/* Outline Buttons */
.btn-outline-primary,
.btn-outline-warning {
    color: var(--gray-900);
    border: 2px solid var(--primary-yellow);
    background-color: transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-warning:hover,
.btn-outline-warning:focus {
    color: var(--gray-900);
    border-color: var(--primary-yellow);
    background-color: rgba(255, 183, 0, 0.1);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(255, 200, 0, 0.3);
}

/* Button Icons */
.btn i {
    margin-right: 8px;
    transition: all 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

/* Button Hover Effect */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%) skewX(-15deg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn:hover::after {
    transform: translateX(100%) skewX(-15deg);
}

/* Pulse Animation for CTA Buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 200, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 200, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 200, 0, 0);
    }
}

.btn-cta {
    animation: pulse 2s infinite;
    position: relative;
    z-index: 1;
}

/* Icon Styles */
.feature-icon,
.icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.15), rgba(255, 152, 0, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-yellow);
    margin: 0 auto 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 200, 0, 0.3);
    box-shadow: 0 5px 15px rgba(255, 200, 0, 0.1);
}

.feature-icon i,
.icon-box i {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon,
.icon-box:hover {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-orange));
    color: var(--gray-100);
    transform: translateY(-5px) rotate(5deg) scale(1.1);
    box-shadow: 0 15px 30px rgba(255, 200, 0, 0.3);
    border-color: #FFD700;
}

.feature-card:hover .feature-icon i,
.icon-box:hover i {
    transform: scale(1.2);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-yellow-light) 50%, var(--primary-orange) 100%);
    color: var(--gray-900);
    /* Darker text for better readability */
    position: relative;
    overflow: hidden;
    margin-top: -76px;
    padding-top: 10rem;
    border-bottom: 3px solid var(--primary-yellow-dark);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.hero h1 {
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p.lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Features Section */
.feature-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-yellow);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 183, 0, 0.2);
    border-color: var(--primary-orange);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 183, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-orange);
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-yellow);
}

.feature-card:hover .feature-icon {
    background: var(--primary-yellow);
    color: var(--gray-900);
    transform: rotate(10deg) scale(1.1);
}

/* Chatbot Styles */
#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#chatbot-container {
    transition: all 0.3s ease;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 90%;
    max-width: 350px;
    height: 0;
    opacity: 0;
    overflow: hidden;
    z-index: 1000;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

#chatbot-container.show {
    height: 70vh;
    max-height: 600px;
    min-height: 400px;
    opacity: 1;
}

/* Floating Calculator Button (Mobile) */
#floating-calculator {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(249, 247, 247, 0.2);
    transition: all 0.3s ease;
    display: none;
    /* Hidden by default, shown on mobile */
    background: linear-gradient(45deg, var(--primary-yellow), var(--primary-orange));
    border: none;
    color: var(--gray-100);
    font-size: 1.5rem;
}

#floating-calculator:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {

    /* Show floating calculator on mobile */
    #floating-calculator {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Adjust chatbot button position when calculator is visible */
    #chatbot-toggle {
        bottom: 90px;
    }

    #chatbot-toggle {
        width: 56px;
        height: 56px;
        bottom: 16px;
        right: 16px;
    }

    #chatbot-container {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    #chatbot-container .card {
        border-radius: 12px;
    }

    #chatbot-container .card-header {
        padding: 0.75rem 1rem;
    }

    #chatbot-messages {
        max-height: calc(70vh - 120px) !important;
    }
}

/* Make chat messages more touch-friendly on mobile */
.chat-message {
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
    border-radius: 1rem;
    max-width: 85%;
    word-wrap: break-word;
}

/* Improve input area for mobile */
.chat-input-container {
    padding: 0.75rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 1rem;
}

.chat-message .message-content {
    display: inline-block;
    max-width: 80%;
}

.bot-message .message-content {
    background-color: #f1f3f5;
}

.user-message {
    text-align: right;
}

.user-message .message-content {
    background-color: var(--primary-color);
    color: white;
}

/* Timeline Steps */
.timeline-steps {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    padding: 2rem 0;
}

.timeline-step {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    max-width: 200px;
    margin-bottom: 1.5rem;
}

.timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .hero {
        text-align: center;
        padding: 5rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .timeline-step {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 2.5rem;
    }

    .timeline-step:nth-child(odd)::after {
        right: 0;
        left: 50%;
    }

    .timeline-step:nth-child(even)::after {
        display: none;
    }

    .timeline-step:last-child::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }

    .timeline-step {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .timeline-step::after {
        display: none !important;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Footer Styles */
footer a.text-white-50:hover {
    color: var(--primary-yellow) !important;
}

footer .social-links a {
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

/* Form Labels */
.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Loading button state */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    margin-right: 0.5rem;
}