/*Custom styles for Cannon Insurance Travel Insurance*/

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

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

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

.slide-in-left-mobile {
    animation: slideInLeft 0.6s ease-out;
}

@media (min-width: 768px) {
    .slide-in-left-mobile {
        animation: none;
    }
}

/* Animation delays for sequential sliding */
.slide-in-left:nth-child(1), .slide-in-right:nth-child(1) { animation-delay: 0.1s; }
.slide-in-left:nth-child(2), .slide-in-right:nth-child(2) { animation-delay: 0.2s; }
.slide-in-left:nth-child(3), .slide-in-right:nth-child(3) { animation-delay: 0.3s; }
.slide-in-left:nth-child(4), .slide-in-right:nth-child(4) { animation-delay: 0.4s; }
.slide-in-left:nth-child(5), .slide-in-right:nth-child(5) { animation-delay: 0.5s; }

/* Horizontal carousel with snap-to-card */
.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    scroll-behavior: smooth;
}

.carousel-container::-webkit-scrollbar {
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Carousel cards - fit container with float feel */
.carousel-card {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: min(85%, 340px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
    box-shadow:
        0 8px 24px rgba(53, 41, 106, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(53, 41, 106, 0.06);
    will-change: transform;
}

.carousel-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 24px 48px rgba(53, 41, 106, 0.18),
        0 8px 16px rgba(0, 0, 0, 0.08);
}

/* Desktop grid with preserved float */
@media (min-width: 768px) {
    .carousel-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
    }
    .carousel-card {
        width: auto;
        scroll-snap-align: none;
    }
}

@media (min-width: 1024px) {
    .carousel-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Nav Buy CTA - only visible on product pages after scrolling past hero */
.nav-buy-cta {
    display: none !important;
}

body.product-page .nav-buy-cta {
    display: inline-flex !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

body.product-page .nav-buy-cta.nav-buy-cta-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, rgb(53, 41,106) 0%, rgb(53, 41,106) 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgb(53, 41,106) 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Card styles */
.card-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Form styles */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Table styles */
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid rgb(53, 41,106);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .grid-responsive {
        grid-template-columns: 1fr;
    }
}

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

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

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

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

/* Moved from views/index.ejs */
:root {
    --primary-color: rgb(53, 41,106);
    --primary-hover: rgb(45, 31,95);
    --primary-light: rgb(74, 85,104);
    --primary-rgb: 53, 46, 116;
    --secondary-color: rgb(240,103,36);
    --secondary-hover: rgb(209, 95,31);
    --secondary-rgb: 232, 112, 39;
    --accent-color: rgb(5, 150,105);
    --accent-hover: rgb(4, 120,87);
    --text-primary: #ffffff;
    --text-secondary: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-primary-hover {
    background-color: var(--primary-hover);
}

.bg-primary-light {
    background-color: var(--primary-light);
}

.text-primary {
    color: var(--primary-color);
}

.border-primary {
    border-color: var(--primary-color);
}

.bg-secondary {
    background-color: var(--secondary-color);
}

.bg-secondary-hover {
    background-color: var(--secondary-hover);
}

.text-secondary {
    color: var(--secondary-color);
}

.border-secondary {
    border-color: var(--secondary-color);
}

.bg-accent {
    background-color: var(--accent-color);
}

.bg-accent-hover {
    background-color: var(--accent-hover);
}

.accent-darkpurple{
    color: var(--primary);
}

.text-accent {
    color: var(--accent-color);
}

.text-white {
    color: var(--text-primary);
}

.text-light {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.bg-white {
    background-color: var(--bg-card);
}

.bg-light {
    background-color: var(--bg-light);
}

.border-light {
    border-color: var(--border-color);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-hover) 100%);
}

.gradient-blend {
    background: linear-gradient(135deg,
            rgba(var(--primary-rgb), 0.9) 0%,
            rgba(var(--secondary-rgb), 0.8) 50%,
            rgba(var(--primary-rgb), 0.9) 100%);
}

.glass-primary {
    background: rgba(var(--primary-rgb), 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.glass-secondary {
    background: rgba(var(--secondary-rgb), 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--secondary-rgb), 0.2);
}

.shadow-primary {
    box-shadow: 0 10px 25px -5px rgba(var(--primary-rgb), 0.15);
}

.shadow-secondary {
    box-shadow: 0 10px 25px -5px rgba(var(--secondary-rgb), 0.15);
}

.hero-bg {
    position: relative;
    overflow: hidden;
    background-image: url('/images/hero.webp');
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; 
    /* background: var(--primary-color); */
}

.plans-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(430px, 44vw, 600px);
    background-color: var(--primary-color);
    background-image: url('/images/plans-hero.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.plans-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(53, 41, 106, 0.98) 0%,
        rgba(53, 41, 106, 0.92) 27%,
        rgba(53, 41, 106, 0.62) 49%,
        rgba(53, 41, 106, 0.16) 78%,
        rgba(53, 41, 106, 0) 100%
    );
}

.plans-hero__content {
    min-height: inherit;
    display: flex;
    align-items: center;
}

.plans-hero__copy {
    position: relative;
    z-index: 1;
}

.plans-hero__eyebrow,
.plans-hero__trust span {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plans-hero__eyebrow {
    letter-spacing: 0.01em;
}

.plans-hero__trust span {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .plans-hero {
        min-height: 640px;
        background-image: url('/images/plans-hero-mobile.svg');
        background-position: center bottom;
    }

    .plans-hero::before {
        background: linear-gradient(
            180deg,
            rgba(53, 41, 106, 0.98) 0%,
            rgba(53, 41, 106, 0.86) 44%,
            rgba(53, 41, 106, 0.28) 100%
        );
    }

    .plans-hero__content {
        min-height: 640px;
        align-items: flex-start;
    }
}

.standard-bg {
    position: relative;
    overflow: hidden;
    background-image: url('/images/standard2.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    height: auto;
}

.students-quote-bg {
    position: relative;
    overflow: hidden;
    background-image: url('/images/students.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    height: auto;
}

.pilgrimage-quote-bg {
    position: relative;
    overflow: hidden;
    background-image: url('/images/pilgimage.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    height: auto;
}

.corporate-quote-bg {
    position: relative;
    overflow: hidden;
    background-image: url('/images/corporate.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    height: auto;
}

.domestic-quote-bg {
    position: relative;
    overflow: hidden;
    background-image: url('/images/domestic.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    height: auto;
}

.hero3-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(53, 41, 106, 0.85), rgba(53, 41, 106, 0.4));
    z-index: 1;
}

.login-bg {
            background-image: url('../images/nightcamp.jpg');
            background-size: cover;
            /* background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed; This locks the background */
            filter: blur;
            
}    


.quote-bg {
    /* position: relative; */
    overflow: hidden;
    background-image: url('/images/hero2.jpg');
    /* background-size: cover; */
    /*background-position: center; */
    background-repeat: no-repeat;
    background-attachment: fixed; 
    
    /* background: var(--primary-color); */
}

@media (max-width: 640px) {
    .hero-bg {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }
    .hero3-bg {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }
}

.hero-bg::before,
.hero-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.75;
    animation: float 18s ease-in-out infinite;
}

.hero-bg::before {
    width: 420px;
    height: 420px;
    top: -18%;
    right: -15%;
    background: rgba(var(--secondary-rgb), 0.22);
}

.hero-bg::after {
    width: 340px;
    height: 340px;
    bottom: -14%;
    left: -12%;
    background: rgba(var(--primary-rgb), 0.18);
    animation-duration: 24s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-24px) scale(1.05);
    }
}

.nav-link {
    transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.mobile-nav {
    display: none;
}

.menu-toggle {
    outline: none;
}

.hero-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    min-height: 96px;
}

@media (max-width: 768px) {
    .mobile-nav:not(.hidden) {
        display: block;
    }

    .desktop-nav {
        display: none;
    }
}

.benefit-card {
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.benefit-card.selected {
    border-color: #e87027;
    background-color: #fff7ed;
}

input,
select {
    border-color: #e87027 !important;
    outline: none;
}

input:focus,
select:focus {
    box-shadow: 0 0 0 2px #e87027;
}

.step-indicator {
    transition: all 0.2s;
}

.select2-container--default .select2-selection--single {
    border-color: #e87027 !important;
    border-radius: 0.5rem;
    height: 44px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    color: #1f2937;
}

.select2-dropdown {
    border-color: #e87027 !important;
}