/* ISP Review BD - Custom Styles */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #6ea8fe;
    --secondary: #6c757d;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    --light: #f8f9fa;
    --dark: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-bottom: 70px; /* Space for mobile bottom nav */
}

@media (min-width: 1200px) {
    body {
        padding-bottom: 0;
    }
}

/* ===================================
   MODERN NAVIGATION STYLES
   =================================== */

/* Modern Navbar */
.modern-navbar {
    background: #ffffff !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.modern-navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08) !important;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Brand Styles */
.modern-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.modern-brand:hover {
    transform: translateY(-2px);
}

.brand-icon-wrapper {
    position: relative;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.modern-brand:hover .brand-icon {
    transform: rotate(10deg) scale(1.05);
    box-shadow: 0 5px 18px rgba(102, 126, 234, 0.4);
}

.brand-icon i {
    font-size: 20px;
    color: #fff;
}

.brand-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.5px;
}

.brand-country {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modern Nav Links */
.modern-nav-links {
    gap: 0.25rem;
}

.modern-nav-links .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.modern-nav-links .nav-link i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.modern-nav-links .nav-link:hover {
    color: var(--primary);
    background: rgba(13, 110, 253, 0.08);
}

.modern-nav-links .nav-link:hover i {
    transform: scale(1.1);
}

.modern-nav-links .nav-link.active {
    color: var(--primary);
    background: rgba(13, 110, 253, 0.1);
    font-weight: 600;
}

.modern-nav-links .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Modern Dropdown */
.modern-dropdown,
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 220px;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: rgba(13, 110, 253, 0.08);
    color: var(--primary);
    transform: translateX(4px);
}

.dropdown-item i {
    width: 20px;
    transition: transform 0.2s ease;
}

.dropdown-item:hover i {
    transform: scale(1.1);
}

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 0.5rem 1rem 0.25rem;
}

.dropdown-divider {
    margin: 0.5rem 0;
    opacity: 0.1;
}

/* Gradient Background */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

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

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

/* Enhanced Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 25%, #6f42c1 75%, #d63384 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Hero Background Elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

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

.hero-circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: -150px;
    animation-delay: 0s;
}

.hero-circle-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: -100px;
    animation-delay: 2s;
}

.hero-circle-3 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 4s;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

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

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Hero Typography */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-highlight {
    color: #ffc107;
    display: inline-block;
}

.hero-underline {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 12px;
    animation: drawLine 2s ease-out 1s both;
}

@keyframes drawLine {
    0% { stroke-dasharray: 0 1000; }
    100% { stroke-dasharray: 1000 1000; }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.6;
    opacity: 0.95;
}

/* Hero Search */
.hero-search-container {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.hero-search-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.hero-search-input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.hero-search-icon {
    position: absolute;
    left: 1.5rem;
    z-index: 5;
    color: #6c757d;
    font-size: 1.2rem;
}

.hero-search-input {
    border: none;
    background: transparent;
    padding: 1rem 1rem 1rem 3.5rem;
    font-size: 1.1rem;
    color: #333;
    flex: 1;
}

.hero-search-input:focus {
    box-shadow: none;
    outline: none;
}

.hero-search-input::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

.hero-search-btn {
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 1.5rem;
    transition: all 0.3s ease;
}

.hero-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

/* Hero Suggestions */
.hero-suggestion-tag {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-suggestion-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* Hero Action Buttons */
.hero-action-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #333;
    transition: all 0.3s ease;
    min-height: 80px;
}

.hero-action-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    color: #333;
}

.hero-action-btn.btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.hero-action-btn.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hero-action-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Hero Trust Indicators */
.hero-trust-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-trust-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Badge */
.hero-badge {
    animation: pulse 2s infinite;
}

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

/* Cards */
.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Star Rating */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star-rating i {
    font-size: 0.875rem;
}

/* Speed Gauge */
.speed-gauge {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 120px;
}

.speed-gauge svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.speed-gauge .gauge-bg {
    stroke: #e9ecef;
    stroke-width: 8;
    fill: none;
}

