/* PCH-Insurance - Professional Smart Design System */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* Advanced CSS Variables - Professional Design Tokens */
:root {
    /* Primary Brand Colors */
    --pch-blue: #1c75bc;
    --pch-blue-dark: #073f6d;
    --pch-blue-light: #f8e8eb;
    --pch-blue-ultra-light: #fef7f8;

    /* Neutral Palette - Professional Grays */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Semantic Colors */
    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --error: #dc2626;
    --error-light: #fef2f2;
    --info: #0284c7;
    --info-light: #f0f9ff;

    /* Typography System */
    --font-primary: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Manrope', sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

    /* Font Weights */
    --fw-light: 300;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    /* Spacing Scale - Professional Rhythm */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */

    /* Border Radius System */
    --radius-sm: 6px;
    --radius-base: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 50%;

    /* Shadow System - Elevation */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Professional Brand Shadows */
    --shadow-red: 0 10px 15px -3px rgb(227 24 60 / 0.1), 0 4px 6px -4px rgb(227 24 60 / 0.1);
    --shadow-red-glow: 0 0 0 4px rgb(227 24 60 / 0.05);

    /* Animation & Transitions */
    --duration-fast: 150ms;
    --duration-base: 200ms;
    --duration-slow: 300ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    /* Changed to auto - smooth scrolling can cause dizziness */
    scroll-behavior: auto;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--fw-normal);
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

/* Main content headings use primary color */
main h1, main h2, main h3, main h4, main h5, main h6 {
    color: var(--pch-blue);
}

/* Plan card headings (plan names from database) */
.plan-card .card-title,
.plan-card h6,
.card h6,
.card-body h6 {
    color: var(--pch-blue) !important;
}

/* Add space at top of card-body to prevent badge overlap with plan name */
.plan-card .card-body {
    padding-top: 4rem;
}

/* Ensure plan name (card-title) has extra top margin */
.plan-card .card-title,
.plan-card .card-body > h6:first-of-type {
    margin-top: 2rem !important;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: var(--fw-extrabold); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; font-weight: var(--fw-semibold); }

p {
    margin-bottom: var(--space-4);
    color: var(--gray-700);
    line-height: 1.7;
}

.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* Professional Utility Classes */
.text-pch-red { color: var(--pch-blue) !important; }
.bg-pch-red { background-color: var(--pch-blue) !important; }
.border-pch-red { border-color: var(--pch-blue) !important; }

.text-muted { color: var(--gray-500) !important; }
.text-subtle { color: var(--gray-600) !important; }
.text-emphasis { color: var(--gray-900) !important; }

/* Smart Navigation - Executive Style */
.navbar {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--duration-base) var(--ease-out);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: var(--gray-300);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: var(--fw-extrabold);
    font-size: 1.75rem;
    color: var(--pch-blue) !important;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    transition: all var(--duration-base) var(--ease-out);
    letter-spacing: -0.02em;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

/* Professional Logo Mark */
.navbar-brand::before {
    content: '';
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--pch-blue) 0%, var(--pch-blue-dark) 100%);
    border-radius: var(--radius-full);
    display: inline-block;
    position: relative;
    box-shadow: var(--shadow-red);
    transition: all var(--duration-base) var(--ease-out);
}

.navbar-brand:hover::before {
    box-shadow: var(--shadow-red), var(--shadow-red-glow);
    transform: rotate(5deg);
}

.navbar-brand::after {
    content: 'P';
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: var(--fw-extrabold);
    font-size: 1.1rem;
    margin-left: -13px;
    pointer-events: none;
}

.navbar-nav .nav-link {
    font-weight: var(--fw-medium);
    color: var(--pch-blue) !important;
    padding: var(--space-3) var(--space-4) !important;
    border-radius: var(--radius-base);
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
    margin: 0 var(--space-1);
}

.navbar-nav .nav-link:hover {
    color: var(--pch-blue) !important;
    background: var(--pch-blue-ultra-light);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: var(--pch-blue) !important;
    background: var(--pch-blue-light);
    font-weight: var(--fw-semibold);
}

