/*
Theme Name: Vineyard Power Washing
Theme URI: https://vineyardpowerwashing.com
Author: Your Name
Description: Custom theme for Vineyard Power Washing based on Tailwind CSS.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: vineyard-power-washing
*/

/* 1. Base Overrides */
body {
    font-family: 'Inter', sans-serif;
}

/* 2. Admin Bar Fix */
body.admin-bar #main-header {
    top: 64px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #main-header {
        top: 78px;
    }
}

/* 3. Navigation Logic (THE FIX IS HERE) */

/* Essential: Set parent LI to relative so dropdown aligns to IT, not the page */
.menu-item {
    position: relative; 
}

/* Dropdown styling */
.sub-menu {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 240px; /* Width of the dropdown */
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Animation initial state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    
    z-index: 50;
    padding: 0.5rem 0;
    border: 1px solid #f3f4f6;
}

/* Reveal dropdown on hover */
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Dropdown Links */
.sub-menu li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #0F172A; /* brand-navy */
    font-size: 0.95rem;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    transition: background-color 0.2s;
}

.sub-menu li:last-child a {
    border-bottom: none;
}

.sub-menu li a:hover {
    background-color: #F1F5F9; /* slate-100 */
    color: #1E3A8A; /* brand-blue */
}