/*
Theme Name: Aloha Living Maui
Theme URI: https://alohalivingmaui.com
Author: Aloha Living Maui
Author URI: https://alohalivingmaui.com
Description: A modern, premium real estate theme for Maui properties featuring RETS integration
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: aloha-living
Tags: real-estate, properties, modern, responsive
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #0d47a1;
    --secondary-color: #667eea;
    --secondary-dark: #764ba2;
    --accent-color: #ff6b6b;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-ocean: linear-gradient(135deg, #1a73e8 0%, #4fc3f7 100%);
    --gradient-sunset: linear-gradient(135deg, #ff6b6b 0%, #ffa502 100%);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.75rem;
}

h3 {
    font-size: 2rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1250px;
    margin: 0 auto;
    position: relative;
}

.site-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-ocean);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    justify-content: flex-end;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-ocean);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://zimg.paragon.ice.com/ParagonImages/Property/PF/MAUI/408927/0/0/0/8cd9985fc26839ffa9378bd79c29b516/0/6fd14856b53eb91e6cc775b408f737e7/408927-6298d565-2d99-4294-8880-0486717853dd.JPG');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 0 8rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,170.7C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    opacity: 0.3;
}

/* Property Detail Hero */
.property-detail-hero {
    background: linear-gradient(135deg, #7ba2d5 0%, #5c8cd1 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    margin-bottom: 4rem;
    overflow: hidden;
}

.property-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="https://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h100v100H0z" fill="none"/%3E%3Cpath d="M50 0L100 50L50 100L0 50z" fill="rgba(255,255,255,0.05)"/%3E%3C/svg%3E');
    background-size: 100px 100px;
    opacity: 0.3;
}

.property-detail-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fe861c 0%, #71bd01 50%, #017dc4 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-ocean);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-widget h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .site-logo {
        position: static;
        margin-bottom: 1rem;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        gap: 1rem;
        margin-left: 0;
    }
}

.stats-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: #f0f4f8;
    border-radius: 8px;
    padding: 4px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.stats-tab {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.stats-tab:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stats-tab.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.stats-chart-container {
    height: 400px;
    margin-bottom: 2rem;
    position: relative;
    padding: 1rem;
}

.stats-summary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.stats-summary p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.stats-summary strong {
    font-weight: 700;
    color: #fff;
}

/* Responsive Stats */
@media (max-width: 768px) {
    .stats-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stats-tab {
        min-width: 100%;
        text-align: center;
    }

    .stats-chart-container {
        height: 300px;
        padding: 0.5rem;
    }

    .stats-summary {
        padding: 1rem 1.5rem;
    }

    .stats-summary p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .market-stats-container {
        padding: 1rem;
    }

    .stats-chart-container {
        height: 250px;
    }
}

/* Open House Page Styles */
.open-house-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.open-house-nav .nav-item {
    list-style: none;
}

.open-house-nav .nav-item .nav-link {
    display: block;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 20px;
    color: #555;
    background-color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 100px;
}

.open-house-nav .nav-item .nav-link:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
}