/* Professional Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    margin-top: var(--space-2);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    min-width: 200px;
}

.dropdown-item {
    border-radius: var(--radius-base);
    font-weight: var(--fw-medium);
    padding: var(--space-3) var(--space-4);
    transition: all var(--duration-fast) var(--ease-out);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.dropdown-item:hover {
    background: var(--pch-blue-ultra-light);
    color: var(--pch-blue);
    transform: translateX(4px);
}

/* Executive Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space-16) 0;
    gap: var(--space-8);
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg,
        var(--gray-200) 0%,
        var(--gray-300) 25%,
        var(--pch-blue) 50%,
        var(--gray-300) 75%,
        var(--gray-200) 100%);
    z-index: 0;
    border-radius: 1px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    background: var(--gray-50);
    padding: 0 var(--space-4);
    transition: all var(--duration-slow) var(--ease-out);
}

.step span {
    margin-top: var(--space-4);
    font-weight: var(--fw-semibold);
    font-size: 0.875rem;
    color: var(--gray-600);
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.step.active span {
    color: var(--pch-blue);
    font-weight: var(--fw-bold);
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--fw-bold);
    font-size: 1.1rem;
    position: relative;
    transition: all var(--duration-slow) var(--ease-out);
    border: 3px solid transparent;
    box-shadow: var(--shadow-base);
}

.step-circle.active {
    background: linear-gradient(135deg, var(--pch-blue) 0%, var(--pch-blue-dark) 100%);
    box-shadow: var(--shadow-red), var(--shadow-red-glow);
    transform: scale(1.15);
    border-color: white;
}

.step-circle.pending {
    background: var(--gray-400);
    color: var(--gray-100);
}

.step-circle.completed {
    background: linear-gradient(135deg, var(--success) 0%, #047857 100%);
    color: white;
    animation: completedPulse 2s ease-in-out;
}

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

/* Static Card System - No Animation */
.card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: white;
    /* Remove all transitions */
    transition: none;
    overflow: visible;
    position: relative;
}

/* Remove all card hover effects */
.card::before {
    display: none;
}

.card:hover {
    /* No hover effects */
}

.card-header {
    background: linear-gradient(135deg, var(--pch-blue) 0%, var(--pch-blue-dark) 100%);
    color: white;
    border-bottom: none;
    font-weight: var(--fw-semibold);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all var(--duration-slow) var(--ease-out);
}

.card-header:hover::before {
    right: -10%;
}

.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6,
.card-header p {
    color: white;
    margin-bottom: var(--space-2);
}

.card-header .opacity-75 {
    opacity: 0.85;
    font-size: 0.95rem;
}

.card-body {
    padding: var(--space-8);
}

/* Static Plan Cards - No Animation (Clean UX) */
.plan-card {
    border: 2px solid #ddd;
    /* Remove all transitions */
    transition: none !important;
    animation: none !important;
    cursor: pointer;
    position: relative;
    overflow: visible;
    background: white;
    margin-top: 1rem; /* Add space for badge on top border */
}

/* Remove all plan card animations */
.plan-card::after {
    display: none;
}

.plan-card:hover {
    /* No hover effects - prevents dizziness */
    transform: none !important;
    box-shadow: none !important;
}

.plan-card.selected {
    border-color: var(--pch-blue);
    background: #fef7f8;
    /* No transform or shadow effects */
    transform: none !important;
    box-shadow: none !important;
}

.plan-card.selected::before {
    content: '✓';
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 28px;
    height: 28px;
    background: var(--pch-blue);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: var(--fw-bold);
    z-index: 10;
    /* Remove animation - instant feedback instead */
    animation: none !important;
}

/* Remove dizzy-inducing checkmark animation */

.plan-price {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: var(--fw-extrabold);
    color: var(--pch-blue);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Executive Button System */
.btn {
    font-family: var(--font-primary);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-8);
    transition: all var(--duration-base) var(--ease-out);
    border: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-decoration: none;
    line-height: 1;
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--duration-slow) var(--ease-out);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pch-blue) 0%, var(--pch-blue-dark) 100%);
    color: white;
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--pch-blue-dark) 0%, #b01228 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-red), 0 8px 25px rgba(227, 24, 60, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    border: 2px solid var(--pch-blue);
    color: var(--pch-blue);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--pch-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
}

.btn-lg {
    padding: var(--space-5) var(--space-12);
    font-size: 1.125rem;
    border-radius: var(--radius-xl);
    min-height: 56px;
}

.btn-sm {
    padding: var(--space-2) var(--space-6);
    font-size: 0.875rem;
    border-radius: var(--radius-base);
}

/* Static Form Controls - No Animation (UX-First Design) */
.form-control, .form-select {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    font-weight: normal;
    font-family: var(--font-primary);
    background: white;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    /* Remove all transitions for static feel - prevents dizziness */
    transition: none !important;
    animation: none !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--pch-blue);
    box-shadow: none;
    outline: none;
    background: white;
    color: #333;
    /* No animation on focus */
    transition: none !important;
}

/* Remove hover effects for cleaner interaction */
.form-control:hover, .form-select:hover {
    /* No hover effects - prevents distraction while filling data */
}

