/* CSS Variables - Custom Color Scheme (Minimalist) */
:root {
    /* Primary Colors - Soft Purple/Blue Gradient */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Secondary Colors - Soft Pink/Purple */
    --color-secondary: #8b5cf6;
    --color-secondary-light: #a78bfa;
    --color-secondary-dark: #7c3aed;
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    /* Success - Soft Teal/Blue */
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-success-dark: #059669;
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* Info - Soft Cyan */
    --color-info: #06b6d4;
    --color-info-light: #22d3ee;
    --color-info-dark: #0891b2;
    --gradient-info: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    /* Warning - Soft Amber */
    --color-warning: #f59e0b;
    --color-warning-light: #fbbf24;
    --color-warning-dark: #d97706;
    --gradient-warning: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    
    /* Danger - Soft Red */
    --color-danger: #ef4444;
    --color-danger-light: #f87171;
    --color-danger-dark: #dc2626;
    --gradient-danger: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    
    /* Neutral Colors */
    --color-dark: #1e293b;
    --color-dark-light: #334155;
    --color-light: #f8fafc;
    --color-light-dark: #e2e8f0;
    --color-text: #334155;
    --color-text-muted: #64748b;
    --color-white: #ffffff;
    
    /* Bootstrap-Compatible Variables (for Bootstrap components) */
    --bs-primary: #6366f1;
    --bs-primary-rgb: 99, 102, 241;
    --bs-secondary: #8b5cf6;
    --bs-secondary-rgb: 139, 92, 246;
    --bs-success: #10b981;
    --bs-success-rgb: 16, 185, 129;
    --bs-info: #06b6d4;
    --bs-info-rgb: 6, 182, 212;
    --bs-warning: #f59e0b;
    --bs-warning-rgb: 245, 158, 11;
    --bs-danger: #ef4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-light: #f8fafc;
    --bs-light-rgb: 248, 250, 252;
    --bs-dark: #1e293b;
    --bs-dark-rgb: 30, 41, 59;
    --bs-white: #ffffff;
    --bs-white-rgb: 255, 255, 255;
    --bs-black: #000000;
    --bs-black-rgb: 0, 0, 0;
    
    /* Legacy Bootstrap Variables (without --bs- prefix for compatibility) */
    --primary: #6366f1;
    --primary-color: #6366f1;
    --secondary: #8b5cf6;
    --secondary-color: #8b5cf6;
    --success: #10b981;
    --success-color: #10b981;
    --info: #06b6d4;
    --info-color: #06b6d4;
    --warning: #f59e0b;
    --warning-color: #f59e0b;
    --danger: #ef4444;
    --danger-color: #ef4444;
    --light: #f8fafc;
    --light-color: #f8fafc;
    --dark: #1e293b;
    --dark-color: #1e293b;
    
    /* Bootstrap Border Radius Variables */
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.375rem;
    --bs-border-radius-lg: 0.75rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-2xl: 1.5rem;
    --bs-border-radius-pill: 50rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --bs-box-shadow-sm: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    --bs-box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --bs-box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius - Small and Consistent */
    --border-radius: 0.5rem;
    --border-radius-sm: 0.375rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #334155;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    min-height: 100vh;
}

/* Enhanced Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.navbar .container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.navbar.navbar-dark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.navbar .navbar-brand {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.navbar .navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.navbar .navbar-brand .brand-text {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: none;
    position: relative;
    display: inline-block;
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.navbar .navbar-brand .brand-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 3s linear infinite;
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    margin: 0 0.25rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.navbar .nav-link i {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .btn-light {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #667eea !important;
    border: none;
}

.navbar .btn-light:hover {
    background: #ffffff !important;
    color: #764ba2 !important;
}

/* Modern Cards - Small Border Radius */
.card {
    border: none;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: #ffffff;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card .card-body {
    padding: 1.5rem;
}

.card .card-title {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.75rem;
}

.card .card-text {
    color: #64748b;
    line-height: 1.8;
}

