/* Enhanced CSS for Modern Insurance Website UI/UX */

/* ============= CSS CUSTOM PROPERTIES ============= */
:root {
    --primary-color: #592260;
    --secondary-color: #00a89c;
    --primary-light: #f3e9f4;
    --footer-dark-color: #2c1030;
    --text-dark: #333;
    --text-light: #555;
    --border-color: #e2e8f0;
    --error-color: #e74c3c;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* ============= BASE STYLES ============= */
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background-color: #f8fafc;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

/* ============= MODERN GLASSMORPHISM EFFECTS ============= */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============= ENHANCED BUTTON STYLES ============= */
.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-size: 1rem;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

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

.btn-gradient:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 168, 156, 0.3);
}

.btn-gradient:active {
    transform: translateY(-1px) scale(1.02);
}

/* ============= MODERN TAB SYSTEM ============= */
.hero-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 8px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tab-item {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    position: relative;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    white-space: nowrap;
}

.tab-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

.tab-item:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: scale(1.01);
}

/* ============= ENHANCED FLOATING ICONS ============= */
.floating-icon {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 1.5rem;
    color: white;
    animation: float 6s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.floating-icon.glow {
    box-shadow: 
        0 0 30px var(--secondary-color),
        0 0 60px rgba(0, 168, 156, 0.4),
        0 0 90px rgba(0, 168, 156, 0.2);
    background: rgba(0, 168, 156, 0.2);
    border-color: var(--secondary-color);
    transform: scale(1.2);
}

.floating-icon-1 { top: 15%; left: 10%; animation-delay: 0s; }
.floating-icon-2 { top: 65%; left: 8%; animation-delay: 2s; }
.floating-icon-3 { top: 20%; right: 12%; animation-delay: 1s; }
.floating-icon-4 { top: 75%; right: 15%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-15px) rotate(2deg); 
    }
    50% { 
        transform: translateY(-25px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-10px) rotate(-2deg); 
    }
}

/* ============= MODERN SELECT DROPDOWN (HERO) - ENHANCED ============= */
.modern-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 0.875rem 3rem 0.875rem 1.5rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    width: 100%;
    position: relative;
}

.modern-select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.modern-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(0, 168, 156, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modern-select::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.modern-select option {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 0.75rem !important;
    font-weight: 400;
    font-size: 0.95rem !important;
}

.modern-select option:hover,
.modern-select option:checked {
    background: var(--secondary-color) !important;
}

/* Fix for option visibility in browsers */
.modern-select optgroup {
    background: var(--primary-color) !important;
    color: white !important;
}

.modern-select::-ms-expand {
    display: none;
}

/* Ensure dropdown is visible on all browsers */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .modern-select option {
        background-color: var(--primary-color) !important;
        color: white !important;
    }
}

/* Firefox specific */
@-moz-document url-prefix() {
    .modern-select option {
        background-color: var(--primary-color) !important;
        color: white !important;
    }
}

/* ============= CUSTOM FORM ELEMENTS (MODALS, ETC.) ============= */
.custom-input, .custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 48px;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
}
.custom-input.h-auto, textarea.custom-input {
    height: auto;
}

.custom-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.custom-input:focus, .custom-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 156, 0.15);
    background-color: white;
}

.custom-input:hover, .custom-select:hover {
    border-color: var(--secondary-color);
}


/* ============= ENHANCED HERO SECTION ============= */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533a7d 75%, var(--primary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-gradient-overlay,
.consultation-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, rgba(89, 34, 96, 0.9), rgba(124, 77, 130, 0.85), rgba(0, 168, 156, 0.9), rgba(89, 34, 96, 0.9));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============= TAB CONTENT ANIMATIONS ============= */
.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* ============= HEALTH OPTIONS STYLING ============= */
.health-option {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.health-option:hover, 
.health-option.selected {
    border-color: var(--secondary-color);
    background: rgba(0, 168, 156, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 168, 156, 0.2);
}

.health-option i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: block;
}

/* ============= ENHANCED HEADER STYLES ============= */
#mainHeader {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mainHeader.scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

.logo-img {
    height: 3.5rem;
    transition: all 0.3s ease;
    display: block;
}

.favicon-img {
    max-height: 2.5rem;
    width: auto;
    display: none;
    transition: all 0.3s ease;
}

#mainHeader.scrolled .logo-img {
    display: none;
}

#mainHeader.scrolled .favicon-img {
    display: block;
}

/* ============= NAVIGATION ENHANCEMENTS ============= */
.nav-link {
    position: relative;
    padding-bottom: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

/* ============= DROPDOWN MENU STYLING ============= */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.group:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px;
}

