/* SpeedyVoice Global Styles - Consistent across all pages */

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

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    color: #333 !important;
    font-family: 'Poppins', 'Open Sans', sans-serif;
}

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

/* Brand Colors */
.speedyvoice-primary {
    color: var(--speedyvoice-primary) !important;
}

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

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

.bg-primary {
    background-color: var(--speedyvoice-primary) !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;
}

/* 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 h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6 {
    color: white !important;
    margin-bottom: 0;
}

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

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

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

/* Alerts */
.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;
}

/* Badges */
.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;
}

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

.header-nav .nav-link {
    color: #333 !important;
}

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

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

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

#footer h5 {
    color: #ecf0f1 !important;
    font-weight: bold;
    margin-bottom: 1rem;
}

#footer a {
    color: #bdc3c7 !important;
    transition: color 0.3s ease;
    text-decoration: none;
}

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

#footer .list li {
    margin-bottom: 0.5rem;
}

#footer .social-icons {
    margin-top: 1rem;
}

#footer .social-icons ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

#footer .social-icons li {
    display: inline-block;
}

#footer .social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: #ecf0f1 !important;
    transition: all 0.3s ease;
}

#footer .social-icons a:hover {
    background-color: var(--speedyvoice-primary);
    color: white !important;
    transform: translateY(-2px);
}

#footer .footer-copyright {
    background-color: #34495e !important;
    border-top: 1px solid #4a5f7a;
    padding: 1rem 0;
}

#footer .footer-copyright p {
    color: #bdc3c7 !important;
    margin: 0;
    font-size: 0.9rem;
}

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

.page-header h1 {
    color: var(--speedyvoice-primary) !important;
}

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

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

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

/* Forms */
.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;
    box-shadow: 0 0 0 0.2rem rgba(0, 136, 204, 0.25) !important;
}

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

.cssload-pulse-loader {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    animation: cssload-pulse 1s ease-in-out infinite;
}

@keyframes cssload-pulse {
    0% { transform: scale(0); }
    100% { transform: scale(1.0); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    #footer .social-icons ul {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .table-responsive {
        font-size: 0.8rem;
    }
    
    #footer .social-icons a {
        width: 35px;
        height: 35px;
        line-height: 35px;
    }
}

/* Mobile Navigation */
@media (max-width: 991px) {
    #header .header-btn-collapse-nav {
        display: block !important;
        background-color: var(--speedyvoice-primary) !important;
        border: none !important;
        color: white !important;
        padding: 0.5rem 0.75rem !important;
        border-radius: 4px !important;
        font-size: 1.2rem !important;
    }
    
    #header .header-nav-main nav.collapse:not(.show) {
        display: none !important;
    }
    
    #header .header-nav-main nav.collapse.show {
        display: block !important;
    }
    
    #header .header-nav-main nav > ul {
        background-color: white !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 4px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        margin-top: 0.5rem !important;
        padding: 0.5rem 0 !important;
    }
    
    #header .header-nav-main nav > ul > li {
        border-bottom: 1px solid #f8f9fa !important;
    }
    
    #header .header-nav-main nav > ul > li:last-child {
        border-bottom: none !important;
    }
    
    #header .header-nav-main nav > ul > li > a {
        color: #333 !important;
        padding: 0.75rem 1rem !important;
        display: block !important;
        text-decoration: none !important;
        font-weight: 500 !important;
    }
    
    #header .header-nav-main nav > ul > li > a:hover {
        background-color: var(--speedyvoice-primary) !important;
        color: white !important;
    }
    
    #header .header-nav-main nav > ul > li > a.active {
        background-color: var(--speedyvoice-primary) !important;
        color: white !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;
    }
}

/* 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;
    }
}