/*
Theme Name: NetHome
Theme URI: https://nethome.co.uk
Author: Shakil
Description: Minimal Tailwind-based quote request theme
Version: 1.0
License: GPLv2 or later
Text Domain: nethome
*/

/* Extra button polish for Tailwind forms */
button {
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

header img {
  max-height: 50px;
}

header nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

header nav a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

header nav a:hover {
  color: #e63946;
}
/* =======================
   NAVIGATION (Desktop + Mobile)
   ======================= */

/* Basic layout */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
nav li {
  position: relative;
}

/* Top-level menu */
.menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.menu > li > a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.menu > li > a:hover {
  color: #2563eb;
}

/* Caret icon next to menu item */
.menu-item-has-children {
  display: flex;
  align-items: center;
  position: relative;
}
.menu-item-has-children > a {
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-item-has-children .caret-icon {
  margin-left: 6px;
  font-size: 0.85rem;
  color: #6b7280;
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.menu-item-has-children:hover > .caret-icon {
  color: #2563eb;
}
.rotate-180 {
  transform: rotate(180deg);
}

/* Submenu (desktop) */
.menu-item-has-children > ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
}

/* Desktop hover show */
@media (min-width: 768px) {
  .menu-item-has-children:hover > ul.sub-menu {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Submenu links */
.sub-menu li a {
  display: block;
  padding: 8px 16px;
  color: #374151;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.sub-menu li a:hover {
  background: #f3f4f6;
  color: #2563eb;
}

/* Mobile menu */
#mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}
#mobile-menu.active {
  display: flex;
}

/* Mobile submenu toggling */
#mobile-menu .sub-menu {
  display: none;
  padding-left: 16px;
  border-left: 2px solid rgba(209,213,219,0.8);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
#mobile-menu .menu-item-has-children.open > .sub-menu {
  display: block;
  max-height: 1000px;
}