.dropdown-menu a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* ============= MODERN FEATURE CARDS ============= */
.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

/* ============= JOURNEY SECTION STYLES ============= */
.journey-step {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.journey-step:nth-child(1) { animation-delay: 0.1s; }
.journey-step:nth-child(2) { animation-delay: 0.2s; }
.journey-step:nth-child(3) { animation-delay: 0.3s; }
.journey-step:nth-child(4) { animation-delay: 0.4s; }

/* ============= PARTNERS SECTION ENHANCEMENTS ============= */
.partners-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.logo-slider-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.logo-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-slider .logo-track {
    display: flex;
    animation: scroll 40s linear infinite;
    width: calc(200px * 24);
}

.logo-slider:hover .logo-track {
    animation-play-state: paused;
}

.logo-slider .slide {
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-slider .slide img {
    max-height: 60px;
    max-width: 140px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-slider .slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-200px * 12)); }
}

/* ============= ENHANCED MODALS (PROFESSIONAL REDESIGN) ============= */
#contactModalContent {
    max-height: fit-content;
    max-width: 520px;
    overflow: visible;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

/* Compact form styles for contact modal */
#contactModal .form-group {
    margin-bottom: 0.75rem;
}

#contactModal .form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#contactModal .custom-input,
#contactModal .custom-select {
    height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

#contactModal .custom-select {
    padding-right: 2rem;
    background-size: 16px;
    background-position: right 0.5rem center;
}

#contactModal textarea.custom-input {
    height: auto;
    min-height: 60px;
    padding: 0.5rem 0.75rem;
}

#contactModal .error-message {
    font-size: 0.7rem;
    margin-top: 0.125rem;
    min-height: 0.875rem;
}

/* ============= ACCORDION STYLES ============= */
.accordion-item {
    transition: all 0.3s ease;
    border-radius: 16px !important;
    overflow: hidden;
}

.accordion-item:hover {
    border-color: var(--primary-color) !important;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-header {
    transition: all 0.3s ease;
}

.accordion-header:hover {
    color: var(--primary-color) !important;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-icon.rotate-180 {
    transform: rotate(180deg);
}

/* ============= FORM ENHANCEMENTS ============= */
.form-group {
    position: relative;
    margin-bottom: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    display: block;
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
    display: none; /* Hide by default */
}

.form-group.is-invalid .error-message {
    display: block;
}

.form-group.is-invalid .custom-input,
.form-group.is-invalid .custom-select {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
}

/* ============= CUSTOM SELECT STYLES FOR FORMS ============= */
.custom-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23592260' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
}

.custom-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.custom-input:hover {
    border-color: var(--secondary-color);
    background-color: #fff;
}

.custom-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(0, 168, 156, 0.1);
    background-color: white;
}

.custom-input::placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

textarea.custom-input {
    padding: 0.75rem !important;
    background-color: white !important;
    color: var(--text-dark) !important;
    font-size: 0.95rem !important;
}

.custom-select option:hover,
.custom-select option:checked {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

/* Ensure custom select options are visible */
.custom-select optgroup {
    background-color: #f8fafc !important;
    color: var(--text-dark) !important;
    font-weight: 600;
}

/* Popup Form Custom Select */
.popup-form-container .custom-select {
    height: 44px;
    font-size: 0.95rem;
    padding: 0.625rem 2.25rem 0.625rem 0.875rem;
    background-color: #f9fafb;
}

/* Contact Modal Custom Select - Unique Style */
#contactModal .custom-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300a89c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    border-color: #d4d4d8;
}

#contactModal .custom-select:hover {
    border-color: var(--primary-color);
}

#contactModal .custom-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(89, 34, 96, 0.1);
}

.form-group.is-invalid .custom-select {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1) !important;
}

/* ============= TIMED POPUP STYLES (ENHANCED & FIXED) ============= */
.timed-popup-container {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(89, 34, 96, 0.25);
    display: flex;
    width: 100%;
    max-width: 750px;
    height: fit-content; /* Natural height without scrollbar */
    max-height: 90vh; /* Fallback for very tall content */
    overflow: hidden;
    position: relative;
}

.timed-popup-image {
    width: 42%;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

.timed-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    mix-blend-mode: luminosity;
}