.speed-gauge .gauge-fill {
    stroke: var(--primary);
    stroke-width: 8;
    fill: none;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.speed-gauge .gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 1.25rem;
    text-align: center;
}

/* Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #084298 100%);
}

/* Map Styles */
.leaflet-container {
    border-radius: 0.375rem;
    z-index: 1;
}

.isp-marker {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.isp-marker:hover {
    transform: scale(1.1);
}

/* Coverage Helper Styles */
.coverage-method {
    border: 2px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coverage-method:hover {
    border-color: var(--primary);
    background-color: rgba(13, 110, 253, 0.05);
}

.coverage-method.active {
    border-color: var(--primary);
    background-color: rgba(13, 110, 253, 0.1);
}

.coverage-method i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Dashboard Styles */
.dashboard-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

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

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

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

/* Navigation Enhancements */
.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    transform: translateX(4px);
}

.navbar-nav .dropdown-header {
    padding: 0.75rem 1rem 0.25rem;
    font-weight: 600;
    color: var(--bs-gray-700);
    border-bottom: 1px solid var(--bs-gray-200);
    margin-bottom: 0.5rem;
}

.navbar-brand:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    z-index: 1030;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-nav-link {
    padding: 0.5rem 0.25rem;
    transition: all 0.3s ease;
    color: #6c757d;
    position: relative;
}

.mobile-nav-link:hover {
    color: var(--bs-primary);
    transform: translateY(-2px);
}

.mobile-nav-link.active {
    color: var(--bs-primary);
    font-weight: 600;
}

.mobile-nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--bs-primary);
    border-radius: 0 0 3px 3px;
}

/* Featured Speed Test Button */
.mobile-nav-featured-icon {
    width: 36px;
    height: 36px;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.mobile-nav-featured:hover .mobile-nav-featured-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.mobile-nav-featured.active .mobile-nav-featured-icon {
    background: var(--bs-success) !important;
}

/* Brand Responsiveness */
.brand-icon {
    transition: all 0.3s ease;
}

.brand-text {
    transition: all 0.3s ease;
}

@media (max-width: 576px) {
    .brand-icon {
        padding: 0.5rem;
    }
    
    .brand-text {
        font-size: 1.1rem;
    }
}

/* Navbar Responsiveness */
@media (max-width: 1199.98px) {
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.5rem 1.5rem;
        color: rgba(0,0,0,.65);
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.1);
        color: var(--bs-primary);
        transform: none;
    }
    
    .navbar-nav .dropdown-header {
        padding: 0.5rem 1.5rem;
        margin-bottom: 0;
        font-size: 0.875rem;
        color: var(--bs-gray-600);
        background-color: var(--bs-gray-100);
    }
}

/* Responsive Search Enhancement */
.navbar-search {
    position: relative;
}

/* Desktop Search */
.navbar-search-desktop {
    min-width: 350px;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-search-desktop:focus-within {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

.navbar-search-desktop .input-group-text {
    border: none;
    background: #f8f9fa;
}

.navbar-search-desktop .form-control {
    border: none;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.navbar-search-desktop .form-control:focus {
    box-shadow: none;
    background: #fff;
}

.navbar-search-desktop .btn {
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Tablet Search */
.navbar-search .collapse {
    z-index: 1050;
}

.navbar-search .card {
    border: none;
    border-radius: 1rem;
}

/* Mobile Search Modal */
#mobileSearchModal .modal-content {
    border-radius: 0;
}

#mobileSearchModal .input-group-lg .form-control {
    font-size: 1.1rem;
    padding: 1rem;
}

#mobileSearchModal .input-group-lg .input-group-text {
    padding: 1rem;
}

#mobileSearchModal .list-group-item {
    border: none;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

#mobileSearchModal .list-group-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    transform: translateX(4px);
}

/* Search Button Responsive Styles */
@media (min-width: 1400px) {
    .navbar-search-desktop {
        min-width: 400px;
    }
    
    .navbar-search-desktop .form-control {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-search-desktop {
        min-width: 320px;
    }
    
    .navbar-search-desktop .form-control {
        font-size: 0.9rem;
    }
    
    .navbar-search-desktop .btn {
        padding: 0.75rem 1.25rem;
    }
}

/* Tablet Search Styles */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-search .btn {
        min-width: 100px;
    }
    
    .navbar-search .collapse .card {
        min-width: 280px;
    }
}