.open-house-nav .nav-item .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.open-house-nav .nav-day {
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.open-house-nav .nav-date {
    font-size: 1.1em;
}

.property-card {
    transition: transform 0.2s;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.property-img-wrapper {
    position: relative;
}

.open-house-time {
    background-color: #e7f1ff;
    color: #0c5460;
    border-radius: 4px;
}

/* RETS Property Card Styles (Ensure visibility) */
.rets-property-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.rets-property-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color, #007bff);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
    max-width: 100%;
    display: inline-block;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


/* Mega Menu V2 (User Requested Structure) */
.site-header .header-inner {
    position: relative;
}


/* Mega Menu V3 (Fixed Specificity & Layout) */
.site-header .header-inner {
    position: relative;
}

.mega-menu {
    position: static !important;
}

/* Main Mega Dropdown (Level 1) */
.mega-menu>.dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    padding: 30px;
    margin-top: 0;
    border-radius: 0;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: none;
    background: #fff;
    position: absolute;
    top: 100%;
    z-index: 1000;
}

/* Show Main Menu on hover */
.mega-menu:hover>.dropdown-menu {
    display: block;
}

.mega-menu .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* 5 Column Layout */
.col-md-5th {
    position: relative;
    width: 20%;
    flex: 0 0 20%;
    max-width: 20%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .col-md-5th {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        margin-bottom: 20px;
    }
}

.list-unstyled {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.has-topBar>li>span {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 14px;
    letter-spacing: 1px;
}

.has-topBar>li>a {
    color: #666;
    display: block;
    padding: 6px 0;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
    position: relative;
}

.has-topBar>li>a:hover {
    color: var(--primary-color);
}

/* Level 2 Submenus (City Class Lists) */
.dropdown-submenu {
    position: relative;
}

/* Ensure this only targets the DIRECT dropdown menu of the submenu item */
.dropdown-submenu>.dropdown-menu {
    top: -5px;
    left: 95%;
    /* Clean overlap */
    margin-top: 0;
    margin-left: 0;
    border-radius: 0;
    display: none;
    background: #fff;
    position: absolute;
    min-width: 200px;
    width: auto;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    border: 1px solid #ebebeb;
    z-index: 1005;
}

/* Show Submenu on hover */
.dropdown-submenu:hover>.dropdown-menu {
    display: block;
}

/* DISABLED - Theme's original triangle arrow - Conflicts with Mega Menu V4
/* Chevron arrow for submenu parent - EXCLUDING MEGA MENU V4 */
/*.dropdown-submenu > a:after:not(.mega-v4-col .dropdown-submenu > a:after) {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: 0;
}

.dropdown-submenu:hover > a:after:not(.mega-v4-col .dropdown-submenu:hover > a:after) {
    border-left-color: var(--primary-color);
}*/

/* Submenu Links */
.dropdown-submenu>.dropdown-menu>li>a {
    display: block;
    padding: 8px 20px;
    clear: both;
    font-weight: 400;
    line-height: 1.4;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.dropdown-submenu>.dropdown-menu>li>a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    padding-left: 20px;
}

/* Clean up old styles that might interfere */
.mega-menu-column,
.mega-menu-column ul,
.mega-menu-column h3 {
    display: none;
    /* Hide old structure just in case */
}



/* Responsive */
@media (max-width: 1200px) {
    .site-header .header-inner {
        position: static;
    }
}



/* Mega Menu V4 (Clean 6-Column Layout - Fixed) */
.mega-menu-v4-item {
    position: static !important;
}

.mega-menu-v4-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
    z-index: 9999;
    display: none;
    padding: 30px 40px;
    box-sizing: border-box;
    text-align: left !important;
    /* Force left align */
}

/* Pseudo-element bridge to prevent menu closing on small gaps */
.mega-menu-v4-container:before {
    content: "";
    display: block;
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.mega-menu-v4-item:hover .mega-menu-v4-container {
    display: block;
}

.mega-menu-v4-inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 1400px;
    margin: 0;
}

.mega-v4-col {
    flex: 0 0 16.66%;
    max-width: 16.66%;
    padding: 0 15px;
    border-right: 1px solid #f0f0f0;
    text-align: left !important;
}

.mega-v4-col:last-child {
    border-right: none;
}

.mega-v4-col h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    display: block;
    text-align: left !important;
}

.mega-v4-col ul {
    list-style: none;
    padding: 0 !important;
    /* Remove default padding */
    margin: 0 !important;
    display: block !important;
    text-align: left !important;
}

.mega-v4-col ul li {
    margin-bottom: 10px;
    position: relative;
    display: block !important;
    float: none !important;
    width: 100%;
    border: none;
    text-align: left !important;
    padding-left: 0 !important;
    /* Ensure no indent */
}

.mega-v4-col ul li a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    display: block !important;
    padding: 5px 0;
    transition: color 0.2s;
    cursor: pointer;
    background: transparent;
    text-align: left !important;
}

.mega-v4-col ul li a:hover {
    color: var(--primary-color);
    background: transparent;
}

/* Mega Menu V4 Fixes - ULTRA AGGRESSIVE BULLET REMOVAL */
.mega-v4-col ul,
.mega-v4-col ul li,
.mega-v4-col ul li.dropdown-submenu,
.mega-v4-col ul li.has-flyout,
.flyout-menu ul,
.flyout-menu ul li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    background: none !important;
    background-image: none !important;
}

/* Remove ANY and ALL pseudo-element bullets */
.mega-v4-col ul li:before,
.mega-v4-col ul li:after,
.mega-v4-col ul li.dropdown-submenu:before,
.mega-v4-col ul li.has-flyout:before,
.flyout-menu ul li:before,
.flyout-menu ul li:after {
    content: none !important;
    display: none !important;
    border: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}


/* Flyout Submenu (Level 2) */


