﻿/* ============================================
   xfinsights Financial Agency Website Styles
   Color Scheme: Blue (#0098ff) & Charcoal (#333)
   ============================================ */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0098ff;
    --primary-blue-dark: #0077cc;
    --primary-blue-light: #4db8ff;
    --charcoal: #333;
    --charcoal-light: #555;
    --charcoal-lighter: #777;
    --light-gray: #f5f7fa;
    --medium-gray: #e1e5eb;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--charcoal);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100px;
    transition: all 0.3s ease;
}

.header.scrolled {
    height: 70px;
}

.header.scrolled .nav-moto {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--charcoal);
    text-decoration: none;
    line-height: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    max-width: 200px;
    margin-left: 20px;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 100%;
    transition: var(--transition);
}

.logo:hover .logo-image {
    transform: scale(1.05);
}

.logo-text {
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* Logo with motto container */
.logo-moto-container {
    margin-left: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.nav-moto {
    color: #333333;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.35rem;
    align-items: center;
    margin-right: 20px;
}

.nav-menu li a {
    font-weight: 500;
    color: var(--charcoal);
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
}

.nav-menu li a:hover {
    color: var(--primary-blue);
}

.nav-menu li a.active {
    color: var(--primary-blue);
    font-weight: 600;
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-blue);
}

/* Booking/Nav CTA Button */
.nav-cta {
    background-color: #0098ff;
    color: #ffffff;
    min-width: 0;
    padding: 10px 18px;
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    border-radius: var(--border-radius);
    margin-left: 1rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background-color: #007acc;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 152, 255, 0.25);
}

.booking-btn {
    background: linear-gradient(145deg, #0098ff, #0077cc);
    border-radius: 50px;
    padding: 10px 18px;
    box-shadow: 0 8px 20px rgba(0, 152, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
    text-decoration: none;
    line-height: 1;
}

.booking-btn i {
    color: white;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.booking-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.booking-btn:hover::before {
    left: 100%;
}

.booking-btn:hover {
    background: linear-gradient(145deg, #0077cc, #005a8c);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 152, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.booking-btn:hover i {
    transform: translateX(5px);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
    z-index: 2;
    position: relative;
    white-space: nowrap;
}

.btn-duration {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    line-height: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--charcoal);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== MOBILE MENU ENHANCEMENTS ===== */
@media (max-width: 768px) {
    /* SHOW HAMBURGER MENU */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 35px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        position: relative;
        margin-right: 15px;
    }
    
    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #333;
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -8px);
    }
    
    /* Hide desktop menu by default on mobile */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 100px 25px 30px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        overflow-y: auto;
        display: flex;
        margin: 0;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    /* Menu items styling */
    .nav-menu li {
        width: 100%;
        margin: 5px 0;
    }
    
    .nav-menu li a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        border-radius: 10px;
        transition: all 0.3s ease;
        color: #333;
        border-bottom: 1px solid var(--medium-gray);
    }
    
    .nav-menu li a:hover {
        background: rgba(0, 152, 255, 0.1);
        color: #0098ff;
        padding-left: 25px;
    }
    
    .nav-menu li a.active {
        background: #0098ff;
        color: white;
    }
    
    .nav-menu li a.active::after {
        display: none;
    }
    
    /* Book a Call button in mobile menu */
    .nav-menu li:last-child {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu .nav-cta,
    .nav-menu .booking-btn {
        width: 100%;
        margin: 0;
        padding: 15px 20px;
        border-radius: 50px;
        background: linear-gradient(145deg, #0098ff, #0077cc);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border: none;
    }
    
    .nav-menu .nav-cta:hover,
    .nav-menu .booking-btn:hover {
        transform: translateY(-2px);
        background: linear-gradient(145deg, #0077cc, #005a8c);
    }
    
    /* Adjust header layout */
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    /* Logo and motto responsive */
    .logo-moto-container {
        margin-left: 15px;
        display: flex;
        align-items: center;
        gap: 5px;
        transition: all 0.3s ease;
    }
    
    .logo-image {
        height: 35px;
    }
    
    .nav-moto {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
        transition: all 0.3s ease;
    }
    
    /* Scroll behavior - hide motto when scrolled */
    .header.scrolled .nav-moto {
        opacity: 0;
        visibility: hidden;
        width: 0;
        margin: 0;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .menu-toggle {
        width: 30px;
        height: 22px;
        margin-right: 10px;
    }
    
    .logo-moto-container {
        margin-left: 10px;
    }
    
    .nav-moto {
        max-width: 120px;
        font-size: 0.7rem;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .nav-menu {
        width: 85%;
        padding: 90px 20px 20px;
    }
    
    .booking-btn,
    .nav-cta {
        padding: 10px 20px;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .btn-content {
        font-size: 14px;
    }
}

/* Prevent body scroll when menu open */
body.menu-open {
    overflow: hidden;
}

/* Responsive nav safety for tablets and smaller laptops */
@media (max-width: 1024px) {
    .header {
        height: 88px;
    }

    .navbar {
        padding: 0.85rem 0;
    }

    .nav-container {
        gap: 1rem;
    }

    .logo-moto-container {
        margin-left: 14px;
        max-width: 210px;
    }

    .logo-image {
        height: 42px;
    }

    .nav-moto {
        font-size: 0.78rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu-toggle {
        display: flex;
        width: 32px;
        height: 22px;
        margin-right: 12px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 84vw);
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 96px 22px 28px;
        margin: 0;
        box-shadow: -10px 0 32px rgba(0, 0, 0, 0.16);
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
    }

    .nav-menu li a {
        display: block;
        padding: 14px 16px;
        border-bottom: 1px solid var(--medium-gray);
        border-radius: 10px;
    }

    .nav-menu li a.active::after {
        display: none;
    }

    .nav-menu li:last-child {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-menu .nav-cta,
    .nav-menu .booking-btn {
        width: 100%;
        margin-left: 0;
        padding: 13px 18px;
        justify-content: center;
    }
}

/* Fade in animation for backdrop */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Footer logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.3rem;
}

.footer-logo .logo-image {
    height: 30px;
}