.timed-popup-form-section {
    width: 58%;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    overflow: visible; /* No scroll needed */
}
.form-header {
    margin-bottom: 1.5rem;
}
.title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}
.close-btn-new {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.close-btn-new:hover {
    color: #333;
}
.popup-form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.popup-form-container .form-group {
    margin-bottom: 0;
}

.popup-form-container .form-group:last-of-type {
    margin-bottom: 1rem;
}
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto; /* This pushes the button to the bottom */
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 168, 156, 0.25);
}

/* ============= INTERNATIONAL PHONE INPUT STYLES (PROFESSIONAL FIX) ============= */
.iti {
    width: 100% !important;
    position: relative !important;
    display: block !important;
}

.iti__tel-input,
.iti input[type="tel"] {
    width: 100% !important;
    height: 48px !important;
    padding: 0.75rem 1rem 0.75rem 65px !important; /* Increased left padding for flag */
    font-size: 1rem !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--text-dark) !important;
    background-color: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    text-indent: 0 !important; /* Ensure text starts from padding */
}

.popup-form-container .iti__tel-input,
.popup-form-container .iti input[type="tel"] {
    height: 44px !important;
    font-size: 0.95rem !important;
    padding-left: 60px !important; /* Slightly less for popup */
}

/* Contact modal phone input */
#contactModal .iti__tel-input,
#contactModal .iti input[type="tel"] {
    height: 40px !important;
    font-size: 0.875rem !important;
    padding-left: 58px !important;
}

.iti__tel-input:hover,
.iti input[type="tel"]:hover {
    border-color: var(--secondary-color) !important;
    background-color: #fff !important;
}

.iti__tel-input:focus,
.iti input[type="tel"]:focus {
    border-color: var(--secondary-color) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(0, 168, 156, 0.1) !important;
    outline: none !important;
}

.iti__flag-container {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

.iti__selected-flag {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 8px 0 12px !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 12px 0 0 12px !important;
    width: 52px !important; /* Fixed width for flag area */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.iti__arrow {
    margin-left: 4px !important;
}

.iti__selected-flag:hover,
.iti__selected-flag:focus {
    background-color: rgba(0, 168, 156, 0.05) !important;
}

.iti__country-list {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e2e8f0 !important;
    margin-top: 4px !important;
    max-height: 300px !important;
}

.iti__country {
    padding: 10px 12px !important;
    transition: background-color 0.2s !important;
}

.iti__country:hover {
    background-color: var(--primary-light) !important;
}

.iti__country.iti__highlight {
    background-color: var(--primary-light) !important;
}

.form-group.is-invalid .iti__tel-input,
.form-group.is-invalid .iti input[type="tel"] {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1) !important;
}


/* ============= PRELOADER STYLES ============= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

.preloader-logo {
    width: 80px;
    animation: pulse 1.5s ease-in-out infinite;
    filter: brightness(0) invert(1);
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* ============= UTILITY CLASSES ============= */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.bg-primary-light { background-color: var(--primary-light); }
.border-primary { border-color: var(--primary-color); }

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 768px) {
    .hero-tabs {
        padding: 4px;
        border-radius: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tab-item {
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 10px;
        margin: 2px;
    }
    
    .floating-icon {
        display: none;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .btn-gradient {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .modern-select {
        padding: 0.75rem 2.5rem 0.75rem 1rem;
    }
    
    .health-option {
        padding: 1rem;
    }

    #contactModal .grid-cols-1 {
        grid-template-columns: 1fr;
    }

    .timed-popup-container {
        flex-direction: column;
        max-width: 90%;
        max-height: 90vh;
        height: auto;
        overflow-y: auto; /* Allow scroll on mobile if needed */
    }
    .timed-popup-image {
        display: none; /* Hide image on mobile for more space */
    }
    .timed-popup-form-section {
        width: 100%;
        padding: 1.5rem;
        overflow: visible;
    }
    .form-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .tab-item {
        flex-basis: calc(50% - 4px); /* Two items per row */
        padding: 10px;
    }

    .health-option {
        padding: 1.5rem 0.5rem;
    }

    .health-option h3 {
        font-size: 1rem;
    }

    .health-option p {
        font-size: 0.8rem;
    }
}

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

/* ============= ACCESSIBILITY IMPROVEMENTS ============= */
.btn-gradient:focus,
.modern-select:focus,
.custom-select:focus,
.custom-input:focus,
.nav-link:focus,
.iti__tel-input:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.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;
}

/* ============= PRINT STYLES ============= */
@media print {
    .floating-icon,
    .hero-gradient-overlay,
    .consultation-gradient-overlay,
    #preloader {
        display: none !important;
    }
    
    .hero-section, .consultation-section {
        background: white !important;
        color: black !important;
    }
}