/* ==========================================================================
   Maxon Freight Solutions - Main CSS File with Updated Navigation
   ========================================================================== */

/* CSS Variables */
:root {
    --primary-blue: #1e5099;
    --primary-red: #e21e2e;
    --light-gray: #f8f9fa;
    --dark-gray: #333;
    --gold: #ffd700;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
}

/* ==========================================================================
   Top Bar Styles - Enhanced with Mobile Responsiveness
   ========================================================================== */
.top-bar {
    background: var(--primary-red);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-icons a {
    color: white;
    margin-right: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.social-icons a:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

.contact-info span {
    margin-left: 20px;
    white-space: nowrap;
}

.contact-info i {
    margin-right: 4px;
    color: var(--gold);
}

.flag-selector a {
    color: white;
    text-decoration: none;
    margin: 0 4px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.flag-selector a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--gold);
}

/* Mobile Layout for Top Bar */
.mobile-layout {
    display: none;
}

/* Mobile-specific styles for Top Bar */
@media (max-width: 767.98px) {
    .top-bar {
        padding: 6px 0;
        font-size: 0.75rem;
    }

    /* Hide desktop layout */
    .top-bar .d-none.d-md-flex {
        display: none !important;
    }

    /* Show mobile layout */
    .mobile-layout {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        text-align: center;
    }

    .mobile-layout .social-icons {
        order: 1;
    }

    .mobile-layout .social-icons a {
        margin: 0 12px;
        font-size: 1.1rem;
        margin-right: 12px;
    }

    .mobile-layout .contact-info {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 0.7rem;
    }

    .contact-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        align-items: center;
    }

    .mobile-layout .contact-info span {
        margin: 0 2px;
        font-size: 0.7rem;
        margin-left: 2px;
    }

    .mobile-layout .flag-selector {
        margin-top: 4px;
    }

    .mobile-layout .flag-selector a {
        font-size: 0.7rem;
        padding: 1px 4px;
    }

    /* Hide phone on very small screens */
    @media (max-width: 480px) {
        .phone-desktop {
            display: none;
        }

        .phone-mobile {
            font-size: 0.65rem;
        }
    }
}

/* Tablet styles for Top Bar */
@media (min-width: 768px) and (max-width: 991.98px) {
    .contact-info {
        font-size: 0.75rem;
    }

    .social-icons a {
        margin-right: 10px;
    }
}

/* Extra small mobile optimization for Top Bar */
@media (max-width: 360px) {
    .top-bar {
        padding: 4px 0;
    }

    .mobile-layout {
        gap: 6px;
    }

    .mobile-layout .social-icons a {
        margin: 0 8px;
        font-size: 1rem;
        margin-right: 8px;
    }

    .mobile-layout .contact-info span {
        font-size: 0.65rem;
    }

    .mobile-layout .flag-selector a {
        font-size: 0.65rem;
        margin: 0 2px;
    }
}

/* ==========================================================================
   Header Styles - Updated with Logo
   ========================================================================== */
.main-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-gray);
}

.logo-img {
    width: 200px;
    height: auto;
    object-fit: contain;
}

/* Desktop Navigation */
.navbar-nav .nav-link {
    color: var(--dark-gray);
    font-weight: 500;
    margin: 0 15px;
    transition: color 0.3s ease;
    font-size: 16px;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-red);
}

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

.get-quote-btn {
    background: var(--primary-red);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(226, 30, 46, 0.3);
}

.get-quote-btn:hover {
    background: #c41e1e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 30, 46, 0.4);
}

/* ==========================================================================
   Mobile Menu Toggle Styles
   ========================================================================== */
.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle .hamburger {
    width: 30px;
    height: 3px;
    background: var(--primary-blue);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(-45deg) translate(-9px, 6px);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(45deg) translate(-8px, -8px);
}

/* ==========================================================================
   Sidebar Styles
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), #2c5aa0);
    z-index: 2000;
    transition: all 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sidebar-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu a {
    display: block;
    padding: 20px 30px;
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 40px;
    color: white;
}

.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    border-left: 4px solid red;
}

.sidebar-bottom {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    padding: 0 30px;
}

.sidebar-contact-buttons {
    display: flex;
    gap: 15px;
}

.contact-btn {
    flex: 1;
    padding: 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

.contact-btn i {
    font-size: 24px;
}

.contact-btn span {
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */
.btn-primary-custom {
    background: var(--primary-red);
    border: 2px solid var(--primary-red);
    color: white;
    padding: 15px 35px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(226, 30, 46, 0.3);
}

