/* SpeedyVoice Custom Styles for Porto Template */

/* Brand Colors */
:root {
    --speedyvoice-primary: #0088cc;
    --speedyvoice-primary-dark: #005580;
    --speedyvoice-secondary: #f8f9fa;
    --speedyvoice-success: #28a745;
    --speedyvoice-warning: #ffc107;
    --speedyvoice-danger: #dc3545;
}

/* Performance Optimizations */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Custom SpeedyVoice Styles */
.speedyvoice-primary {
    color: var(--speedyvoice-primary) !important;
}

.bg-speedyvoice-primary {
    background-color: var(--speedyvoice-primary) !important;
}

.speedyvoice-hero {
    background: linear-gradient(135deg, var(--speedyvoice-primary) 0%, var(--speedyvoice-primary-dark) 100%);
    min-height: 500px;
}

/* Rates Table Styling */
.rates-table {
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.rates-table .table {
    margin-bottom: 0;
}

.rates-table .table thead th {
    background-color: var(--speedyvoice-primary);
    color: white;
    border: none;
    font-weight: 600;
}

.rates-table .table tbody tr:hover {
    background-color: rgba(0, 136, 204, 0.05);
}

.destination-link {
    color: var(--speedyvoice-primary);
    text-decoration: none;
    font-weight: 500;
}

.destination-link:hover {
    color: var(--speedyvoice-primary-dark);
    text-decoration: underline;
}

/* Badge Styles */
.promo-badge {
    background: linear-gradient(45deg, #ff6b35, #f7931e) !important;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.unlimited-badge {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.bg-primary {
    background-color: var(--speedyvoice-primary) !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.text-primary {
    color: var(--speedyvoice-primary) !important;
}

/* Feature Boxes */
.feature-box-icon i {
    font-size: 3rem;
    color: var(--speedyvoice-primary);
}

/* Cards */
.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background-color: var(--speedyvoice-primary) !important;
    color: white !important;
    border-bottom: none;
}

.card-header h4, .card-header h5 {
    color: white !important;
    margin-bottom: 0;
}

.card-body {
    background-color: white;
    color: #333;
}

.text-white {
    color: white !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--speedyvoice-primary) !important;
    border-color: var(--speedyvoice-primary) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--speedyvoice-primary-dark) !important;
    border-color: var(--speedyvoice-primary-dark) !important;
    color: white !important;
}

.btn-outline-primary {
    color: var(--speedyvoice-primary) !important;
    border-color: var(--speedyvoice-primary) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: var(--speedyvoice-primary) !important;
    border-color: var(--speedyvoice-primary) !important;
    color: white !important;
}

.btn-link {
    color: var(--speedyvoice-primary) !important;
}

.btn-link:hover {
    color: var(--speedyvoice-primary-dark) !important;
}

/* Header Improvements - Reduce White Space */
.header-logo img {
    max-height: 50px;
    width: auto;
}

/* Ultra-compact header - minimal white space */
.header-top .header-row {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.header-container .header-row {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.header-nav-bar {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

/* Compact logo and phone area */
.header-logo img {
    max-height: 45px !important;
}

.header-extra-info .feature-box {
    margin: 0 !important;
}

.header-extra-info .feature-box-info p {
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
    font-size: 0.9rem !important;
}

.header-extra-info .feature-box-icon {
    margin-right: 0.5rem !important;
}

/* Desktop - even more compact */
@media (min-width: 768px) {
    .header-top .header-row {
        padding-top: 0.15rem !important;
        padding-bottom: 0.15rem !important;
    }
    
    .header-container .header-row {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }
    
    .header-nav-bar {
        padding-top: 0.15rem !important;
        padding-bottom: 0.15rem !important;
    }
    
    .header-logo img {
        max-height: 42px !important;
    }
}







/* Footer Improvements */
#footer {
    background-color: #2c3e50 !important;
}

#footer .text-color-light {
    color: #ecf0f1 !important;
}

#footer a {
    color: #bdc3c7 !important;
    transition: color 0.3s ease;
}

