/*
Theme Name: Solutions Tool Hub
Theme URI: https://example.com/solutions-tool-hub
Author: Manus
Author URI: https://manus.im
Description: A responsive WordPress theme for tool libraries and blog content. Features include custom post type "Tools" with external URL redirects, tool logos, multiple widget areas, SEO optimization, and AdSense ready.
Version: 2.6.0
License: GNU General Public License v2 or later
Text Domain: solutions-tool-hub
*/

/* Base Reset & Variables */
:root {
    --primary-color: #6a5acd;
    --secondary-color: #483d8b;
    --text-color: #333333;
    --light-bg: #f8f9fc;
    --border-color: #eeeeee;
    --white: #ffffff;
    --gradient-start: #7c68ee;
    --gradient-end: #4a38b1;
    --btn-gradient: linear-gradient(90deg, #ff3b82 0%, #00d2ff 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--text-color); background-color: var(--light-bg); }
a { color: var(--primary-color); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Layout Containers */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.site-main { padding: 40px 0; }

/* Header & Dropdown Menu */
.site-header { background: #5d49c1; color: var(--white); padding: 15px 0; position: relative; z-index: 1000; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.site-branding .site-title a { color: var(--white); font-size: 26px; font-weight: 800; }
.menu-toggle { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }

.main-navigation ul { list-style: none; display: flex; gap: 25px; }
.main-navigation li { position: relative; }
.main-navigation a { color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 600; padding: 10px 0; display: block; }
.main-navigation li:hover > ul { display: flex; }
.main-navigation ul ul { 
    display: none; position: absolute; top: 100%; left: 0; background: white; min-width: 180px; 
    padding: 10px 0; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-radius: 8px; flex-direction: column;
}
.main-navigation ul ul a { color: #333; padding: 10px 20px; font-size: 13px; }

/* Section Headers */
.section-header { text-align: left; margin: 60px 0 40px; }
.badge { 
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; 
    border-radius: 30px; background: #5d49c1; color: white; font-size: 13px; font-weight: 700; margin-bottom: 20px;
}
.section-title { font-size: 40px; font-weight: 800; color: #1a1a1a; margin-bottom: 15px; }

/* Tool Grid & PERFECT UNIFORM Sizing (Title Only) */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.tool-card { 
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%); 
    padding: 40px 25px; border-radius: 24px; text-align: center; color: white;
    box-shadow: 0 12px 40px rgba(74, 56, 177, 0.15); transition: all 0.3s ease; 
    display: flex; flex-direction: column; align-items: center;
    height: 340px; /* Fixed height for title-only cards */
    overflow: hidden;
}
.tool-card:hover { transform: translateY(-10px); }

.tool-logo-art { 
    width: 90px; height: 90px; background: white; border-radius: 22px; 
    display: flex; align-items: center; justify-content: center; margin-bottom: 30px;
    overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.12); flex-shrink: 0;
}
.tool-logo-art img { width: 100%; height: 100%; object-fit: cover; }

.tool-title { 
    font-size: 20px; font-weight: 800; margin-bottom: 20px; 
    height: 56px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.4; display: flex; align-items: center; justify-content: center;
}
.btn-tool { 
    margin-top: auto; 
    background: white; color: #5d49c1; padding: 12px 35px; border-radius: 50px; 
    font-size: 14px; font-weight: 800; box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Blog Grid */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.post-card { 
    background: white; border-radius: 20px; overflow: hidden; border: 1px solid #f0f0f0; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.03); display: flex; flex-direction: column; 
    height: 500px; 
}
.post-thumbnail-link { display: block; position: relative; height: 220px; overflow: hidden; flex-shrink: 0; }
.post-thumbnail-link img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }

.post-date-badge { 
    position: absolute; top: 15px; right: 15px; background: white; padding: 8px 12px; 
    border-radius: 10px; text-align: center; font-weight: 800; font-size: 14px; z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.post-date-badge span { display: block; font-size: 10px; color: #5d49c1; text-transform: uppercase; font-weight: 700; }

.post-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
.post-category-tag { background: #f0f4ff; color: #5d49c1; padding: 5px 15px; border-radius: 8px; font-size: 11px; font-weight: 700; margin-bottom: 15px; display: inline-block; align-self: flex-start; }
.post-title { 
    font-size: 20px; font-weight: 700; margin-bottom: 15px; line-height: 1.3; 
    height: 52px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.post-excerpt { 
    font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 20px; 
    height: 68px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.post-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #888; border-top: 1px solid #f8f8f8; padding-top: 20px; margin-top: auto; }

/* Simple Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 50px 0; }
.pagination .page-numbers { 
    display: inline-flex; align-items: center; justify-content: center; 
    min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; 
    background: white; border: 1px solid #eee; color: #5d49c1; 
    font-weight: 700; transition: all 0.2s; font-size: 14px; text-decoration: none;
}
.pagination .page-numbers.current { background: #5d49c1; color: white; border-color: #5d49c1; }

/* Responsive Styles */
@media (max-width: 1100px) {
    .tool-grid { grid-template-columns: repeat(3, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .tool-card { height: 320px; padding: 25px 20px; }
    .blog-grid { grid-template-columns: 1fr; }
    .post-card { height: auto; min-height: 480px; }
}