.btn-primary-custom:hover {
    background: transparent;
    color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(226, 30, 46, 0.4);
}

.btn-secondary-custom {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 15px 35px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-3px);
}

.btn-submit {
    background: var(--primary-red);
    border: none;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-submit:hover {
    background: #c41e1e;
    transform: translateY(-2px);
}

/* ==========================================================================
   Updated Footer Styles - Darker Theme with Logo
   ========================================================================== */

.footer {
    background: #2c2c2c;
    color: white;
    padding: 60px 0 20px;
    position: relative;
}

.footer h5 {
    color: white;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Footer Logo with White Background */
.footer-logo-container {
    margin-bottom: 25px;
}

.footer-logo-bg {
    background: white;
    border-radius: 50px;
    padding: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 350px;
    width: 100%;
}

.footer-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

/* Footer Address */
.footer-address {
    margin-bottom: 20px;
}

.footer-address p {
    color: #bdc3c7;
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}



/* Footer Social Icons */
.footer-social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social-icons a {
    width: 42px;
    height: 42px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.footer-social-icons a:hover {
    background: #c41e1e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(226, 30, 46, 0.4);
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.footer-links li a:hover {
    color: white;
}

.footer-links li a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.footer-links li a:hover::before {
    width: 100%;
}

/* Newsletter Section */
.newsletter-description {
    color: #bdc3c7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.newsletter-form {
    max-width: 100%;
}

.newsletter-input-group {
    display: flex;
    border-radius: 30px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.newsletter-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #666;
    background: white;
}

.newsletter-input::placeholder {
    color: #999;
}

.newsletter-input:focus {
    box-shadow: none;
}

.newsletter-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #c41e1e;
    transform: scale(1.02);
}

/* Copyright Section */
.copyright {
    background: var(--primary-red);
    padding: 18px 0;
    text-align: center;
}

.copyright p {
    color: white;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }

    .footer-logo-bg {
        max-width: 280px;
        padding: 15px;
        justify-content: center;
        margin: 0 auto;
    }

    .footer-logo-img {
        max-height: 50px;
    }

    .footer-social-icons {
        justify-content: center;
        margin-top: 20px;
    }

    .newsletter-input-group {
        flex-direction: column;
        border-radius: 15px;
    }

    .newsletter-input {
        border-radius: 15px 15px 0 0;
        padding: 18px 20px;
    }

    .newsletter-btn {
        border-radius: 0 0 15px 15px;
        padding: 18px;
    }

    .footer h5 {
        text-align: center;
        margin-top: 35px;
    }

    .footer h5:first-child {
        margin-top: 0;
    }

    .footer-address,
    .footer-contact {
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .footer-logo-bg {
        max-width: 250px;
        padding: 12px;
    }

    .footer-logo-img {
        max-height: 40px;
    }

    .footer-social-icons a {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .footer-contact p {
        font-size: 0.85rem;
    }

        .footer-address,
    .footer-contact {
        text-align: center;
    }
}
/* ==========================================================================
   Form Styles
   ========================================================================== */
.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(30, 80, 153, 0.25);
    outline: none;
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */
.fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.fade-in-up-delay {
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
    }
    75% {
        transform: translateY(-30px) translateX(5px);
    }
}

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

/* Animation for sidebar */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.sidebar.active {
    animation: slideInRight 0.3s ease-out;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */
@media (max-width: 991px) {
    .navbar-nav {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .get-quote-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .logo-img {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .top-bar .row > div {
        text-align: center;
        margin: 5px 0;
    }

    /* Legacy support - keeping original top bar responsive rules for backward compatibility */
    .top-bar .contact-info span {
        margin-left: 10px;
        display: block;
        margin-bottom: 5px;
    }

    .btn-primary-custom,
    .btn-secondary-custom {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }

    .sidebar {
        width: 280px;
    }

    .logo-img {
        width: 130px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 260px;
    }

    .sidebar-menu a {
        font-size: 16px;
        padding: 18px 25px;
    }

    .logo-img {
        width: 120px;
    }

    .get-quote-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .contact-btn {
        padding: 12px;
        gap: 5px;
    }

    .contact-btn i {
        font-size: 20px;
    }

    .contact-btn span {
        font-size: 12px;
    }
}
