/**
 * Custom CSS for Naima Mining Supplies
 * Fixes for layout structure and text visibility
 */

/* Brand Colors */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e67e22;
    --accent-color: #27ae60;
    --text-color: #333;
    --light-bg: #f5f5f5;
}

/* Fix overlapping issues */
body {
    margin: 0;
    padding: 0;
}

#site-wrapper {
    position: relative;
    width: 100%;
}

#site-content {
    position: relative;
    z-index: 1;
}

/* Ensure sections don't overlap */
section {
    position: relative;
    clear: both;
    overflow: hidden;
}

/* Fix iconbox structure */
.why_us_wrap {
    width: 100%;
}

.why_us_wrap .col-md-6,
.why_us_wrap .col-sm-6 {
    margin-bottom: 30px;
}

.iconbox.inline-left.rounded {
    width: 100%;
    display: block;
}

/* Page Title Section */
.page-title {
    position: relative;
    padding: 120px 0 80px;
    background-size: cover;
    background-position: center;
}

.page-title .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.85);
}

.page-title h1 {
    color: #fff;
    font-size: 48px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.breadcrumb {
    color: #fff;
    position: relative;
    z-index: 2;
}

.breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

/* Products Section */
.products-section {
    padding: 80px 0;
}

.sidebar .widget {
    margin-bottom: 40px;
}

.sidebar .widget-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list li a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.category-list li a:hover,
.category-list li.active > a {
    background-color: var(--light-bg);
    border-left-color: var(--secondary-color);
    padding-left: 20px;
}

.sub-category {
    list-style: none;
    padding-left: 20px;
    margin-top: 10px;
}

.sub-category li a {
    font-size: 14px;
    padding: 8px 15px;
}

/* Product Grid */
.products-grid {
    margin-bottom: 40px;
}

.product-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
    transition: all 0.3s;
    overflow: hidden;
}

.product-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.btn-view {
    display: inline-block;
    padding: 10px 25px;
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s;
}

.btn-view:hover {
    background: #d35400;
    color: #fff;
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-info h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.product-info h4 a:hover {
    color: var(--secondary-color);
}

.product-category {
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

.btn-inquiry {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-inquiry:hover {
    background: #229954;
    color: #fff;
}

.no-products {
    text-align: center;
    padding: 40px;
    color: #777;
    font-size: 18px;
}

/* Search Results */
.search-results-info {
    background: var(--light-bg);
    padding: 15px 20px;
    margin-bottom: 30px;
    border-left: 3px solid var(--secondary-color);
}

/* CTA Section */
.cta-section h3 {
    margin-bottom: 10px;
}

.cta-section p {
    margin-bottom: 0;
    color: #666;
}

/* Footer Enhancements */
.social-links-footer {
    margin-top: 20px;
}

.social-links-footer a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    margin-right: 5px;
    border-radius: 3px;
    transition: background 0.3s;
}

.social-links-footer a:hover {
    background: var(--secondary-color);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links li a:hover {
    color: var(--secondary-color);
}

/* Contact Widget in Sidebar */
.widget-contact {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 5px;
}

.widget-contact p {
    margin-bottom: 15px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-title h1 {
        font-size: 32px;
    }
    
    .product-item {
        margin-bottom: 20px;
    }
    
    .sidebar {
        margin-top: 40px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Counter Section Adjustments */
.count_to {
    background-attachment: fixed;
}

.count_to h2 {
    color: #fff;
    font-size: 28px;
    line-height: 1.4;
}

/* Service Icons */
.services-list i {
    color: var(--secondary-color);
}

/* Feature Box */
.feature_box span {
    color: var(--secondary-color);
}

/* Form Styling */
#quick-inquiry-form .input-wrap,
#quick-inquiry-form .message-wrap {
    margin-bottom: 15px;
}

#quick-inquiry-form input,
#quick-inquiry-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

#quick-inquiry-form input:focus,
#quick-inquiry-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

#quick-inquiry-form .button {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 15px;
    font-weight: bold;
}

#quick-inquiry-form .button:hover {
    background: #d35400;
}

/* Portfolio/Products Filter */
.portfolio-filters ul li a {
    transition: all 0.3s;
}

.portfolio-filters ul li.active a,
.portfolio-filters ul li a:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* Why Choose Us Icons */
.iconbox .box-icon {
    background: var(--secondary-color);
}

.iconbox:hover .box-icon {
    background: var(--primary-color);
}

/* Buttons */
.flat_btn01 {
    background: var(--secondary-color);
    transition: all 0.3s;
}

.flat_btn01:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Fix text visibility in parallax sections */
.count_to .overlay {
    background: rgba(0, 0, 0, 0.7);
}

.count_to h2,
.count_to .count-number,
.count_to .count_title {
    color: #fff !important;
    position: relative;
    z-index: 2;
}

/* Fix Why Choose Us Section */
.why_us {
    background: #fff;
    padding: 80px 0;
}

.why_us .iconbox {
    background: transparent;
    padding: 0;
}

.why_us .box-content {
    color: #666;
    line-height: 1.6;
}

/* Fix Portfolio Section Title */
.portfolio > .container {
    margin-bottom: 30px;
}

.portfolio .flat_title {
    text-align: center;
    margin-bottom: 0;
}

/* Ensure proper spacing between sections */
.feature_box {
    margin: 0;
    padding: 40px 0;
}

.services {
    padding: 80px 0;
    background: #f8f9fa;
}

.portfolio {
    padding: 80px 0 60px;
    background: #fff;
}

.count_to {
    padding: 80px 0;
}

.why_us {
    padding: 80px 0;
    background: #f8f9fa;
}

/* Fix client section if needed */
.clients {
    padding: 80px 0;
    background: #fff;
}