/*!
Theme Name: Stellaria
Theme URI: https://wp-themes.com/stellaria
Author: Stellaria Devs
Author URI: https://example-devs.com
Description: A beautifully crafted WordPress theme, cloned from Hicm. It features a modern design, clean typography, and a responsive layout.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: stellaria
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, one-column, two-columns, right-sidebar, accessibility-ready
*/

/* ==========================================================================
   #GENERAL
   ========================================================================== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 0.375rem;
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
}

/* Skip Link */
.skip-link.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link.screen-reader-text:focus {
    z-index: 100000;
    top: 5px;
    left: 5px;
    width: auto;
    height: auto;
    padding: 15px 23px 14px;
    background: #fff;
    color: #0073aa;
    font-size: 14px;
    line-height: normal;
    text-decoration: none;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.2);
    clip: auto !important;
}

/* ==========================================================================
   #LAYOUT
   ========================================================================== */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ==========================================================================
   #HEADER
   ========================================================================== */

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 0 24px;
    min-height: 60px;
}

.site-branding {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-width: 0;
}

.main-navigation {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-left: 0;
}

@media (max-width: 991px) {
    .header-container {
        padding: 0 12px;
    }
    .main-navigation {
        display: none;
    }
    .header-actions {
        margin-left: auto;
    }
}


