/* 
=====================================
Honor Travels - Custom CSS
=====================================
*/

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --success-color: #25d366;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: #333;
    overflow-x: hidden;
    padding-top: 80px; /* Default padding for all pages */
    background-color: #fff;
    background: #fff;
}

/* Remove padding only for home page */
body.home-page {
    padding-top: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* General image enhancement for better quality - optimized */
img {
    max-width: 100%;
    height: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
}

/* FontAwesome icons enhancement - Ultra crisp */
.fas, .fab, .far, .fal, .fad {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Prevent scaling blur */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Ensure crisp edges */
    image-rendering: -webkit-optimize-contrast;
}

/* ===== UTILITY CLASSES ===== */
.shadow-custom {
    box-shadow: var(--shadow-light);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-medium);
}

/* ===== NAVIGATION ===== */
.navbar {
    transition: all 0.3s ease;
    padding: 0.8rem 0;
    background-color: white !important;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-light);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
}

.navbar-logo {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-logo {
    height: 35px;
}

/* Navbar Links Styling */
.navbar-nav .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.08), rgba(0, 123, 255, 0.03));
    border: 1px solid rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
    border: 1px solid rgba(0, 123, 255, 0.2);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.navbar-nav .nav-link.active:hover::before {
    left: 100%;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #4dabf7);
    border-radius: 2px 2px 0 0;
}

/* Social Media Icons Spacing */
.navbar .d-flex.ms-3 {
    margin-left: 2rem !important;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar .d-flex.ms-3 a {
    transition: all 0.3s ease;
    padding: 0.25rem;
    border-radius: 4px;
}

.navbar .d-flex.ms-3 a:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 0, 0, 0.05);
}

