/*
Theme Name: Adex Staffing Theme
Author: Tycoon Concept
Description: A premium, production-ready theme for Adex Staffing (HR & Workforce Consulting).
Version: 1.1.2
Text Domain: adex-staffing
*/

/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #FF6B00; /* Vibrant Adex Orange */
    --accent-color: #222222;  /* Dark Charcoal for contrast */
    --text-color: #444444;
    --text-light: #777777;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --border-color: #eeeeee;
    --header-height: 90px;
    --top-bar-height: 44px;
    --container-width: 1240px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --radius-sm: 8px;
    --radius-lg: 30px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    font-size: 15px;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--primary-color); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--accent-color); margin-bottom: 20px; line-height: 1.3; }

/* --- Layout Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 25px;
}
.container-fluid { width: 100%; max-width: 100%; padding: 0; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.container-fluid > .row { margin: 0; }
.col { padding: 0 15px; }
.container-fluid .col-12 { padding: 0; }

.col-12 { width: 100%; }
.col-8 { width: 66.666%; }
.col-4 { width: 33.333%; }
.col-6 { width: 50%; }

@media (max-width: 992px) {
    .col-8, .col-4 { width: 100%; }
}
@media (max-width: 768px) {
    .col-6 { width: 100%; margin-bottom: 30px; }
}

/* --- Top Bar (Desktop Only) --- */
.top-bar {
    background-color: #1a1a1a;
    color: #cccccc;
    height: var(--top-bar-height);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--primary-color);
}
.top-bar-inner { display: flex; justify-content: space-between; width: 100%; }
.top-left, .top-right { display: flex; gap: 20px; align-items: center; }