/* Enhanced Buttons - Small Border Radius */
.btn {
    border-radius: var(--border-radius-sm) !important;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
    color: white !important;
    border: none;
}

.btn.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
    color: white !important;
    border: none;
}

.btn.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
    color: white !important;
    border: none;
}

.btn.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
    color: white !important;
    border: none;
}

.btn.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%) !important;
    color: white !important;
    border: none;
}

.btn.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.btn-secondary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
    color: white !important;
    border: none;
}

.btn.btn-secondary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn.btn-light {
    background: white;
    color: var(--bs-primary);
    box-shadow: var(--shadow-sm);
}

.btn.btn-light:hover {
    background: #f8fafc;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    color: #ffffff !important;
}

.hero-section h1 i {
    color: #ffffff !important;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.95) !important;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.95) !important;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section i {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Country Cards - Small Border Radius */
.country-card {
    background: white;
    border-radius: var(--border-radius) !important;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--bs-primary);
    cursor: pointer;
}

.country-card:hover {
    transform: translateX(8px) translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-left-width: 6px;
    border-left-color: var(--bs-secondary);
}

/* Country Flag Images */
.country-flag-img,
.country-flag-preview-img {
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.country-card .country-flag-img {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.country-flag-preview-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

.country-card .country-flag {
    font-size: 2rem;
    margin-right: 1rem;
    display: inline-block;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", "EmojiOne Mozilla", "Twemoji Mozilla", "Segoe UI", sans-serif;
    font-style: normal;
    font-weight: normal;
    -webkit-font-feature-settings: "liga";
    font-feature-settings: "liga";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    vertical-align: middle;
    /* Force emoji rendering in Chrome */
    unicode-bidi: bidi-override;
    direction: ltr;
    /* Chrome-specific fixes */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Prevent country code display */
    font-variant-emoji: emoji;
    /* Ensure proper spacing */
    min-width: 1.5em;
    text-align: center;
}

.country-card .country-name {
    font-weight: 600;
    color: var(--bs-dark);
    text-decoration: none;
    font-size: 1.1rem;
}

.country-card .country-name:hover {
    color: var(--bs-primary);
}

/* Quote Cards - Small Border Radius */
.quote-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 4px solid var(--bs-info);
    border-radius: var(--border-radius) !important;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.quote-card::before {
    content: '"';
    font-size: 5rem;
    position: absolute;
    top: -10px;
    left: 20px;
    color: rgba(6, 182, 212, 0.1);
    font-family: Georgia, serif;
}

.quote-card::after {
    content: '"';
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 4rem;
    color: rgba(6, 182, 212, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.quote-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left-width: 6px;
    border-left-color: var(--bs-primary);
}

.quote-card .quote-text {
    font-size: 1.125rem;
    font-style: italic;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.quote-card .quote-author {
    font-weight: 600;
    color: var(--bs-dark);
    text-decoration: none;
}

.quote-card .quote-author:hover {
    color: var(--bs-primary);
}

/* Enhanced Tables - Small Border Radius */
.table {
    background: white;
    border-radius: var(--border-radius) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    color: var(--bs-dark) !important;
    background: var(--bs-light) !important;
}

.table td {
    color: var(--color-text) !important;
}

.table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 600;
    color: var(--bs-dark);
    padding: 1rem;
    border: none;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    vertical-align: middle;
}

.table tr {
    transition: all 0.2s ease;
}

.table tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
}

/* Letter Navigation - Small Border Radius */
.nav-pills {
    background: white;
    border-radius: var(--border-radius) !important;
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.nav-pills .nav-link {
    border-radius: var(--border-radius-sm) !important;
    color: var(--color-text) !important;
}

.nav-pills .nav-link.active {
    background: var(--bs-primary) !important;
    color: #ffffff !important;
}

.nav-pills .nav-link {
    color: #333333 !important;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-pills .nav-link:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.nav-pills .nav-link.active {
    background: var(--bs-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-md);
}

/* Section Headings - DRY Reusable Styles */
.section-heading,
h1.section-heading,
h2.section-heading,
h3.section-heading,
h4.section-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-dark) !important;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
    line-height: 1.3;
}

.section-heading::after,
h1.section-heading::after,
h2.section-heading::after,
h3.section-heading::after,
h4.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--bs-primary);
    border-radius: var(--border-radius-sm);
}

