/*
Theme Name: Acacia and Rock Logistics
Theme URI: https://acaciaandrock.com
Author: Greg
Description: Custom logistics theme for ACACIA AND ROCK INC LIMITED.
Version: 1.0
*/

/* Note: Main styling is handled by Tailwind CSS via CDN in functions.php 
   This file is primarily for Theme Metadata and specific WordPress overrides.
*/

body {
    overflow-x: hidden;
}

/* Align WordPress Admin Bar */
.admin-bar nav { 
    top: 32px !important; 
}
@media screen and (max-width: 782px) {
    .admin-bar nav { top: 46px !important; }
}

/* hide submenus 

.sub-menu.hidden {
    display: none;
}
*/

/* 
 * Base menu styling
 * 
 */
/* 
 * Base menu item
 * 
 * Top-level nav links 
 * 
 * */
.menu  > .menu-item > a {
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
    color: #4b5563; /* gray-600 */

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

/* Animated underline */
.menu > .menu-item > a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;

    background: linear-gradient(
        90deg,
        #dc2626,
        #ef4444
    );

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover State */

.menu > .menu-item:hover > a,
.menu > .menu-item:focus-within > a {
    color: #dc2626;
    transform: translateY(-1px);
}

.menu > .menu-item:hover > a::before,
.menu > .menu-item:focus-within > a::before {
    transform: scaleX(1);
}

/*active/current menu*/
.menu > .current-menu-item > a,
.menu > .current-menu-ancestor > a {
    color: #dc2626;
}

.menu > .current-menu-item > a::before {
    transform: scaleX(1);
}
/* Submenu Hover enhancements */
.sub-menu .menu-item a {
    position: relative;
    overflow: hidden;
}

/* Soft hover glow */
.sub-menu .menu-item a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(239, 68, 68, 0.08),
        rgba(239, 68, 68, 0.02)
    );

    opacity: 0;
    transition: opacity 0.25s ease;
}

.sub-menu .menu-item a:hover::before {
    opacity: 1;
}
/*Soundless motion*/
.sub-menu .menu-item a:hover {
    transform: translateX(6px);
}

/* Delay hover intent */
.menu-item-has-children > .sub-menu {
    transition-delay: 0.1s;
}

.menu-item-has-children:hover > .sub-menu {
    transition-delay: 0s;
}

/* Respect motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}


/* 
 * Base menu styling End
 * 
 */

/* Parent menu item */
.menu-item-has-children {
    position: relative;
}

/* Submenu base */
.menu-item-has-children > .sub-menu {
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 220px;

    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);

    border-radius: 14px;
    padding: 0.5rem 0.25rem;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.08),
        0 4px 10px rgba(0,0,0,0.05);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);

    transition:
        opacity 0.25s ease,
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.25s ease;

    z-index: 50;
}

/* Hover + Focus reveal*/
/* Hover + keyboard accessibility */
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Submenu Styling*/
.sub-menu .menu-item a {
    display: block;
    padding: 0.75rem 1rem;

    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;

    border-radius: 10px;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

/* Hover interaction */
.sub-menu .menu-item a:hover {
    background-color: rgba(239, 68, 68, 0.08); /* soft brand red */
    color: #dc2626;
    transform: translateX(4px);
}

/* Parent link hover cue */
.menu-item-has-children > a {
    position: relative;
    padding-right: 1.25rem;
}

/* Chevron indicator */
.menu-item-has-children > a::after {
    content: "▾";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);

    font-size: 0.7rem;
    opacity: 0.6;

    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Rotate chevron on hover */
.menu-item-has-children:hover > a::after {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
}

/* Staggered submenu animation */

.menu-item-has-children:hover .sub-menu .menu-item {
    animation: submenuFade 0.35s ease forwards;
}

.menu-item-has-children:hover .sub-menu .menu-item:nth-child(1) { animation-delay: 0.05s; }
.menu-item-has-children:hover .sub-menu .menu-item:nth-child(2) { animation-delay: 0.1s; }
.menu-item-has-children:hover .sub-menu .menu-item:nth-child(3) { animation-delay: 0.15s; }

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

/* Disable hover on mobile */

@media (max-width: 767px) {
    .menu-item-has-children > .sub-menu {
        position: static;
        box-shadow: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
    }
}

/* Services page styles */

 .service-card {
	 transition: all 0.3s ease;
}

.service-card:hover {
	transform: translateY(-5px);
	border-color: #D92323;
}

.service-icon {
	transition: all 0.3s ease;
}

.service-card:hover .service-icon {
	background-color: #D92323;
	color: white;
}

.process-step:hover .step-number {
	background-color: #D92323;
	transform: scale(1.1);
}

/* Imports-Exports Services Styles */

.check-list-item {
	transition: transform 0.2s ease;
}

.check-list-item:hover {
	transform: translateX(5px);
}

.agency-badge {
	transition: all 0.3s ease;
}

.agency-badge:hover {
	background-color: #f1f5f9;
	border-color: #0B2341;
}

/* Freight service styles */

.transport-card {
	transition: all 0.3s ease;
}

.transport-card:hover {
	transform: translateY(-5px);
	border-color: #D92323;
}

.mode-icon {
	transition: transform 0.3s ease;
}

.transport-card:hover .mode-icon {
	transform: scale(1.1);
}

/* warehousing */

.feature-box {
	transition: all 0.3s ease;
}

.feature-box:hover {
	transform: translateY(-5px);
	border-color: #D92323;
}

/* consolidation */

.process-step:hover .step-icon {
	background-color: #D92323;
	color: white;
	transform: scale(1.1);
}

/* Air freight */

.benefit-card {
	transition: all 0.3s ease;
}

.benefit-card:hover {
	transform: translateY(-5px);
	background-color: #f0f9ff;
}

/* Sea freight */

.service-feature {
	transition: all 0.3s ease;
}

.service-feature:hover {
	transform: translateY(-5px);
	border-color: #D92323;
}