#footer a:hover {
    color: var(--speedyvoice-primary) !important;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .speedyvoice-hero {
        min-height: 400px;
        padding: 2rem 0;
    }
    
    .speedyvoice-hero h1 {
        font-size: 2.5rem !important;
    }
    
    .rates-table {
        font-size: 0.9rem;
    }
    
    .btn-group.flex-wrap .btn {
        margin-bottom: 0.25rem;
    }
    
    /* Feature boxes - stack icons on top of text on mobile */
    .feature-box-style-2 {
        text-align: center !important;
        flex-direction: column !important;
    }
    
    .feature-box-style-2 .feature-box-icon {
        margin-bottom: 0.75rem !important;
        margin-right: 0 !important;
    }
    
    .feature-box-style-2 .feature-box-info {
        text-align: center !important;
    }
    
    /* Mobile header - even more compact */
    .header-top .header-row {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .header-container .header-row {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .speedyvoice-hero h1 {
        font-size: 2rem !important;
    }
    
    .feature-box-icon i {
        font-size: 2.5rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading-overlay {
    background-color: var(--speedyvoice-primary);
}

/* Search Improvements */
.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.ui-menu-item {
    padding: 0.5rem 1rem;
}

.ui-menu-item:hover {
    background-color: var(--speedyvoice-primary);
    color: white;
}

/* Performance: Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .btn, .social-icons {
        display: none !important;
    }
    
    .rates-table {
        box-shadow: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Alert and Page Elements */
.alert {
    border-radius: 8px;
    color: #333 !important;
}

.alert-info {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

.alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

.alert-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.page-header {
    background-color: #f8f9fa !important;
}

.breadcrumb {
    background-color: transparent !important;
}

.breadcrumb-item a {
    color: var(--speedyvoice-primary) !important;
}

.breadcrumb-item.active {
    color: #6c757d !important;
}

/* Table improvements */
.table-primary th {
    background-color: var(--speedyvoice-primary) !important;
    color: white !important;
}

/* Accordion improvements */
.accordion .card-header {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.accordion .btn-link {
    color: #333 !important;
    text-decoration: none !important;
}

.accordion .btn-link:hover {
    color: var(--speedyvoice-primary) !important;
}

/* Color Contrast Fixes - Prevent white-on-white issues */
.text-white {
    color: white !important;
}

.bg-white {
    background-color: white !important;
    color: #333 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

/* Ensure proper contrast for navigation */
.header-nav .nav-link {
    color: #333 !important;
}

.header-nav .nav-link:hover {
    color: var(--speedyvoice-primary) !important;
}

/* Fix dropdown menu contrast */
.dropdown-menu {
    background-color: white !important;
    color: #333 !important;
}

.dropdown-item {
    color: #333 !important;
}

.dropdown-item:hover {
    background-color: var(--speedyvoice-primary) !important;
}

/* Fix modal contrast */
.modal-content {
    background-color: white !important;
    color: #333 !important;
}

.modal-header {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

/* Fix form elements */
.form-control {
    background-color: white !important;
    color: #333 !important;
    border: 1px solid #ced4da !important;
}

.form-control:focus {
    background-color: white !important;
    color: #333 !important;
    border-color: var(--speedyvoice-primary) !important;
}

/* Fix list group items */
.list-group-item {
    background-color: white !important;
    color: #333 !important;
}

/* Ensure body text is visible */
body {
    color: #333 !important;
}

/* Fix any remaining white text on light backgrounds */
.bg-light .text-white,
.bg-white .text-white {
    color: #333 !important;
}

/* Fix pagination */
.page-link {
    color: var(--speedyvoice-primary) !important;
    background-color: white !important;
}

.page-link:hover {
    color: white !important;
    background-color: var(--speedyvoice-primary) !important;
}

.page-item.active .page-link {
    background-color: var(--speedyvoice-primary) !important;
    border-color: var(--speedyvoice-primary) !important;
    color: white !important;
}

/* Modern Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.mobile-nav-active {
    overflow: hidden;
}

/* Hamburger Button */
.header-btn-collapse-nav {
    background: none !important;
    border: none !important;
    color: var(--speedyvoice-primary) !important;
    font-size: 1.5rem !important;
    padding: 0.5rem !important;
    transition: all 0.3s ease;
    position: relative;
    z-index: 9999;
}

.header-btn-collapse-nav:hover {
    color: var(--speedyvoice-primary-dark) !important;
}

.header-btn-collapse-nav.active {
    color: var(--speedyvoice-primary-dark) !important;
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .header-nav-main nav {
        position: fixed !important;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: white !important;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
    }
    
    .header-nav-main nav.mobile-nav-open {
        right: 0 !important;
    }
    
    .header-nav-main nav > ul {
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .header-nav-main nav > ul > li {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }
    
    .header-nav-main nav > ul > li:last-child {
        border-bottom: none;
    }
    
    .header-nav-main nav > ul > li > a {
        display: block !important;
        padding: 1rem 1.5rem !important;
        color: #333 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        font-size: 1rem !important;
        transition: all 0.3s ease;
        border: none !important;
    }
    
    .header-nav-main nav > ul > li > a:hover,
    .header-nav-main nav > ul > li > a.active {
        background-color: var(--speedyvoice-primary) !important;
        color: white !important;
    }
    
    /* Hide desktop navigation on mobile */
    .header-nav-main nav.collapse:not(.mobile-nav-open) {
        display: none !important;
    }
    
    /* Show hamburger button on mobile */
    .header-btn-collapse-nav {
        display: block !important;
    }
}

/* Desktop - hide hamburger button */
@media (min-width: 992px) {
    .header-btn-collapse-nav {
        display: none !important;
    }
    
    .mobile-nav-overlay {
        display: none !important;
    }
}