/* Page Headings - Consistent Styling */
.page-heading,
.hero-section h1,
.hero-section h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5 {
    color: #ffffff !important;
    font-weight: 600;
    margin: 0;
}

/* Content Headings - Ensure Visibility */
h1, h2, h3, h4, h5, h6 {
    color: var(--bs-dark) !important;
    font-weight: 600;
}

.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6 {
    color: var(--bs-dark) !important;
}

/* Text Visibility */
.text-muted {
    color: var(--color-text-muted) !important;
}

p, .card-text {
    color: var(--color-text) !important;
    line-height: 1.7;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #e2e8f0 !important; /* Light gray text for better contrast */
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Footer Text Colors - Ensure Readability */
footer,
footer p {
    color: #cbd5e1 !important; /* Light gray instead of muted gray for better contrast */
}

footer .text-muted {
    color: #94a3b8 !important; /* Lighter gray for muted text - still readable */
}

footer h5,
footer h4,
footer h3,
footer h2,
footer h1 {
    color: #ffffff !important; /* Pure white for headings */
    font-weight: 600;
}

footer a {
    color: #e2e8f0 !important; /* Light gray for links */
    transition: all 0.3s ease;
}

footer a:hover {
    color: #ffffff !important; /* White on hover for better visibility */
    transform: translateX(5px);
}

footer .text-light {
    color: #e2e8f0 !important; /* Ensure text-light is visible */
}

footer .footer-brand {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #ffffff;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.25) !important; /* Lighter border for visibility */
    opacity: 1 !important;
    background-color: rgba(255, 255, 255, 0.25) !important;
}

footer small {
    color: #cbd5e1 !important; /* Light gray for small text */
}

footer i {
    color: #e2e8f0 !important; /* Light gray for icons */
}

footer .text-danger {
    color: #f87171 !important; /* Lighter red for heart icon visibility */
}

/* Breadcrumb Styles */
.breadcrumb-nav {
    background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%) !important;
    border-bottom: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 0;
}

