/*
Theme Name: Reliance Hydraulics Pro
Theme URI: https://reliancehydraulics.com
Author: Reliance Industrial Solutions
Author URI: https://reliancehydraulics.com
Description: Professional engineering solutions theme with full Elementor support - Yellow and Black construction theme. Build your entire website with Elementor including header and footer.
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reliance-hydraulics-pro
Tags: engineering, industrial, business, elementor, custom-logo, custom-menu, featured-images, full-width-template
*/

/* ==================================
   CSS VARIABLES - YELLOW & BLACK
   ================================== */
:root {
    --primary-color: #FFC107;
    --primary-dark: #FFA000;
    --secondary-color: #1a1a1a;
    --secondary-light: #2d2d2d;
    --accent-color: #FFD54F;
    --dark-color: #000000;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', 'Roboto', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.2);
}

/* ==================================
   RESET & BASE STYLES
   ================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
}

/* ==================================
   TYPOGRAPHY
   ================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

a:hover {
    color: var(--primary-dark);
}

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

/* ==================================
   LAYOUT
   ================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

/* Full-width for Elementor pages */
.elementor-page .site-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* ==================================
   BUTTONS
   ================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-light);
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* ==================================
   HEADER STYLES - COMPACT VERSION
   ================================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Top Bar - Reduced */
.top-bar {
    background: var(--secondary-color);
    color: var(--white);
    padding: 6px 0;
    font-size: 0.8rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.top-bar a {
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.top-bar a:hover {
    color: var(--primary-color);
}

.top-bar i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* Header Main - Significantly Reduced */
.header-main {
    padding: 8px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Site Branding - Compact */
.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

/* Logo - Much Smaller */
.site-logo img,
.custom-logo {
    max-height: 45px !important;
    width: auto !important;
    height: auto !important;
}

.site-identity {
    display: flex;
    flex-direction: column;
}

/* Site Title - Smaller */
.site-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: var(--secondary-color);
}

.site-title a:hover {
    color: var(--primary-color);
}

.site-title span {
    color: var(--primary-color);
}

/* Site Description - Smaller */
.site-description {
    color: var(--text-light);
    font-size: 0.7rem;
    margin: 0;
    font-style: italic;
}

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

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

.main-navigation li {
    position: relative;
    margin: 0 3px;
}

.main-navigation a {
    color: var(--secondary-color);
    font-weight: 600;
    padding: 8px 14px;
    display: block;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--primary-color);
    background: rgba(255, 193, 7, 0.1);
}

/* Dropdown Menu */
.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--secondary-color);
    min-width: 240px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    flex-direction: column;
    padding: 10px 0;
}

.main-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-navigation .sub-menu li:last-child {
    border-bottom: none;
}

.main-navigation .sub-menu a {
    color: var(--white);
    padding: 12px 20px;
    text-transform: none;
}

.main-navigation .sub-menu a:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 8px 12px;
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 4px;
}

.mobile-menu-toggle:hover {
    background: var(--secondary-light);
}

/* ==================================
   FOOTER STYLES - ULTRA COMPACT
   ================================== */
.site-footer {
    background: var(--secondary-color);
    color: var(--white);
    padding-top: 20px;
    margin-top: auto;
}

.footer-widgets {
    padding-bottom: 15px;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.footer-widget {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 5px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer-widget p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 5px;
}

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: inline-block;
    font-size: 0.9rem;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 3px;
}

.footer-widget ul.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.footer-widget ul.contact-list i {
    color: var(--primary-color);
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.footer-widget ul.contact-list span {
    font-size: 0.85rem;
    line-height: 1.4;
}

.footer-bottom {
    background: #000;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 193, 7, 0.2);
}

.footer-bottom-content {
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 2px 0;
    font-size: 0.8rem;
}

.footer-bottom strong {
    color: var(--primary-color);
}

/* ==================================
   ARCHIVE GRID (Services & Projects)
   ================================== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.archive-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.archive-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.archive-item-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.archive-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.archive-item:hover .archive-item-image img {
    transform: scale(1.1);
}

.archive-item-content {
    padding: 25px;
}

.archive-item-content .entry-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.archive-item-content .entry-title a {
    color: var(--secondary-color);
}

.archive-item-content .entry-title a:hover {
    color: var(--primary-color);
}

.archive-item-content .entry-excerpt {
    margin-bottom: 20px;
}

/* ==================================
   PAGE HEADER
   ================================== */
.page-header {
    text-align: center;
    margin: 40px 0;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--white);
    border-radius: 8px;
}

.page-header .page-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.archive-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ==================================
   WORDPRESS SPECIFIC
   ================================== */
.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.entry-meta span {
    margin-right: 15px;
}

.entry-meta i {
    color: var(--primary-color);
    margin-right: 5px;
}

.entry-content {
    margin-top: 30px;
}

.post-thumbnail {
    margin-bottom: 30px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ==================================
   PAGINATION
   ================================== */
.posts-pagination,
.pagination {
    margin: 40px 0;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

/* ==================================
   ELEMENTOR COMPATIBILITY
   ================================== */
.elementor-widget-container {
    transition: var(--transition);
}

.elementor-section {
    position: relative;
}

/* Make Elementor full-width */
.elementor-page .site-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.elementor-page .entry-header,
.elementor-page .entry-footer {
    display: none;
}

/* Hide default header/footer when Elementor versions are active */
body.elementor-location-header .site-header:not(.elementor) {
    display: none;
}

body.elementor-location-footer .site-footer:not(.elementor) {
    display: none;
}

/* ==================================
   RESPONSIVE DESIGN
   ================================== */
@media (max-width: 1024px) {
    /* Keep top bar in single line on tablets */
    .top-bar {
        font-size: 0.75rem;
    }
    
    .top-bar-left,
    .top-bar-right {
        gap: 12px;
    }
    
    .top-bar a {
        white-space: nowrap;
    }
    
    .top-bar i {
        font-size: 0.75rem;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        background: var(--white);
        box-shadow: var(--shadow);
        border-radius: 8px;
        padding: 10px;
    }
    
    .main-navigation li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f5f5f5;
        margin-top: 5px;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .top-bar-left,
    .top-bar-right {
        justify-content: center;
    }
    
    .footer-widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header .page-title {
        font-size: 2rem;
    }
    
    /* Mobile header further reduced */
    .top-bar {
        padding: 5px 0;
        font-size: 0.75rem;
    }
    
    .header-main {
        padding: 6px 0;
    }
    
    .site-logo img,
    .custom-logo {
        max-height: 38px !important;
    }
    
    .site-title {
        font-size: 1.05rem;
    }
    
    .site-description {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .site-title {
        font-size: 0.95rem;
    }
    
    .site-logo img,
    .custom-logo {
        max-height: 35px !important;
    }
    
    .page-header .page-title {
        font-size: 1.75rem;
    }
    
    /* Ultra compact footer on mobile */
    .footer-widgets-grid {
        gap: 12px;
    }
    
    .footer-widget h3 {
        font-size: 0.9rem;
        margin-bottom: 7px;
    }
}

/* ==================================
   UTILITY CLASSES
   ================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0 !important; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.pt-0 { padding-top: 0 !important; }
.pt-40 { padding-top: 40px; }
.pb-0 { padding-bottom: 0 !important; }
.pb-40 { padding-bottom: 40px; }

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    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;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}