/* Mobile Search Styles */
@media (max-width: 991.98px) {
    .navbar-search .btn {
        width: 44px;
        height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .navbar-search .btn i {
        font-size: 1.1rem;
    }
}

/* Search Focus States */
.navbar-search input:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Search Autocomplete Styling */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestion-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-suggestion-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

/* Responsive Design */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px;
        margin: 0 auto;
    }
    
    .navbar .input-group {
        min-width: 300px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-search-wrapper {
        padding: 0.75rem;
    }
    
    .hero-search-input {
        padding: 1.25rem 1.25rem 1.25rem 4rem;
        font-size: 1.25rem;
    }
    
    .hero-action-btn {
        min-height: 90px;
    }
    
    .hero-action-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
}

/* Large Devices (992px to 1399px) */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .navbar .input-group {
        min-width: 280px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
}

/* Medium Devices (768px to 991px) - Tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar .input-group {
        min-width: 220px;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    /* Hide less important navigation items on tablets */
    .navbar-nav .nav-item:nth-child(n+4) {
        display: none;
    }
    
    /* Show mobile bottom nav on tablets too */
    .mobile-bottom-nav {
        display: block !important;
    }
    
    body {
        padding-bottom: 70px;
    }
}

/* Small Devices (576px to 767px) - Large Phones */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .navbar .input-group {
        min-width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Compact brand on small screens */
    .brand-text {
        font-size: 1.2rem;
    }
    
    /* Adjust mobile bottom nav */
    .mobile-nav-link small {
        font-size: 0.7rem;
    }
}