.breadcrumb-item {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.breadcrumb-item a:hover {
    color: #ffffff !important;
    text-decoration: underline;
    transform: translateX(2px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.breadcrumb-item.active {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #ffffff;
    padding: 0 0.5rem;
    font-weight: 700;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Scroll to Top Button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.scroll-to-top-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.scroll-to-top-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top-btn i {
    line-height: 1;
}

/* Responsive Scroll to Top Button */
@media (max-width: 768px) {
    .scroll-to-top-btn {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .scroll-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .scroll-to-top-btn:hover {
        transform: translateY(0);
    }
    
    .scroll-to-top-btn:active {
        transform: scale(0.95);
    }
}

/* Utility Classes */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-secondary {
    background: var(--gradient-secondary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-info {
    background: var(--gradient-info) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-md);
}

/* Card Header Styles */
.card-header {
    border-bottom: none;
    font-weight: 600;
}

.card-header.bg-gradient-primary,
.card-header.bg-gradient-secondary,
.card-header.bg-gradient-success,
.card-header.bg-gradient-info,
.card-header.bg-gradient-warning {
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Enhanced Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm) !important;
    transition: all 0.3s ease;
}

.badge.bg-primary { background-color: var(--bs-primary) !important; }
.badge.bg-success { background-color: var(--bs-success) !important; }
.badge.bg-warning { background-color: var(--bs-warning) !important; }
.badge.bg-danger { background-color: var(--bs-danger) !important; }
.badge.bg-info { background-color: var(--bs-info) !important; }
.badge.bg-secondary { background-color: var(--bs-secondary) !important; }

.badge:hover {
    transform: scale(1.05);
}

/* Enhanced Pagination - Small Border Radius */
.pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pagination .page-link {
    border-radius: var(--border-radius-sm) !important;
    margin: 0;
    transition: all 0.3s ease;
    color: var(--color-text) !important;
    white-space: nowrap;
    min-width: auto;
    padding: 0.5rem 0.75rem;
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.pagination .page-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pagination .page-item.active .page-link {
    box-shadow: var(--shadow-md);
}

/* Ensure pagination buttons don't overflow */
.pagination .page-item {
    flex-shrink: 0;
}

.pagination .page-link i {
    font-size: 0.875rem;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Improvements */

/* Extra Large Devices (Large Desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .section-heading {
        font-size: 3rem;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-heading {
        font-size: 2.25rem;
    }
    
    .navbar .navbar-brand {
        font-size: 1.5rem;
    }
    
    .country-map-container {
        height: 300px;
    }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .section-heading {
        font-size: 2rem;
    }
    
    .navbar .navbar-brand {
        font-size: 1.4rem;
    }
    
    .navbar .navbar-brand .brand-text {
        font-size: 1.4rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .country-map-container {
        height: 280px;
    }
    
    .quote-card {
        padding: 1.5rem;
    }
    
    .country-card {
        padding: 1.25rem;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-section h1 i {
        font-size: 1.5rem !important;
        margin-right: 0.5rem !important;
    }
    
    .hero-section p,
    .hero-section .lead {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .section-heading {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar .navbar-brand .brand-text {
        font-size: 1.25rem;
        letter-spacing: -0.3px;
    }
    
    .navbar .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.95rem;
    }
    
    .navbar .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: var(--border-radius);
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .card-header h4,
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .country-card,
    .quote-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .country-card:hover,
    .quote-card:hover {
        transform: none;
    }
    
    .country-card .country-flag {
        font-size: 1.5rem;
        margin-right: 0.75rem;
        display: inline-block;
        line-height: 1;
        font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", "EmojiOne Mozilla", "Twemoji Mozilla", "Segoe UI", sans-serif;
        vertical-align: middle;
    }
    
    .country-card .country-name {
        font-size: 1rem;
    }
    
    .quote-card .quote-text {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }
    
    .country-map-container {
        height: 250px;
    }
    
    .table {
        font-size: 0.875rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    .nav-pills {
        padding: 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-pills .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        margin: 0.125rem;
        min-width: 40px;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    footer {
        padding: 2rem 0 !important;
    }
    
    footer .row > div {
        margin-bottom: 1.5rem;
    }
    
    footer h5 {
        font-size: 1.1rem;
    }
    
    footer p {
        font-size: 0.9rem;
    }
    
    .badge {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
        margin: 0;
        white-space: nowrap;
    }
    
    .pagination .page-link i {
        font-size: 0.75rem;
    }
}

/* Very Small Devices (Small Phones, less than 400px) */
@media (max-width: 399.98px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 0.875rem;
    }
    
    .section-heading {
        font-size: 1.5rem;
    }
    
    .navbar .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar .navbar-brand .brand-text {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .country-card,
    .quote-card {
        padding: 0.875rem;
    }
    
    .country-map-container {
        height: 200px;
    }
    
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .table {
        font-size: 0.8125rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.375rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .card {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    .country-card:hover,
    .quote-card:hover,
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .nav-link:hover {
        transform: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section h1 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Map Styles */
.country-map-container {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    overflow: hidden;
    min-height: 200px;
}

.country-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 200px;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .country-map-container {
        display: none;
    }
}

/* Homepage Styles */
.hero-section-home {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-section-home .text-white,
.hero-section-home h1,
.hero-section-home p,
.hero-section-home .lead {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 20%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.min-vh-50 {
    min-height: 50vh;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-slide-up-delay {
    animation: slideUp 1s ease-out 0.2s both;
}

.animate-fade-in-delay {
    animation: fadeIn 1.2s ease-out 0.4s both;
}

/* Statistics Cards - Small Border Radius */
.stat-card {
    background: white;
    border-radius: var(--border-radius) !important;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
}

.stat-card h3,
.stat-card .stat-number {
    color: var(--bs-dark) !important;
}

.stat-card .stat-label {
    color: var(--color-text-muted) !important;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card-primary { border-left: 4px solid #667eea; }
.stat-card-success { border-left: 4px solid #10b981; }
.stat-card-warning { border-left: 4px solid #f59e0b; }
.stat-card-danger { border-left: 4px solid #ef4444; }
.stat-card-info { border-left: 4px solid #06b6d4; }
.stat-card-secondary { border-left: 4px solid #8b5cf6; }
.stat-card-dark { border-left: 4px solid #1e293b; }

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon { background: rgba(102, 126, 234, 0.1); color: #667eea; }
.stat-card-success .stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-card-warning .stat-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-card-danger .stat-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.stat-card-info .stat-icon { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.stat-card-secondary .stat-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-card-dark .stat-icon { background: rgba(30, 41, 59, 0.1); color: #1e293b; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    color: #1e293b;
}

.stat-label {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Highlight Cards - Small Border Radius */
.highlight-card {
    background: white;
    border-radius: var(--border-radius) !important;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
    border-top: 4px solid;
}

.highlight-card h4,
.highlight-card h5 {
    color: var(--bs-dark) !important;
    font-weight: 600;
}

.highlight-card p {
    color: var(--color-text) !important;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.highlight-card-warning { border-top-color: #f59e0b; }
.highlight-card-danger { border-top-color: #ef4444; }
.highlight-card-primary { border-top-color: #667eea; }

.highlight-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.highlight-card-warning .highlight-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.highlight-card-danger .highlight-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.highlight-card-primary .highlight-icon { background: rgba(102, 126, 234, 0.1); color: #667eea; }

/* Feature Cards - Small Border Radius */
.feature-card {
    background: white;
    border-radius: var(--border-radius) !important;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    border: 2px solid transparent;
}

.feature-card h3,
.feature-card h4,
.feature-card h5 {
    color: var(--bs-dark) !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--color-text-muted) !important;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: currentColor;
}

.feature-card-primary { color: var(--bs-primary) !important; }
.feature-card-success { color: var(--bs-success) !important; }
.feature-card-warning { color: var(--bs-warning) !important; }
.feature-card-danger { color: var(--bs-danger) !important; }
.feature-card-dark { color: var(--bs-dark) !important; }
.feature-card-space { color: #1e3a8a !important; }
.feature-card-info { color: var(--bs-info) !important; }
.feature-card-secondary { color: var(--bs-secondary) !important; }

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Set icon backgrounds with custom gradients like Space */
.feature-card-primary .feature-icon {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
}

.feature-card-success .feature-icon {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
}

.feature-card-warning .feature-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
}

.feature-card-danger .feature-icon {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
}

.feature-card-info .feature-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%) !important;
}

.feature-card-secondary .feature-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
}

.feature-card-space .feature-icon {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
}

.btn-space {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border: none;
    color: white;
}

.btn-space:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

/* Preview Cards */
.preview-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.preview-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.preview-card a,
.preview-card strong {
    color: #ffffff !important;
}

.country-flag-preview {
    font-size: 2rem;
    line-height: 1;
}

.quote-preview-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-preview-card p,
.quote-preview-card small {
    color: #ffffff !important;
}

/* CTA Card - Small Border Radius */
.cta-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: var(--border-radius) !important;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.cta-card h2,
.cta-card h3 {
    color: var(--bs-dark) !important;
}

.cta-card p {
    color: var(--color-text) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section-home {
        padding: 4rem 0;
        min-height: 60vh;
    }
    
    .hero-section-home h1 {
        font-size: 2.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .shape-1, .shape-2, .shape-3 {
        display: none;
    }
}