@media (max-width: 767.98px) {
    .navbar-logo {
        height: 35px;
    }
    
    .navbar.scrolled .navbar-logo {
        height: 30px;
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    height: 100vh;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: -80px; /* Offset navbar height for full viewport coverage */
    padding-top: 80px; /* Maintain content positioning */
}

.hero-content {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed;
    /* Enhanced for crisp rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Ensure full coverage */
    width: 100%;
}

.hero-swiper {
    width: 100%;
    height: 100vh;
    position: relative;
}

.hero-swiper .swiper-slide {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* Performance optimization */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 30px;
    font-weight: 600;
    padding: 12px 30px;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* ===== CONTACT BUTTONS ===== */
.btn i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.btn-outline-primary i,
.btn-outline-success i {
    font-size: 1.1rem;
}

/* Social media buttons in contact section */
.btn[title] {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== SECTIONS ===== */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* ===== DESTINATIONS ===== */
/* Bootstrap Card Styling for Destinations */
.destination-card {
    transition: all 0.3s ease;
    border: none !important;
    border-radius: 15px;
    overflow: hidden;
}

.destination-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.destination-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.destination-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Natural destination image styling - Keeps original quality */
.destination-img {
    /* Only basic optimizations for crisp rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: transform 0.3s ease;
}

.destination-img:hover {
    transform: scale(1.02) translateZ(0);
}

/* ===== SERVICES ===== */
.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2.2rem;
    transition: all 0.3s ease;
    /* Ultra-crisp icon rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.service-icon i {
    /* Make FontAwesome icons ultra crisp */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-weight: 900;
    line-height: 1;
    /* Prevent blur during animations */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.service-icon:hover {
    transform: scale(1.1) translateZ(0);
    /* Maintain crispness during hover */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Service card optimization */
.service-card {
    /* Ensure crisp rendering for the entire card */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--primary-color);
}

.testimonial-stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer h5 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

.footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.footer .social-links a:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== CONTACT ICONS ===== */
.contact-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    min-width: 50px;
    min-height: 50px;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item .contact-icon i {
    font-size: 1.2rem;
}

/* ===== CONTACT FORM ===== */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-3px);
}

/* ===== MODERN NOTIFICATION STYLES ===== */
/* Toast notification container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
}

/* Custom toast notification */
.custom-toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
    padding: 0;
    min-width: 320px;
    pointer-events: auto;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #28a745;
    overflow: hidden;
    position: relative;
}

.custom-toast.success { border-left-color: #28a745; }
.custom-toast.error { border-left-color: #dc3545; }
.custom-toast.warning { border-left-color: #ffc107; }
.custom-toast.info { border-left-color: #007bff; }

.custom-toast.show {
    transform: translateX(0);
}

.custom-toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
}

.toast-icon {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.custom-toast.success .toast-icon { color: #28a745; }
.custom-toast.error .toast-icon { color: #dc3545; }
.custom-toast.warning .toast-icon { color: #ffc107; }
.custom-toast.info .toast-icon { color: #007bff; }

.toast-text {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 15px;
}

.toast-message {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 0%;
    transition: width 5s linear;
}

.custom-toast.success .toast-progress { background: #28a745; }
.custom-toast.error .toast-progress { background: #dc3545; }
.custom-toast.warning .toast-progress { background: #ffc107; }
.custom-toast.info .toast-progress { background: #007bff; }

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .custom-toast {
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .toast-content {
        padding: 14px;
        gap: 10px;
    }
    
    .toast-title {
        font-size: 14px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

/* Animation keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .custom-toast {
        padding: 16px 20px;
        border-radius: 12px;
    }
    
    .toast-title {
        font-size: 15px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

/* Form loading state improvements */
.form-loading .btn {
    position: relative;
    pointer-events: none;
}

.form-loading .btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MOBILE NAVBAR ANIMATIONS ===== */
/* Enhanced mobile menu button */
.btn[data-bs-toggle="offcanvas"] {
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 1.4rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn[data-bs-toggle="offcanvas"]:hover {
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
    transform: scale(1.05);
}

.btn[data-bs-toggle="offcanvas"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Simple hamburger icon - no rotation */
.mobile-menu-icon {
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

/* Improved mobile menu slide animation */
.offcanvas-end {
    width: 280px;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.offcanvas-end.show {
    transform: translateX(0);
}

/* Mobile offcanvas enhancements - Force pure white */
.offcanvas {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: none !important;
}

.offcanvas-end {
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: none !important;
}

.offcanvas.show {
    transform: translateX(0) !important;
}

.offcanvas:not(.show) {
    transform: translateX(100%) !important;
}

/* Mobile menu header styling - pure white */
.offcanvas-header {
    background: #fff !important;
    color: var(--dark-color);
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.offcanvas-title {
    color: var(--primary-color) !important;
    font-size: 1.1rem;
}

.btn-close {
    background: transparent;
    opacity: 1;
    border: none;
    padding: 0.5rem;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    background-image: none;
    position: relative;
}

.btn-close::before,
.btn-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 3px;
    background: var(--dark-color);
    transform-origin: center;
    transition: all 0.3s ease;
}

.btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.btn-close:hover::before,
.btn-close:hover::after {
    background: var(--primary-color);
    height: 4px;
    width: 18px;
}

.btn-close:hover {
    transform: scale(1.1);
}

/* Mobile menu body */
.offcanvas-body {
    padding: 0;
    background: #fff !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Mobile navigation links with simple animations */
.offcanvas .navbar-nav {
    padding: 1rem 0;
    flex: 1;
}

.offcanvas .nav-item {
    transition: all 0.3s ease;
}

.offcanvas .nav-link {
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--dark-color);
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.offcanvas .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
    padding-left: 2rem;
}

.offcanvas .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
    border-left: 4px solid var(--primary-color);
    font-weight: 600;
}

/* Mobile menu footer area - positioned at bottom */
.offcanvas .mt-auto {
    padding: 1.5rem;
    background: #fff !important;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
    position: sticky;
    bottom: 0;
}

/* Social media icons spacing in mobile menu */
.offcanvas .d-flex.justify-content-center {
    gap: 1rem;
    margin-bottom: 1rem;
}

.offcanvas .d-flex.justify-content-center a {
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.offcanvas .d-flex.justify-content-center a:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 123, 255, 0.1);
}

/* Copyright text styling */
.offcanvas small.text-muted {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Mobile social links - simple animations */
.offcanvas .d-flex a {
    transition: all 0.3s ease;
}

/* Simple click animation for nav links */
.offcanvas .nav-link.clicked {
    transform: scale(0.95);
}

/* Hamburger menu icon animation */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Mobile menu backdrop */
.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* Simple mobile menu backdrop */
.offcanvas-backdrop.show {
    background-color: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* Touch improvements for mobile nav links */
.offcanvas .nav-link {
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.1);
    min-height: 48px; /* Better touch target */
    display: flex;
    align-items: center;
}

/* Mobile menu responsiveness improvements */
@media (max-width: 480px) {
    .offcanvas-end {
        width: 90vw;
        max-width: 320px;
    }
    
    .offcanvas .nav-link {
        font-size: 1.1rem;
        padding: 1.2rem 1.5rem;
    }
    
    .offcanvas-header {
        padding: 1.2rem 1.5rem;
    }
    
    .offcanvas-title {
        font-size: 1.15rem;
    }
}

/* ===== BLOG PAGE MOBILE FIXES ===== */
/* Fix text overflow on mobile for blog header */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem !important;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .lead {
        font-size: 1rem !important;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Ensure container has proper padding on mobile */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Fix blog post titles on mobile */
    .card-title {
        font-size: 1.25rem !important;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Ensure text doesn't overflow viewport */
    .text-center {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Ensure no horizontal overflow on mobile */
@media (max-width: 576px) {
    /* Fix specific blog page header */
    .page-header .display-4 {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .page-header .lead {
        font-size: 1.1rem !important;
        line-height: 1.5;
    }
    
    /* Fix Latest Posts section */
    .display-5.fw-bold {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 1rem !important;
    }
    
    /* Ensure proper text wrapping */
    h1, h2, h3, h4, h5, h6, p, .lead {
        word-break: break-word;
        hyphens: auto;
    }
    
    /* Fix button group spacing on mobile */
    .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
}

/* Blog featured post improvements */
.featured-post {
    transition: all 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* FORCE PURE WHITE - Override all mobile navbar backgrounds */
.offcanvas,
.offcanvas-end,
.offcanvas-header,
.offcanvas-body,
.offcanvas .mt-auto,
.offcanvas.offcanvas-end,
#mobileMenu,
#mobileMenu .offcanvas-header,
#mobileMenu .offcanvas-body {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
}

/* ULTIMATE WHITE OVERRIDE - Bootstrap offcanvas fix */
.offcanvas,
.offcanvas-end,
.offcanvas-start,
.offcanvas-top,
.offcanvas-bottom,
div[class*="offcanvas"],
#mobileMenu {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Bootstrap specific overrides */
.offcanvas.offcanvas-end.show {
    background: #fff !important;
    background-color: #fff !important;
}

/* Force white on all child elements */
.offcanvas * {
    background-color: inherit;
}

/* FINAL OVERRIDE - Direct element targeting */
div.offcanvas.offcanvas-end[id="mobileMenu"] {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

div.offcanvas.offcanvas-end[id="mobileMenu"] .offcanvas-header {
    background: #fff !important;
    background-color: #fff !important;
}

div.offcanvas.offcanvas-end[id="mobileMenu"] .offcanvas-body {
    background: #fff !important;
    background-color: #fff !important;
}

/* ===== BLOG TEXT ALIGNMENT ===== */
/* Justify text alignment for all article content */
.card-text,
.featured-post .card-text,
.blog-card .card-text,
article p,
.featured-post p {
    text-align: justify;
    text-justify: inter-word;
}

/* Ensure proper spacing and readability for justified text */
.card-text {
    hyphens: auto;
    word-spacing: 0.1em;
}

/* ===== TOOLTIP CUSTOMIZATION ===== */
/* Change tooltip background to blue */
.tooltip .tooltip-inner {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--primary-color) !important;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: var(--primary-color) !important;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--primary-color) !important;
}

.tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: var(--primary-color) !important;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    background: #25D366;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
}

/* Add pulsing animation to WhatsApp button */
.whatsapp-btn {
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
}

.whatsapp-btn:hover {
    animation: none; /* Stop animation on hover */
    background: #128C7E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.whatsapp-btn i {
    font-size: 24px;
    margin-right: 10px;
}

.whatsapp-text {
    display: none;
}

/* Show text on hover */
.whatsapp-btn:hover .whatsapp-text {
    display: inline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 60px;
        height: 60px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .whatsapp-btn i {
        margin: 0;
    }
    
    .whatsapp-text {
        display: none !important;
    }
}

/* COMPLETE SUBJECT DROPDOWN RESET - Replace all existing subject dropdown CSS */
.subject-dropdown {
    /* Reset everything to browser defaults */
    all: unset;
    
    /* Apply clean styling */
    display: block;
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background-color: #fff;
    color: #495057;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    
    /* Force native select behavior */
    appearance: menulist;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    
    /* Remove all positioning */
    position: static;
    z-index: auto;
    transform: none;
    overflow: visible;
    
    /* Clean transition */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.subject-dropdown:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.subject-dropdown:valid {
    border-color: #28a745;
}

/* Remove any Bootstrap form-select interference */
.form-select.subject-dropdown,
select.subject-dropdown.form-select {
    all: unset;
    display: block;
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background-color: #fff;
    color: #495057;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    appearance: menulist;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
}

/* Force parent containers to not interfere */
.mb-3,
.contact-form,
.container,
.row,
.col-lg-8,
.col-xl-6,
.col-md-8,
.col-sm-10 {
    position: static !important;
    z-index: auto !important;
    overflow: visible !important;
    transform: none !important;
}

/* Optgroup styling */
.subject-dropdown optgroup {
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
}

.subject-dropdown option {
    padding: 8px 12px;
    color: #495057;
    background-color: #fff;
    font-weight: normal;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .subject-dropdown {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* FORCE DROPDOWN DIRECTION - Add this at the end of your CSS file */
select.subject-dropdown,
#subject {
    /* Nuclear option - force native behavior */
    appearance: menulist !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    
    /* Remove all custom styling that interferes */
    position: static !important;
    z-index: auto !important;
    transform: none !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    
    /* Ensure container context doesn't interfere */
    contain: none !important;
    isolation: auto !important;
}

/* Force all parent elements to not create stacking context */
body, html, .container, .row, [class*="col-"], .mb-3, .contact-form {
    contain: none !important;
    isolation: auto !important;
    position: static !important;
    z-index: auto !important;
    transform: none !important;
}

/* Simple Modern Subject Dropdown */
#subject {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    
    /* Modern styling that fits form container */
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    
    /* Ensure it doesn't overflow container */
    margin: 0;
    overflow: hidden;
}

#subject:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
    width: 100% !important;
}

#subject:valid {
    border-color: #0d6efd;
}

/* Fix container to ensure proper width */
.col-12 {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Remove any Bootstrap overrides that cause width issues */
.form-control#subject {
    width: 100% !important;
    max-width: 100% !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    background-image: none !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

/* Ensure form container doesn't cause overflow */
.contact-form .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.contact-form .col-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Mobile responsive width fix */
@media (max-width: 768px) {
    #subject {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px; /* Prevent zoom on iOS */
        box-sizing: border-box !important;
    }
    
    .contact-form .col-12 {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Ensure all form elements have same width */
.contact-form .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