/* MEGA MENU V4 ONLY - Override Theme's Default Arrow */
/* Flyout Submenu Trigger Link (City Name) - ULTRA SPECIFIC */
.mega-v4-col .has-flyout>a,
.mega-v4-col .dropdown-submenu>a,
.mega-v4-col li.has-flyout>a,
.mega-v4-col li.dropdown-submenu>a {
    position: relative !important;
    display: block !important;
    padding-right: 25px !important;
    /* Space for arrow */
    width: 100% !important;
    align-items: normal !important;
}

/* The Arrow (Chevron) - ULTRA SPECIFIC - OVERRIDES THEME DEFAULT */
.mega-v4-col .has-flyout>a:after,
.mega-v4-col .dropdown-submenu>a:after,
.mega-v4-col li.has-flyout>a:after,
.mega-v4-col li.dropdown-submenu>a:after {
    content: "" !important;
    /* Ensure content exists */
    display: block !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;

    /* RESET THEME'S TRIANGLE ARROW */
    float: none !important;
    border-style: solid !important;
    border-width: 0 2px 2px 0 !important;

    /* Force specific border colors: Top=Trans, Right=Gray, Bottom=Gray, Left=Trans */
    border-color: transparent #ccc #ccc transparent !important;

    /* Kill theme's borders and backgrounds */
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;

    /* POSITIONING FIXES - Critical for Right Alignment */
    left: auto !important;
    right: 0 !important;

    /* OUR CHEVRON STYLING */
    transform: translateY(-50%) rotate(-45deg) !important;
    width: 6px !important;
    height: 6px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    z-index: 99 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none;
    /* Let clicks pass through to link */
}

.mega-v4-col .has-flyout:hover>a:after,
.mega-v4-col .dropdown-submenu:hover>a:after,
.mega-v4-col li.has-flyout:hover>a:after,
.mega-v4-col li.dropdown-submenu:hover>a:after {
    border-right-color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color) !important;
    border-left-color: transparent !important;
    /* Keep theme's color override off */
}

/* FINAL FIX: AGGRESSIVE REMOVAL OF LEFT-SIDE BULLETS */
.mega-v4-col ul,
.mega-v4-col li,
.mega-v4-col a {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

.mega-v4-col li::marker,
.mega-v4-col ul::marker {
    content: none !important;
    display: none !important;
}

/* Kill ::before on LI and A tags */
.mega-v4-col li:before,
.mega-v4-col li::before,
.mega-v4-col a:before,
.mega-v4-col a::before {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    background: none !important;
}

/* Ensure link has no left padding or background */
.mega-v4-col li a {
    padding-left: 0 !important;
    background-image: none !important;
    background: transparent !important;
}


/* Flyout Menu Container */
.flyout-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: -10px;
    min-width: 240px;
    background: #fff;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border: 1px solid #eee;
    z-index: 10000;
    text-align: left !important;
}

.has-flyout:hover .flyout-menu {
    display: block;
}

.flyout-menu ul {
    padding: 0 !important;
    margin: 0 !important;
}

.flyout-menu ul li {
    display: block !important;
    float: none !important;
    width: 100%;
    text-align: left !important;
    padding-left: 0 !important;
}

.flyout-menu ul li a {
    text-transform: none;
    font-size: 13px;
    padding: 8px 15px;
    text-align: left !important;
    display: block !important;
}

.flyout-menu ul li a:hover {
    background-color: #f9f9f9;
    padding-left: 20px;
}

/* Mobile Mega Menu Overrides */
@media (max-width: 991px) {
    .mega-menu-v4-container {
        position: static !important;
        width: 100% !important;
        padding: 5px 15px !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
    }
    
    .mega-menu-v4-inner {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }
    
    .mega-v4-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
        border-right: none !important;
        border-bottom: 1px solid #eee !important;
        padding: 15px 0 !important;
    }
    
    .mega-v4-col ul li a, 
    .flyout-menu ul li a {
        white-space: normal !important;
        word-wrap: break-word !important;
        line-height: 1.5 !important;
    }
    
    .mega-v4-col:last-child {
        border-bottom: none !important;
    }
    
    .mega-v4-col h3 {
        margin-bottom: 15px !important;
        font-size: 15px !important;
    }

    /* Stack flyouts instead of pushing right */
    .flyout-menu {
        position: static !important;
        width: 100% !important;
        min-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 2px solid #ddd !important;
        padding: 5px 0 5px 15px !important;
        margin-top: 5px !important;
        background: transparent !important;
    }
    
    /* Rotate Chevron on Hover to indicate downward expansion */
    .mega-v4-col .has-flyout > a:after,
    .mega-v4-col .dropdown-submenu > a:after {
        transform: translateY(-50%) rotate(45deg) !important;
    }
}