.form-label {
    font-weight: var(--fw-semibold);
    color: var(--gray-900);
    margin-bottom: var(--space-3);
    font-size: 1rem;
    line-height: 1.4;
    display: block;
    /* Clear, readable labels */
}

.form-text {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: var(--space-1);
}

/* Executive Alert System */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    font-weight: var(--fw-medium);
    border-left: 4px solid;
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
    opacity: 0.3;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border-left-color: var(--success);
}

.alert-danger {
    background: var(--error-light);
    color: #991b1b;
    border-left-color: var(--error);
}

.alert-info {
    background: var(--info-light);
    color: #0c4a6e;
    border-left-color: var(--info);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-left-color: var(--warning);
}

/* Payment Method Cards - Executive Style */
.payment-method-card {
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-out);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.payment-method-card:hover {
    transform: translateY(-6px);
}

.payment-card {
    border: 2px solid var(--gray-200);
    transition: all var(--duration-base) var(--ease-out);
    border-radius: var(--radius-xl);
    background: white;
    height: 100%;
    position: relative;
}

.payment-card:hover {
    border-color: var(--pch-blue);
    box-shadow: var(--shadow-red);
}

.payment-card.border-primary {
    border-color: var(--pch-blue) !important;
    background: linear-gradient(135deg, white 0%, var(--pch-blue-ultra-light) 100%) !important;
    box-shadow: var(--shadow-red-glow), var(--shadow-lg) !important;
}

.payment-icon {
    padding: var(--space-6);
    position: relative;
}

.payment-icon i {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    transition: all var(--duration-base) var(--ease-out);
}

.payment-method-card:hover .payment-icon i {
    transform: scale(1.1);
}

/* Professional Footer */
footer {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    color: var(--gray-300);
    border-top: 4px solid var(--pch-blue);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: var(--space-20);
}

footer p {
    color: var(--gray-400);
    margin-bottom: 0;
}

/* Advanced Micro-interactions */
.traveler-item {
    border: 2px solid var(--gray-200) !important;
    border-radius: var(--radius-xl) !important;
    background: white;
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.traveler-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--pch-blue) 0%, var(--pch-blue-dark) 100%);
    transition: left var(--duration-slow) var(--ease-out);
}

.traveler-item:hover {
    border-color: var(--pch-blue) !important;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.traveler-item:hover::before {
    left: 0;
}

/* Loading States - Professional */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--pch-blue);
    border-top-color: transparent;
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

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

/* Badge System */
.badge {
    font-weight: var(--fw-semibold);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.bg-primary {
    background: linear-gradient(135deg, var(--pch-blue) 0%, var(--pch-blue-dark) 100%) !important;
    color: white !important;
}

/* Professional Responsive Design */
@media (max-width: 1200px) {
    .card-body { padding: var(--space-6); }
    .step-indicator { margin: var(--space-12) 0; }
}

@media (max-width: 768px) {
    :root {
        --space-16: 2.5rem;
        --space-20: 3rem;
    }

    .navbar-brand { font-size: 1.5rem; }
    .step-indicator { gap: var(--space-4); margin: var(--space-8) 0; }
    .step span { font-size: 0.75rem; }
    .step-circle { width: 40px; height: 40px; font-size: 0.95rem; }
    .card-body { padding: var(--space-5); }
    .btn { padding: var(--space-3) var(--space-6); }
    .btn-lg { padding: var(--space-4) var(--space-8); }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    .plan-price { font-size: 1.75rem; }
}

@media (max-width: 576px) {
    .step { padding: 0 var(--space-2); }
    .step span { font-size: 0.7rem; }
    .navbar-brand::before { width: 32px; height: 32px; }
    .navbar-brand::after { font-size: 1rem; }
}

/* Print Optimization */
@media print {
    .navbar, .btn, .step-indicator { display: none !important; }
    .card { box-shadow: none; border: 1px solid var(--gray-300); }
    body { background: white; }
}

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

/* Focus Management */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 3px solid var(--pch-blue);
    outline-offset: 2px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    :root {
        --pch-blue: #cc0000;
        --pch-blue-dark: #990000;
        --gray-500: #666666;
        --gray-600: #555555;
    }
}

/* Dark Mode Preparation */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #0a0a0a;
        --gray-100: #1a1a1a;
        --gray-900: #fafafa;
        --gray-800: #f5f5f5;
        --gray-700: #e5e5e5;
    }
}

/* Professional Scroll Behavior */
html {
    scroll-padding-top: 100px;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pch-blue);
}