:root {
    --country-panama: #FF6B35;
    --country-ghana: #28A745;
    --country-mexico: #DC3545;
    --country-portugal: #17A2B8;
    --country-indonesia: #FD7E14;
    --country-thailand: #6F42C1;
    --country-canada: #E83E8C;
    --country-costa-rica: #20C997;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-icon {
    font-size: 4rem;
    color: var(--bs-primary);
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

/* Mobile-first responsive hero icon */
@media (min-width: 768px) {
    .hero-icon {
        font-size: 6rem;
    }
}

@media (min-width: 1024px) {
    .hero-icon {
        font-size: 8rem;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Mobile-first button styling */
.hero-buttons .btn {
    margin-bottom: 1rem;
}

/* Mobile-first spacing improvements */
@media (max-width: 767px) {
    .hero-section {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .display-6 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .trust-item {
        margin-bottom: 1rem;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .display-6 {
        font-size: 2.5rem;
    }
}

/* Chat interface mobile optimizations */
@media (max-width: 767px) {
    .chat-container {
        border-radius: 0.375rem;
        margin: 0 -15px;
    }
    
    .chat-messages {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-input .input-group {
        flex-wrap: nowrap;
    }
    
    .chat-input .form-control {
        min-width: 0;
    }
}

/* Desktop chat improvements */
@media (min-width: 768px) {
    .chat-messages {
        max-height: 70vh;
    }
    
    .message-content {
        max-width: 75%;
    }
}

/* Country Cards */
.country-card {
    transition: all 0.3s ease;
    border-width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

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

.country-flag {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.country-code {
    font-size: 4rem;
    font-weight: 900;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(var(--bs-primary-rgb), 0.3);
    display: block;
    line-height: 1;
}

/* Country-specific code colors */
.country-code[data-country="panama"] {
    color: var(--country-panama);
}

.country-code[data-country="ghana"] {
    color: var(--country-ghana);
}

.country-code[data-country="mexico"] {
    color: var(--country-mexico);
}

.country-code[data-country="portugal"] {
    color: var(--country-portugal);
}

.country-code[data-country="indonesia"] {
    color: var(--country-indonesia);
}

.country-code[data-country="thailand"] {
    color: var(--country-thailand);
}

.country-code[data-country="canada"] {
    color: var(--country-canada);
}

.country-code[data-country="costa-rica"] {
    color: var(--country-costa-rica);
}

/* Country Modal Styling */
.country-code-display {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px 15px 0 0;
}

.modal-body {
    background: var(--bs-dark);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bs-dark);
    border-radius: 0 0 15px 15px;
}



/* Quiz Section */
.quiz-embed {
    border: 2px solid var(--bs-primary);
    transition: all 0.3s ease;
}

/* Quick Facts Clickable Styling */
.quick-fact-link {
    display: block;
    color: inherit;
    transition: all 0.3s ease;
}

.quick-fact-link:hover {
    transform: translateY(-2px);
    color: inherit;
}

.quick-fact-link:hover .quick-fact-card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

.quick-fact-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-fact-card:hover {
    border-opacity: 1 !important;
    background-opacity: 0.2 !important;
}

/* Resource Links Styling */
.resource-links {
    margin: 1rem 0;
}

.resource-links .btn {
    margin: 0.25rem;
    white-space: nowrap;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.resource-links .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.resource-links .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.resource-links .btn-outline-success:hover {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

.resource-links .btn-outline-info:hover {
    background-color: var(--bs-info);
    border-color: var(--bs-info);
}

.resource-links .btn-outline-warning:hover {
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
}

/* Affiliate Partners Section Styling */
.affiliate-partners-section {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.partner-category-card {
    transition: all 0.3s ease;
}

.partner-category-card:hover {
    transform: translateY(-5px);
}

.partner-category-card .card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.partner-category-card:hover .card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.partner-icon {
    transition: all 0.3s ease;
}

.partner-category-card:hover .partner-icon i {
    transform: scale(1.1);
}

.partner-placeholder {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.partner-placeholder:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3);
}

.partner-category-card .btn {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.partner-category-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quiz-form .form-control {
    margin-bottom: 1rem;
}

/* Step Cards */
.step-card {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-icon {
    font-size: 3rem;
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80px;
    margin: 0 auto;
    text-align: center;
}

/* Pricing Cards */
.pricing-card {
    transition: all 0.3s ease;
    border-width: 2px;
}

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

.price-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--bs-primary);
}

.price-period {
    color: var(--bs-secondary);
    font-size: 1rem;
}

.pricing-features li {
    padding: 0.5rem 0;
}

/* Dashboard Styles */
.dashboard-header {
    border-bottom: 3px solid var(--bs-primary);
}

.service-card {
    transition: all 0.3s ease;
    border-width: 2px;
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--bs-primary);
}

.stats-section {
    border: 2px solid var(--bs-secondary);
}

.stat-item i {
    font-size: 2rem;
    color: var(--bs-primary);
}

/* AI Assistant Styles */
.ai-header {
    border-bottom: 3px solid var(--bs-info);
}

.chat-container {
    border: 2px solid var(--bs-secondary);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 400px;
}

.message {
    display: flex;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.ai-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin: 0 0.5rem;
}

.user-message .message-avatar {
    background: var(--bs-success);
    order: 2;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

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

.message-bubble {
    background: var(--bs-secondary);
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    margin-bottom: 0.25rem;
}

.user-message .message-bubble {
    background: var(--bs-primary);
}

.message-time {
    font-size: 0.75rem;
    color: var(--bs-text-muted);
}

.quick-question {
    transition: all 0.3s ease;
}

.quick-question:hover {
    transform: translateY(-2px);
}

/* Admin Styles */
.admin-login {
    border: 2px solid var(--bs-warning);
}

.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.table-section {
    border: 2px solid var(--bs-secondary);
}

.country-stat {
    transition: all 0.3s ease;
}

/* Quick Facts Section */
.quick-facts {
    border-bottom: 1px solid var(--bs-border-color);
}

.quick-fact-card {
    transition: all 0.3s ease;
    cursor: default;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-fact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quick-fact-icon {
    transition: all 0.3s ease;
}

.quick-fact-card:hover .quick-fact-icon {
    transform: scale(1.1);
}

.quick-fact-value {
    font-weight: 600;
    margin: 0;
}

.quick-fact-label {
    font-weight: 500;
    opacity: 0.8;
}

.quick-fact-desc {
    opacity: 0.6;
    font-style: italic;
}

/* Responsive Quick Facts */
@media (max-width: 576px) {
    .quick-fact-card {
        min-height: 120px;
        padding: 0.75rem !important;
    }
    
    .quick-fact-icon i {
        font-size: 1.5rem !important;
    }
    
    .quick-fact-value {
        font-size: 1rem !important;
    }
}

.country-stat:hover {
    transform: translateY(-3px);
}

.country-flag {
    font-size: 2rem;
}

/* Success/Error States */
.success-icon, .cancel-icon {
    font-size: 4rem;
}

.success-icon i {
    color: var(--bs-success);
}

.cancel-icon i {
    color: var(--bs-warning);
}

.thank-you-card, .success-card, .cancel-card {
    border: 2px solid var(--bs-primary);
}

.next-step {
    display: flex;
    align-items: flex-start;
    text-align: left;
}

.step-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.alternative-option {
    text-align: center;
}

.option-icon {
    font-size: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-icon {
        font-size: 4rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .country-flag {
        font-size: 2rem;
    }
    
    .step-icon {
        font-size: 2rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .chat-container {
        height: 500px;
    }
    
    .message-content {
        max-width: 85%;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

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

/* Custom Bootstrap Overrides */
.btn-primary {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--bs-primary-rgb), 0.4);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

.card {
    border-width: 2px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-width: 2px;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 3px;
    }
    
    .btn {
        border-width: 3px;
    }
}

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