/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-header {
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.site-description {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Custom Logo */
.custom-logo {
    max-height: 50px;
    width: auto;
    height: auto;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.primary-menu-container {
    display: flex;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu > li {
    position: relative;
    margin: 0 0.5rem;
}

.primary-menu > li:first-child {
    margin-left: 0;
}

.primary-menu > li:last-child {
    margin-right: 0;
}

.primary-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

/* Dropdown Menu */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 220px;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.primary-menu > .menu-item-has-children:hover > .sub-menu,
.primary-menu > .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu .menu-item {
    margin: 0;
}

.primary-menu .sub-menu a {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    background: transparent;
}

.primary-menu .sub-menu .sub-menu {
    top: -0.5rem;
    left: 100%;
    margin: 0 0 0 0.5rem;
}

/* Mobile Menu Toggle */


.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 20px;
}

.menu-icon-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .menu-icon-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle[aria-expanded="true"] .menu-icon-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================================================
   #MAIN NAVIGATION
   ========================================================================== */
.main-navigation {
    display: flex;
    align-items: center;
}

/* Menu container */
.primary-menu-container {
    width: 100%;
}

/* Menu list */
.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Menu items */
.primary-menu > li {
    position: relative;
    margin: 0 0.25rem;
}

/* Menu links */
.primary-menu > li > a {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    position: relative;
    line-height: 1.5;
}

/* Hover & Active states */
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

/* Submenu */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 220px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.primary-menu > li:hover > .sub-menu,
.primary-menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Submenu items */
.primary-menu .sub-menu li {
    margin: 0;
    position: relative;
}

.primary-menu .sub-menu a {
    display: block;
    padding: 0.65rem 1.5rem;
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu a:focus {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

/* Submenu toggle button */
.submenu-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.submenu-toggle:focus {
    outline: none;
    background-color: rgba(0, 0, 0, 0.05);
}

.submenu-toggle-icon {
    display: inline-block;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.primary-menu > li > .submenu-toggle {
    top: 0.25rem;
    right: 0.25rem;
}

/* Menu toggle button - Mobile */
.menu-toggle-container {
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: center;
    z-index: 1001;
    margin-left: auto; /* Push to the right */
}



.menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.menu-icon {
    position: relative;
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: transparent; /* Ensure icon container is transparent */
}

.menu-icon-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Menu toggle animation */
.menu-toggle[aria-expanded="true"] .menu-icon-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.menu-toggle[aria-expanded="true"] .menu-icon-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menu overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sticky header */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-backface-visibility: hidden; /* Fix for flickering in Safari */
    backface-visibility: hidden;
}

.site-header.sticky {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.site-header.header-hide {
    transform: translateY(-100%);
}

/* ==========================================================================
   #RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 991px) {
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: var(--shadow-sm);
        z-index: 1000;
        height: 60px;
    }

    body {
        padding-top: 60px;
    }

    body.menu-open {
        overflow: hidden;
    }

    .header-container {
        padding: 0 15px;
        height: 100%;
    }

    .site-branding {
        max-width: 180px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .site-description {
        font-size: 0.75rem;
    }

    /* --- Mobile Menu --- */
    .menu-toggle-container {
        display: flex;
    }

    .menu-toggle {
        z-index: 1002;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 100%;
        height: 100%;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        overflow-y: auto;
        padding: 60px 0 30px;
        transition: transform 0.35s ease-in-out;
        transform: translateX(100%);
    }

    .main-navigation.toggled {
        transform: translateX(0);
        right: 0; /* Fallback */
    }

    /* Close button inside the panel */
    .main-navigation .menu-toggle {
        position: absolute;
        top: 10px;
        right: 10px;
        color: var(--text-color);
    }

    .primary-menu {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .primary-menu > li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .primary-menu > li:last-child {
        border-bottom: none;
    }

    .primary-menu > li > a {
        padding: 1rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1rem;
        width: calc(100% - 44px); /* Make space for the toggle button */
    }

    /* Submenu */
    .primary-menu .sub-menu.toggled,
    .primary-menu .sub-menu.open,
    .primary-menu .sub-menu[aria-hidden="false"] {
        display: block !important;
    }

    /* When a parent has submenu-open, lift it above siblings so its submenu is clickable.
       Use an explicit stacking context and make the submenu positioned absolutely so it
       overlays neighboring items instead of being pushed underneath them. */
    .primary-menu > li.submenu-open {
        position: relative;
        z-index: 1200; /* parent stacking context */
        overflow: visible; /* ensure submenu can extend outside parent bounds */
    }

    .primary-menu .sub-menu.toggled,
    .primary-menu .sub-menu.open,
    .primary-menu .sub-menu[aria-hidden="false"] {
        position: absolute; /* absolute so it overlays neighboring items */
        top: 100%;
        left: 0;
        right: auto;
        width: 100%;
        z-index: 1220; /* above parent */
        pointer-events: auto;
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
        background-color: var(--bg-light);
        padding: 0.5rem 0 0.5rem 1rem;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
    }

    /* Styles for portal-submenu (moved into navigation container/body) */
    .portal-submenu {
        list-style: none !important;
        margin: 0 !important;
        padding: 0.25rem 0 !important;
        background-color: var(--bg-light) !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
        border-top: 1px solid var(--border-color) !important;
        border-radius: 0 !important;
        pointer-events: auto !important;
        -webkit-font-smoothing: inherit;
        -moz-osx-font-smoothing: inherit;
    }
    .portal-submenu, .portal-submenu ul {
        list-style: none !important;
        margin: 0 !important;
        padding-left: 0 !important;
    }
    .portal-submenu li {
        margin: 0 !important;
        position: relative !important;
    }
    .portal-submenu a {
        display: block !important;
        padding: 0.65rem 1.5rem !important;
        color: var(--text-color) !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }
    .portal-submenu a:hover,
    .portal-submenu a:focus {
        color: var(--primary-color) !important;
        background-color: rgba(37, 99, 235, 0.05) !important;
    }
    .portal-submenu .sub-menu {
        position: static !important;
        padding-left: 0 !important;
    }

    /* Default (closed) mobile submenu */
    .primary-menu .sub-menu {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0.5rem 0 0.5rem 1rem;
        margin: 0;
        background-color: var(--bg-light);
        border-radius: 0;
        border-top: 1px solid var(--border-color);
    }


    .primary-menu .sub-menu a {
        padding: 0.65rem 0;
        font-size: 0.9rem;
        border: none;
    }
    
    .primary-menu .sub-menu li:last-child a {
        padding-bottom: 0.5rem;
    }

    /* Submenu Toggle Button */
    .submenu-toggle {
        position: absolute;
        top: 0;
        right: 0;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-light);
        padding: 0;
    }
    
    .submenu-toggle::after {
        content: '\203A'; /* Single right-pointing angle quotation mark */
        font-size: 1.5rem;
        line-height: 1;
        font-weight: bold;
        transition: transform 0.3s ease;
        transform: rotate(90deg);
    }
    
    .submenu-toggle[aria-expanded="true"]::after {
        transform: rotate(-90deg);
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease;
    }

    body.menu-open .menu-overlay {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    /* Mobile: improved hamburger button and mobile menu spacing for nicer UI */
    .menu-toggle {
        background: #0073aa00;
        color: #000000;
        border-radius: 10px;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 160ms ease, box-shadow 160ms ease;
    }

    .menu-toggle:hover,
    .menu-toggle:focus {
        transform: translateY(-1px);
        
    }

    /* Make hamburger lines more visible */
    .menu-icon-line {
        background-color: var(--text-color);
        height: 3px;
    }

    /* Mobile panel padding and spacing */
    .main-navigation.toggled {
        transform: translateX(0);
        padding-top: 72px; /* give space for header controls */
    }

    .main-navigation {
        padding-left: 0;
        padding-right: 0;
    }

    .main-navigation .primary-menu {
        padding: 0 18px;
    }

    .primary-menu > li {
        border-bottom: none;
        margin-bottom: 8px;
    }

    .primary-menu > li > a {
        padding: 14px 12px;
        border-radius: 8px;
        display: block;
        background: transparent;
        transition: background 160ms ease;
    }

    .primary-menu > li > a:hover,
    .primary-menu > li > a:focus {
        background: rgba(37,99,235,0.06);
        color: var(--primary-color);
    }

    /* Indent submenu links and increase tappable area */
    .primary-menu .sub-menu a {
        padding: 12px 16px;
        display: block;
        border-radius: 6px;
        margin-bottom: 4px;
    }

    /* Portal submenu alignment when moved */
    .portal-submenu {
        width: calc(100% - 32px) !important;
        left: 16px !important;
    }

    /* Ensure close button (menu-toggle) inside panel is visible */
    .main-navigation .menu-toggle {
        position: absolute;
        top: 12px;
        right: 12px;
        background: transparent;
        color: var(--text-color);
        box-shadow: none;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .site-title {
        font-size: 1.1rem;
    }

    .site-description {
        font-size: 0.7rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .site-content {
        padding: 2.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .site-header {
        position: sticky;
        top: 0;
    }
    
    .header-container {
        padding: 0 2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .site-content {
        padding: 3rem 2.5rem;
    }
}

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
	 ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */
html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
}

/* Sections
	 ========================================================================== */

/**
 * Remove the margin in all browsers.
 */
body {
	margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */
main {
	display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */
h1 {
	font-size: 2em;
	margin: 0.67em 0;
}

/* Grouping content
	 ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
	box-sizing: content-box;
	height: 0;
	overflow: visible;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
pre {
	font-family: monospace, monospace;
	font-size: 1em;
}

/* Text-level semantics
	 ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */
a {
	background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
	border-bottom: none;
	text-decoration: underline;
	text-decoration: underline dotted;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
	font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code,
kbd,
samp {
	font-family: monospace, monospace;
	font-size: 1em;
}

/**
 * Add the correct font size in all browsers.
 */
small {
	font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

/* Embedded content
	 ========================================================================== */

/**
 * Remove the border on images inside links in IE 10.
 */
img {
	border-style: none;
}

/* Forms
	 ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
button,
input {
	overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
button,
select {
	text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
	-moz-appearance: button;
	appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
	outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */
fieldset {
	padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *		`fieldset` elements in all browsers.
 */
legend {
	box-sizing: border-box;
	color: inherit;
	display: table;
	max-width: 100%;
	padding: 0;
	white-space: normal;
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
	vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */
textarea {
	overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */
[type="checkbox"],
[type="radio"] {
	box-sizing: border-box;
	padding: 0;
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
[type="search"] {
	-webkit-appearance: textfield;
	-moz-appearance: textfield;
	appearance: textfield;
	outline-offset: -2px;
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */
[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */
::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

/* Interactive
	 ========================================================================== */

/*
Theme Name: Hicm
*/

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.site-header {
	background-color: #ffffff; /* Cleaner background */
	padding: 15px 20px;
	display: flex; /* Enable flexbox for alignment */
	justify-content: space-between; /* Space out logo/title and nav */
	align-items: center; /* Vertically align items */
	border-bottom: 1px solid #eaeaea; /* Subtle border */
}

.site-branding {
	margin-bottom: 0; /* Remove bottom margin as flex handles spacing */
	display: flex;
	align-items: center;
}

/* Custom Logo Styling */
.custom-logo-link {
	margin-right: 15px; /* Space between logo and site title */
}

.custom-logo {
	max-height: 60px; /* Control logo height */
	width: auto; /* Maintain aspect ratio */
}

.site-title {
	margin: 0; /* Reset margin */
}

.site-title a {
	text-decoration: none;
	color: #222; /* Darker color for better contrast */
	font-size: 1.8em; /* Slightly adjusted size */
	font-weight: 700; /* Bolder */
}

.site-description {
	color: #666;
	font-size: 0.9em;
	margin-top: 2px; /* Small space below title */
	display: block; /* Ensure it's on its own line if needed */
}

/* Desktop Navigation */

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex; /* Horizontal menu for desktop */
}

.main-navigation li {
	margin: 0 10px; /* Spacing between menu items */
}

.main-navigation li:last-child {
	margin-right: 0;
}

.main-navigation a {
	text-decoration: none;
	color: #333;
	font-weight: 500; /* Medium weight */
	padding: 8px 12px;
	border-radius: 4px;
	transition: background-color 0.3s, color 0.3s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	color: #fff;
	background-color: #0073aa; /* WordPress blue for hover/active */
}

/* Mobile Menu Toggle */
.menu-toggle {
	display: none; /* Hidden on desktop */
    background: transparent;
    color: #000000;
	border: none;
	padding: 10px 15px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1em;
}

.menu-toggle:hover {
    background: transparent;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
	.site-header {
		flex-direction: row; /* Align items in a row */
		justify-content: space-between; /* Space between branding and toggle */
		align-items: center; /* Vertically align */
		padding: 10px 15px; /* Adjust padding */
	}

	.site-branding {
		margin-bottom: 0; /* Reset margin */
		width: auto; /* Allow branding to take natural width */
		justify-content: flex-start; /* Align branding to the left */
		text-align: left; /* Align text to the left */
		flex-grow: 1; /* Allow branding to take available space */
	}
	
	.custom-logo-link {
		margin-right: 10px; /* Space between logo and title */
		margin-bottom: 0; 
	}

	.custom-logo {
		max-height: 45px; /* Slightly smaller logo for mobile header */
	}
	
	.site-title {
		font-size: 1.4em; /* Adjust title size for mobile */
	}

	.site-description {
		font-size: 0.8em; /* Adjust description size */
		display: none; /* Optionally hide description on mobile for cleaner look */
	}

	.menu-toggle {
		display: block; /* Show toggle on mobile */
		width: auto; /* Adjust width to content */
		padding: 8px 12px; /* Smaller padding for a compact button */
		margin-bottom: 0; /* Reset margin */
		font-size: 0.9em; /* Adjust font size */
		order: 1; /* Ensure toggle is on the right if not implicitly by flex order */
	}

	.main-navigation {
		width: 100%;
		order: 2; /* Ensure navigation appears below the header items if it's part of the flex container */
		/* If .main-navigation is not a direct child of .site-header in the new flex row,
		   its position relative to .menu-toggle needs careful handling for the dropdown.
		   Assuming .main-navigation contains the .menu-toggle and the ul.
		   The current HTML has .menu-toggle inside .main-navigation.
		   So .main-navigation itself needs to be positioned correctly if it's not full width.
		   Let's adjust .main-navigation to be a container for the toggle and the list.
		*/
	}
	
	/* Adjusting .main-navigation to be the container for the toggle and list on mobile */
	nav#site-navigation.main-navigation {
		/* This selector targets the <nav> element */
		width: 100%; /* Allow it to shrink to the toggle button's width initially */

	}


	.main-navigation ul {
		display: none; /* Hidden by default */
		flex-direction: column; /* Stack menu items vertically */
		width: 100%;
		background-color: #f9f9f9; /* Light background for dropdown */
		border: 1px solid #eee;
		border-radius: 4px;
		padding: 10px 0; /* Padding inside the dropdown */
	}

	.main-navigation ul.toggled-on {
		display: flex; /* Show when toggled */
	}

	.main-navigation li {
		margin: 0; /* Reset horizontal margin */
		width: 100%;
	}

	.main-navigation a {
		padding: 12px 20px; /* More padding for touch targets */
		display: block; /* Make links full width */
		border-bottom: 1px solid #eee; /* Separator lines */
		color: #333;
		font-weight: 500;
	}
	
	.main-navigation li:last-child a {
		border-bottom: none;
	}

	.main-navigation a:hover {
		background-color: #e0e0e0; /* Lighter hover for mobile dropdown */
		color: #0073aa;
	}
	
	.main-navigation .current-menu-item > a,
	.main-navigation .current_page_item > a {
		background-color: #0073aa;
		color: #fff;
	}
}
details {
	display: block;
}

/*
 * Add the correct display in all browsers.
 */
summary {
	display: list-item;
}

/* Misc
	 ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */
template {
	display: none;
}

/**
 * Add the correct display in IE 10.
 */
[hidden] {
	display: none;
}

/* Box sizing
--------------------------------------------- */

/* Inherit box-sizing to more easily change it's value on a component level.
@link http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box;
}

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/

/* Typography
--------------------------------------------- */
body,
button,
input,
select,
optgroup,
textarea {
	color: #404040;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	clear: both;
}

p {
	margin-bottom: 1.5em;
}

dfn,
cite,
em,
i {
	font-style: italic;
}

blockquote {
	margin: 0 1.5em;
}

address {
	margin: 0 0 1.5em;
}

pre {
	background: #eee;
	font-family: "Courier 10 Pitch", courier, monospace;
	line-height: 1.6;
	margin-bottom: 1.6em;
	max-width: 100%;
	overflow: auto;
	padding: 1.6em;
}

code,
kbd,
tt,
var {
	font-family: monaco, consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

abbr,
acronym {
	border-bottom: 1px dotted #666;
	cursor: help;
}

mark,
ins {
	background: #fff9c0;
	text-decoration: none;
}

big {
	font-size: 125%;
}

/* Elements
--------------------------------------------- */
body {
	background: #fff;
}

hr {
	background-color: #ccc;
	border: 0;
	height: 1px;
	margin-bottom: 1.5em;
}

ul,
ol {
	margin: 0 0 1.5em 3em;
}

ul {
	list-style: disc;
}

ol {
	list-style: decimal;
}

li > ul,
li > ol {
	margin-bottom: 0;
	margin-left: 1.5em;
}

dt {
	font-weight: 700;
}

dd {
	margin: 0 1.5em 1.5em;
}

/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object {
	max-width: 100%;
}

img {
	height: auto;
	max-width: 100%;
}

figure {
	margin: 1em 0;
}

table {
	margin: 0 0 1.5em;
	width: 100%;
}

/* Links
--------------------------------------------- */
a {
	color: #4169e1;
}

a:visited {
	color: #800080;
}

a:hover,
a:focus,
a:active {
	color: #191970;
}

a:focus {
	outline: thin dotted;
}

a:hover,
a:active {
	outline: 0;
}

/* Forms
--------------------------------------------- */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border: 1px solid;
	border-color: #ccc #ccc #bbb;
	border-radius: 3px;
	background: #e6e6e6;
	color: rgba(0, 0, 0, 0.8);
	line-height: 1;
	padding: 0.6em 1em 0.4em;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
	border-color: #ccc #bbb #aaa;
}

button:active,
button:focus,
input[type="button"]:active,
input[type="button"]:focus,
input[type="reset"]:active,
input[type="reset"]:focus,
input[type="submit"]:active,
input[type="submit"]:focus {
	border-color: #aaa #bbb #bbb;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
	color: #666;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 3px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus {
	color: #111;
}

select {
	border: 1px solid #ccc;
}

textarea {
	width: 100%;
}

/*--------------------------------------------------------------
# Layouts
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/* Navigation
--------------------------------------------- */
.main-navigation {
	display: block;
	width: 100%;
}

.main-navigation ul {
	display: none;
	list-style: none;
	margin: 0;
	padding-left: 0;
}

.main-navigation ul ul {
	box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
	float: left;
	position: absolute;
	top: 100%;
	left: -999em;
	z-index: 99999;
}

.main-navigation ul ul ul {
	left: -999em;
	top: 0;
}

.main-navigation ul ul li:hover > ul,
.main-navigation ul ul li.focus > ul {
	display: block;
	left: auto;
}

.main-navigation ul ul a {
	width: 200px;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
	left: auto;
}

.main-navigation li {
	position: relative;
}

.main-navigation a {
	display: block;
	text-decoration: none;
}

/* Small menu. */
.menu-toggle,
.main-navigation.toggled ul {
	display: block;
}

@media screen and (min-width: 992px) {
    /* Hide mobile elements on desktop */
    .menu-toggle {
        display: none;
    }
    
    .menu-overlay {
        display: none !important;
    }
    
    /* Reset mobile menu styles */
    .main-navigation {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        background: transparent;
        transform: none;
        overflow: visible;
        box-shadow: none;
    }
    
    /* Desktop menu layout */
    .primary-menu {
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .primary-menu > li {
        margin: 0 15px;
        padding: 0;
        position: relative;
    }
    
    .primary-menu > li:first-child {
        margin-left: 0;
    }
    
    .primary-menu > li:last-child {
        margin-right: 0;
    }
    
    .primary-menu a {
        padding: 10px 0;
        position: relative;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
    }
    
    .primary-menu a:hover {
        color: var(--primary-color);
    }
    
    /* Desktop submenu styles */
    .primary-menu .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        padding: 10px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        z-index: 100;
        margin: 0;
        list-style: none;
    }
    
    .primary-menu .menu-item-has-children:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .primary-menu .sub-menu .sub-menu {
        top: 0;
        left: 100%;
    }
    
    .primary-menu .sub-menu li {
        margin: 0;
        padding: 0;
    }
    
    .primary-menu .sub-menu a {
        padding: 8px 20px;
        white-space: nowrap;
    }
    
    /* Hide mobile submenu toggle on desktop */
    .primary-menu .submenu-toggle {
        display: none;
    }

	.main-navigation ul {
		display: flex;
	}
}

.site-main .comment-navigation,
.site-main
.posts-navigation,
.site-main
.post-navigation {
    
    margin: 0 0 1.5em;
}


.comment-navigation .nav-links,
.posts-navigation .nav-links,
.post-navigation .nav-links {
	display: flex;
}

.comment-navigation .nav-previous,
.posts-navigation .nav-previous,
.post-navigation .nav-previous {
	flex: 1 0 50%;
}

.comment-navigation .nav-next,
.posts-navigation .nav-next,
.post-navigation .nav-next {
	text-align: end;
	flex: 1 0 50%;
}

/* Posts and pages
--------------------------------------------- */
.sticky {
	display: block;
}

.post,
.page {
	margin: 0 0 2.5em;
	background: #fff;
	border: 1px solid #e6e6e6;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	border-radius: 12px;
	padding: 2rem 1.5rem;
	transition: box-shadow 0.2s;
}

.post:hover,
.page:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

@media (max-width: 600px) {
	.post,
	.page {
		padding: 1.2rem 0.7rem;
		border-radius: 8px;
	}
}

.updated:not(.published) {
	display: none;
}

.page-content,
.entry-content,
.entry-summary {
	margin: 1.5em 0 0;
}

.page-links {
	clear: both;
	margin: 0 0 1.5em;
}

/* Comments
--------------------------------------------- */
.comment-content a {
	word-wrap: break-word;
}

.bypostauthor {
	display: block;
}

/* Widgets
--------------------------------------------- */
.widget {
	margin: 0 0 1.5em;
}

.widget select {
	max-width: 100%;
}

/* Media
--------------------------------------------- */
.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
	border: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

/* Make sure logo link wraps around logo image. */
.custom-logo-link {
	display: inline-block;
}

/* Captions
--------------------------------------------- */
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

.wp-caption-text {
	text-align: center;
}

/* Galleries
--------------------------------------------- */
.gallery {
	margin-bottom: 1.5em;
	display: grid;
	grid-gap: 1.5em;
}

.gallery-item {
	display: inline-block;
	text-align: center;
	width: 100%;
}

.gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
	grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
	grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
	grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
	display: block;
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/

/* Jetpack infinite scroll
--------------------------------------------- */

/* Hide the Posts Navigation and the Footer when Infinite Scroll is in use. */
.infinite-scroll .posts-navigation,
.infinite-scroll.neverending .site-footer {
	display: none;
}

/* Re-display the Theme Footer when Infinite Scroll has reached its end. */
.infinity-end.neverending .site-footer {
	display: block;
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/

/* Accessibility
--------------------------------------------- */

/* Text meant only for screen readers. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Do not show the outline on the skip link target. */
#primary[tabindex="-1"]:focus {
	outline: 0;
}

/* Alignments
--------------------------------------------- */
.alignleft {

	/*rtl:ignore*/
	float: left;

	/*rtl:ignore*/
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {

	/*rtl:ignore*/
	float: right;

	/*rtl:ignore*/
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}

.submenu-toggle .submenu-icon {
    transition: transform 0.3s ease-in-out;
}

.submenu-toggle[aria-expanded="true"] .submenu-icon {
    transform: rotate(180deg);
}