/* Extra Small Devices (up to 575px) - Small Phones */
@media (max-width: 575.98px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .navbar .input-group {
        min-width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Very compact brand */
    .brand-text {
        font-size: 1rem;
    }
    
    .brand-icon {
        padding: 0.4rem;
    }
    
    /* Adjust mobile nav for small screens */
    .mobile-nav-link {
        padding: 0.4rem 0.2rem;
    }
    
    .mobile-nav-link small {
        font-size: 0.65rem;
    }
    
    .mobile-nav-featured-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Compact cards */
    .card-body {
        padding: 1rem;
    }
    
    /* Smaller buttons on mobile */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Better mobile spacing */
    body {
        padding-bottom: 80px;
    }
    
    /* Optimize hero search for mobile */
    .hero-search-input {
        font-size: 0.95rem;
        padding: 0.875rem 0.875rem 0.875rem 3rem;
    }
    
    .hero-search-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Stack hero action buttons */
    .hero-actions .col-md-6 {
        margin-bottom: 0.75rem;
    }
    
    /* Improve card readability */
    .isp-card .card-body {
        padding: 1.25rem;
    }
    
    /* Better mobile tables */
    .table-responsive {
        border: none;
        margin-bottom: 1rem;
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .brand-icon i {
        font-size: 1.1em;
    }
    
    .mobile-nav-link i {
        font-size: 1.1em;
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 768px) and (max-width: 1199.98px) {
    /* Collapse navbar earlier on tablets */
    .navbar-expand-xl .navbar-nav {
        flex-direction: column;
    }
    
    .navbar-expand-xl .navbar-collapse {
        display: none !important;
    }
    
    .navbar-toggler {
        display: block !important;
    }
    
    /* Show mobile elements on tablets */
    .d-xl-none {
        display: flex !important;
    }
}

/* Desktop Hover Effects */
@media (min-width: 1200px) {
    .navbar-nav .nav-link:hover {
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }
    
    .dropdown-item:hover {
        transform: translateX(4px);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-bottom-nav,
    .fixed-bottom {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* Device-Specific Styles */
body[data-device="mobile"] {
    font-size: 14px;
}

body[data-device="mobile"] .card {
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

body[data-device="mobile"] .btn {
    min-height: 44px;
}

body[data-device="tablet"] .navbar-collapse {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    padding: 1rem;
}

body[data-device="desktop"] .dropdown-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Touch Device Optimizations */
.touch-device .btn:hover {
    transform: none;
}

.touch-device .hover-shadow:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.touch-device .mobile-nav-link:active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 0.5rem;
}

/* Progressive Web App Support */
@media (display-mode: standalone) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
    
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .mobile-nav-link:hover {
        transform: none;
    }
    
    .navbar-brand:hover {
        transform: none;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid #000;
    }
    
    .mobile-bottom-nav {
        border-top: 2px solid #000;
    }
    
    .mobile-nav-link.active {
        background-color: #000;
        color: #fff;
        border-radius: 0.25rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background-color: #1a1a1a !important;
        border-color: #333 !important;
    }
    
    .mobile-nav-link {
        color: #adb5bd;
    }
    
    .mobile-nav-link.active {
        color: #0d6efd;
    }
    
    .navbar {
        background-color: #1a1a1a !important;
        border-color: #333 !important;
    }
    
    .dropdown-menu {
        background-color: #2d2d2d !important;
        border-color: #404040 !important;
    }
    
    .dropdown-item {
        color: #adb5bd !important;
    }
    
    .dropdown-item:hover {
        background-color: rgba(13, 110, 253, 0.2) !important;
        color: #fff !important;
    }
}

/* Advanced Features Styling */

/* ISP Comparison Matrix */
.comparison-matrix {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
}

.comparison-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.comparison-table tr:hover td {
    background-color: rgba(13, 110, 253, 0.05);
}

.comparison-highlight {
    background-color: #d4edda !important;
    font-weight: 600;
    color: #155724;
}

/* Advanced Filter Panel */
.filter-panel {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.filter-panel.sticky {
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    margin: 0.25rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.filter-tag .remove-filter {
    margin-left: 0.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.filter-tag .remove-filter:hover {
    opacity: 1;
}

/* Real-time Search with Autocomplete */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: -0.5rem;
}

.autocomplete-item {
    padding: 1rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.autocomplete-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.autocomplete-item.active {
    background-color: rgba(13, 110, 253, 0.1);
}

.autocomplete-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
}

.autocomplete-content {
    flex: 1;
}

.autocomplete-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.autocomplete-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(13, 110, 253, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

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

/* Advanced Analytics Dashboard */
.analytics-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.analytics-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.analytics-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.analytics-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.analytics-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.analytics-trend {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.analytics-trend.up {
    background-color: #d4edda;
    color: #155724;
}

.analytics-trend.down {
    background-color: #f8d7da;
    color: #721c24;
}

.analytics-chart {
    height: 200px;
    margin-top: 1rem;
}

/* Interactive Package Cards */
.package-card {
    border: 2px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--info));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.package-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.15);
    transform: translateY(-4px);
}

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

.package-card.selected {
    border-color: var(--primary);
    background-color: rgba(13, 110, 253, 0.05);
}

.package-card.selected::before {
    transform: scaleX(1);
}

.package-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* Speed Test Results Enhanced */
.speed-result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.speed-metric {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.speed-metric:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.speed-metric-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.speed-metric-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Rating Distribution Chart */
.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.rating-bar-label {
    width: 80px;
    font-size: 0.875rem;
    color: #6c757d;
}

.rating-bar-track {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 1rem;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--info));
    border-radius: 4px;
    transition: width 1s ease-out;
}

.rating-bar-count {
    width: 60px;
    text-align: right;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 1050;
}

.toast-notification {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
    max-width: 350px;
}

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

.toast-notification.success {
    border-left: 4px solid var(--success);
}

.toast-notification.error {
    border-left: 4px solid var(--danger);
}

.toast-notification.info {
    border-left: 4px solid var(--info);
}

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

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Improved ISP Logo Display */
.isp-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    padding: 0.25rem;
}

/* Enhanced Review Cards */
.review-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.review-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

/* Breadcrumb Enhancement */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.25rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Pagination Enhancement */
.pagination .page-link {
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    border: 1px solid #dee2e6;
    color: var(--primary);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Mobile Optimization for New Features */
@media (max-width: 767.98px) {
    .comparison-matrix {
        margin: 0 -1rem;
    }
    
    .filter-panel {
        padding: 1rem;
        border-radius: 0.75rem;
    }
    
    .analytics-value {
        font-size: 2rem;
    }
    
    .speed-metric-value {
        font-size: 2rem;
    }
    
    .package-card {
        padding: 1rem;
    }
    
    .toast-container {
        right: 0.5rem;
        left: 0.5rem;
    }
    
    .toast-notification {
        max-width: 100%;
    }
}

/* ===================================
   MOBILE BOTTOM NAVIGATION
   =================================== */

.mobile-bottom-nav {
    z-index: 1030;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
}

.mobile-nav-link {
    color: #6c757d;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link i {
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.mobile-nav-link.active {
    color: var(--primary);
}

.mobile-nav-link.active i {
    transform: scale(1.2);
}

.mobile-nav-link:hover {
    color: var(--primary);
    background: rgba(13, 110, 253, 0.05);
}

.mobile-nav-featured-icon {
    width: 50px;
    height: 50px;
    margin-top: -25px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.mobile-nav-featured-icon i {
    font-size: 1.5rem;
}

/* ===================================
   SEARCH ENHANCEMENTS
   =================================== */

.navbar-search {
    margin-right: 0.5rem;
}

.navbar-search-desktop {
    min-width: 300px;
    max-width: 400px;
}

.navbar-search-desktop .form-control {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.navbar-search-desktop .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

.navbar-search-desktop .input-group-text {
    border: 1px solid #e9ecef;
    padding: 0.5rem 0.75rem;
}

.navbar-search-desktop .btn {
    padding: 0.5rem 1rem;
}

/* ===================================
   USER PROFILE DROPDOWN
   =================================== */

.navbar-nav .nav-link.dropdown-toggle {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link.dropdown-toggle:hover {
    background: rgba(13, 110, 253, 0.08);
}

.navbar-nav .dropdown-menu {
    min-width: 280px;
}

/* ===================================
   NOTIFICATION BADGE
   =================================== */

.position-relative .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 0.25em 0.5em;
    font-size: 0.65rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* ===================================
   RESPONSIVE IMPROVEMENTS
   =================================== */

@media (max-width: 1199px) {
    .modern-nav-links .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0;
        border-left: 3px solid transparent;
    }
    
    .modern-nav-links .nav-link.active {
        border-left-color: var(--primary);
        background: rgba(13, 110, 253, 0.05);
    }
    
    .modern-nav-links .nav-link.active::after {
        display: none;
    }
    
    .dropdown-menu {
        border-radius: 0;
        box-shadow: none;
        border-left: 3px solid var(--primary);
    }
}

@media (max-width: 1199px) {
    .modern-nav-links .nav-link {
        font-size: 0.95rem;
        padding: 0.65rem 1rem;
    }
}

@media (max-width: 767px) {
    .modern-navbar {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-country {
        font-size: 0.65rem;
    }
    
    .brand-icon {
        width: 38px;
        height: 38px;
    }
    
    .brand-icon i {
        font-size: 18px;
    }
}

@media (max-width: 575px) {
    .brand-name {
        font-size: 1rem;
    }
    
    .brand-country {
        font-size: 0.6rem;
    }
    
    .brand-icon {
        width: 36px;
        height: 36px;
    }
    
    .brand-icon i {
        font-size: 16px;
    }
}

/* ===================================
   SCROLL EFFECTS
   =================================== */

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* ===================================
   BUTTON ENHANCEMENTS
   =================================== */

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

/* ===================================
   CARD ENHANCEMENTS
   =================================== */

.card {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    background: rgba(13, 110, 253, 0.03);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ===================================
   BADGE IMPROVEMENTS
   =================================== */

.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

/* ===================================
   ANIMATION UTILITIES
   =================================== */

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

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

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

.pulse {
    animation: pulse 2s infinite;
}