/* Click to Reveal Logic */
.contact-revealer {
    display: flex; align-items: center; cursor: pointer; position: relative;
    padding: 5px 10px; border-radius: 4px; transition: background 0.3s;
}
.contact-revealer:hover { background: #333; }
.contact-revealer i { color: var(--primary-color); font-size: 1.1rem; }
.contact-text {
    max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap;
    transition: all 0.4s ease; margin-left: 0; color: #fff; font-weight: 500;
}
.contact-revealer.active .contact-text {
    max-width: 200px; opacity: 1; margin-left: 10px;
}

@media (max-width: 992px) {
    .top-bar { display: none; }
}

/* --- Main Header --- */
.site-header {
    background: var(--white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}
.site-header.is-sticky {
    height: 75px;
    box-shadow: var(--shadow-soft);
    border-bottom: none;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* Logo */
.site-logo { z-index: 1200; position: relative; }
.site-logo img { max-height: 55px; width: auto; }
.site-title { font-size: 1.8rem; margin: 0; color: var(--accent-color); letter-spacing: -0.5px; }
.site-title span { color: var(--primary-color); }

/* Desktop Navigation (Improved Spacing & Underline) */
.main-navigation.desktop-only {
    margin-left: auto; 
    margin-right: 40px; /* Increased space before search */
}
.main-navigation.desktop-only ul { 
    display: flex; 
    align-items: center; 
    gap: 35px; /* Proper spacing between items */
    margin: 0; 
}
.main-navigation.desktop-only ul li { position: relative; }

/* Remove old border separators */
.main-navigation.desktop-only > ul > li {
    border-right: none;
    padding: 0;
}

.main-navigation.desktop-only ul li a {
    font-weight: 600; 
    font-size: 0.95rem; 
    padding: 10px 0; 
    display: block; 
    color: var(--accent-color);
    position: relative;
}

/* Orange Underline Logic (Disappears on Hover) */
/* Apply to all items EXCEPT the last two buttons */
.main-navigation.desktop-only > ul > li:not(:nth-last-child(-n+2)) > a {
    border-bottom: 3px solid var(--primary-color);
    transition: border-color 0.3s ease;
}

.main-navigation.desktop-only > ul > li:not(:nth-last-child(-n+2)) > a:hover {
    border-bottom-color: transparent; /* Disappears on hover */
    color: var(--primary-color);
}

/* --- Special Buttons (Last 2 Items) --- */

/* Second to Last: Black Button */
.main-navigation.desktop-only ul li:nth-last-child(2) a {
    background-color: var(--accent-color);
    color: var(--white) !important;
    padding: 12px 30px; /* Larger padding */
    border-radius: 50px; 
    font-weight: 600;
    margin-top: 0;
    display: inline-block;
    transition: all 0.3s;
    border-bottom: none !important; /* Override underline */
}
.main-navigation.desktop-only ul li:nth-last-child(2) a:hover {
    background-color: #444;
    transform: translateY(-2px);
}

/* Last Item: Orange Button */
.main-navigation.desktop-only ul li:last-child a {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 12px 30px; /* Larger padding */
    border-radius: 50px; 
    font-weight: 600;
    margin-top: 0;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    transition: all 0.3s;
    border-bottom: none !important; /* Override underline */
}
.main-navigation.desktop-only ul li:last-child a:hover {
    background-color: #e65c00;
    transform: translateY(-2px);
}
/* Remove Icon from Last Item */
.main-navigation.desktop-only ul li:last-child a::after {
    content: none;
}

/* Dropdown Menus */
.main-navigation ul li ul {
    position: absolute; top: 100%; left: 0;
    background: var(--white); min-width: 240px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden;
    transform: translateY(15px); transition: var(--transition);
    border-top: 4px solid var(--primary-color);
    padding: 0; flex-direction: column; display: block; z-index: 999;
}
.main-navigation ul li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-navigation ul li ul li { border-right: none !important; padding: 0 !important; }
.main-navigation ul li ul li a {
    padding: 14px 25px; display: block; border-bottom: 1px solid #f9f9f9;
    font-size: 0.9rem; color: var(--text-color); font-weight: 500;
    border-bottom: 1px solid #f9f9f9 !important; /* Reset underline inside dropdowns */
}
.main-navigation ul li ul li a:hover { background: #fdfdfd; color: var(--primary-color); padding-left: 30px; border-bottom-color: #f9f9f9 !important; }

@media (max-width: 992px) { .main-navigation.desktop-only { display: none; } }

/* --- Header Actions --- */
.header-actions { display: flex; align-items: center; gap: 15px; }

/* New Button Style Search Trigger */
.search-trigger-btn {
    cursor: pointer;
    background: #f4f4f4;
    color: var(--accent-color);
    border-radius: 50px; /* Round */
    padding: 10px 14px;
    font-size: 1rem;
    transition: all 0.3s;
}
.search-trigger-btn:hover { background: var(--accent-color); color: #fff; }

/* Search Overlay */
.search-overlay {
    position: absolute; top: 100%; right: 0; left: 0;
    background: var(--white); padding: 30px 0;
    box-shadow: var(--shadow-soft);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: var(--transition); z-index: 900; border-top: 1px solid #eee;
}
.search-overlay.active { opacity: 1; visibility: visible; transform: translateY(0); }
.search-overlay-inner { max-width: var(--container-width); margin: 0 auto; padding: 0 25px; }

/* Search Form (Pill) */
.search-form-flex { position: relative; display: flex; align-items: center; width: 100%; max-width: 700px; margin: 0 auto; }
.search-field-main {
    width: 100%; height: 50px; padding-right: 60px; padding-left: 25px;
    border: 2px solid #eee; background: #fff; font-size: 1.1rem;
    outline: none; border-radius: 50px; margin-bottom: 0; font-family: 'Poppins', sans-serif;
}
.search-field-main:focus { border-color: var(--primary-color); }
.search-submit-main {
    position: absolute; top: 2px; right: 2px; width: 46px; height: 46px;
    background: var(--primary-color); color: var(--white); border: none; padding: 0;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; transition: transform 0.2s;
}
.search-submit-main:hover { background: #e65c00; transform: scale(1.05); }

/* --- Mobile Menu Toggle (Grid Style) --- */
.mobile-toggle {
    display: none; cursor: pointer; z-index: 1200; margin-left: 10px;
    color: var(--accent-color); font-size: 1.8rem;
}
@media (max-width: 992px) { .mobile-toggle { display: block; } }

/* --- Full Screen Mobile Menu --- */
.full-screen-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fdfdfd; z-index: 2000;
    display: flex; flex-direction: column; padding-top: 80px;
    opacity: 0; visibility: hidden; transition: var(--transition); overflow-y: auto;
}
.full-screen-menu.open { opacity: 1; visibility: visible; }

.mobile-menu-close {
    position: absolute; top: 25px; right: 25px;
    background: #eee; border: none; width: 40px; height: 40px; border-radius: 50%;
    font-size: 1.2rem; cursor: pointer; color: var(--accent-color); z-index: 2001;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.mobile-menu-close:hover { background: var(--primary-color); color: #fff; }

.mobile-menu-inner { max-width: 600px; width: 100%; margin: 0 auto; padding: 20px; }

/* Mobile Nav (Horizontal Lines) */
.mobile-nav ul { padding: 0; list-style: none; }
.mobile-nav li { 
    opacity: 0; transform: translateY(20px); 
    transition: opacity 0.4s ease, transform 0.4s ease;
    border-bottom: 1px solid #e0e0e0; /* Separator Line */
    padding: 0; margin: 0;
}
.full-screen-menu.open .mobile-nav li { opacity: 1; transform: translateY(0); }
.full-screen-menu.open .mobile-nav li:nth-child(1) { transition-delay: 0.1s; }
.full-screen-menu.open .mobile-nav li:nth-child(2) { transition-delay: 0.15s; }
.full-screen-menu.open .mobile-nav li:nth-child(3) { transition-delay: 0.2s; }
.full-screen-menu.open .mobile-nav li:nth-child(4) { transition-delay: 0.25s; }

.mobile-nav a {
    font-size: 1.2rem; font-weight: 600; color: var(--accent-color);
    display: block; padding: 20px 10px;
    display: flex; justify-content: space-between; align-items: center;
}
.mobile-nav a:hover { background: #fff; color: var(--primary-color); padding-left: 20px; }

/* Mobile Menu Buttons (Last 2 Items) */
.mobile-nav li:last-child,
.mobile-nav li:nth-last-child(2) {
    border-bottom: none;
    margin-top: 15px;
    padding: 0 10px;
}

/* Mobile: Black Button */
.mobile-nav li:nth-last-child(2) a {
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50px;
    justify-content: center;
    text-align: center;
    padding: 15px;
}

/* Mobile: Orange Button */
.mobile-nav li:last-child a {
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50px;
    justify-content: center;
    text-align: center;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

/* Mobile Dropdown (Orange BG) */
.mobile-nav .sub-menu { 
    display: none; 
    margin-top: 10px; 
    background: var(--primary-color); 
    padding: 15px; 
    border-radius: 12px; 
}
.mobile-nav .sub-menu li { border-bottom: 1px solid rgba(255,255,255,0.2); }
.mobile-nav .sub-menu li:last-child { border-bottom: none; }
.mobile-nav .sub-menu a { 
    font-size: 1.1rem; 
    font-weight: 400; 
    color: #fff; 
}
.mobile-nav .sub-menu a:hover {
    background: rgba(0,0,0,0.1);
    color: #fff;
}

/* Mobile Extras (Hide Contact Details) */
.mobile-extras { display: none; }

/* --- Content Areas --- */
.site-content { padding: 80px 0; min-height: 60vh; }
.site-content.no-title-padding { padding-top: 0; padding-bottom: 0; }
.page-header { margin-bottom: 50px; border-bottom: 1px solid var(--border-color); padding-bottom: 30px; }
.page-title { font-size: 2.8rem; color: var(--accent-color); letter-spacing: -1px; }

/* Sidebar (New Style) */
.sidebar-area {
    background: #fff; padding: 30px;
    border: 1px solid #eee; /* Border instead of BG */
    border-radius: 0; position: -webkit-sticky; position: sticky; top: 110px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.widget { margin-bottom: 50px; }
.widget-title { 
    font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px;
    border-bottom: 2px solid #eee; margin-bottom: 25px; padding-bottom: 15px;
}
.widget ul li { padding: 12px 0; border-bottom: 1px solid #f5f5f5; font-size: 0.95rem; }
.widget ul li a::before { content: '»'; color: var(--primary-color); margin-right: 8px; }

/* Blog Posts */
.post-entry { margin-bottom: 70px; }
.post-thumbnail { margin-bottom: 30px; overflow: hidden; border-radius: 0; }
.post-thumbnail img { transition: transform 0.6s ease; width: 100%; }
.post-thumbnail:hover img { transform: scale(1.03); }
.entry-title { font-size: 2.2rem; margin-bottom: 20px; font-weight: 700; }
.read-more { 
    display: inline-block; margin-top: 20px; font-weight: 700; color: var(--accent-color); 
    border-bottom: 2px solid var(--primary-color); padding-bottom: 2px; transition: all 0.3s;
}
.read-more:hover { color: var(--primary-color); }

/* --- Footer --- */
.site-footer { background: #222; color: #bbb; font-size: 0.95rem; }
.footer-widgets { padding: 80px 0; }
.footer-widgets .widget-title { color: var(--white); margin-bottom: 30px; font-size: 1.2rem; }

/* Socket (Returned to Black) */
.footer-socket { background: #000; padding: 25px 0; color: #fff; font-weight: 500; border-top: 1px solid #222; }
.socket-inner { display: flex; justify-content: space-between; align-items: center; }
.socket-left { display: flex; align-items: center; gap: 20px; }
.footer-logo-sm { max-width: 100px; brightness: 0; invert: 1; /* Make logo white */ }
.socket-menu ul { display: flex; gap: 25px; margin: 0; list-style: none; }
.socket-menu a { color: rgba(255,255,255,0.8); }
.socket-menu a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 768px) {
    .socket-inner { flex-direction: column; gap: 20px; text-align: center; }
}

/* Back to Top Button */
#back-to-top {
    position: fixed; 
    bottom: 40px; 
    right: 40px;
    background: var(--accent-color); 
    color: #fff;
    width: 50px; 
    height: 50px; 
    border-radius: 50%; /* Circle */
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    opacity: 0; 
    visibility: hidden;
    transition: all 0.4s ease; 
    z-index: 9999; /* Higher Z-Index */
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { 
    background: var(--primary-color); 
    transform: translateY(-5px); 
}

/* --- Forms --- */
input[type="text"], input[type="email"], input[type="search"], textarea {
    width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 0; background: #fff;
}
input[type="submit"], button.submit {
    background: var(--accent-color); color: white; border: none; padding: 15px 40px; font-weight: 700; border-radius: 0;
}