/*
Theme Name: My Tools Nest
Version: 3.2.0
Description: Simple button embed theme.
Text Domain: my-tools-nest
*/

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --bg-body: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: var(--primary); transition: 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; margin-top: 20px; }

/* Header */
.site-header { background: var(--bg-white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.site-title { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.main-nav ul { display: flex; gap: 20px; list-style: none; }
.main-nav a { color: var(--text-main); font-weight: 500; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero { background: linear-gradient(to bottom, #eff6ff, #fff); padding: 60px 0; text-align: center; margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 15px; color: var(--text-main); }
.hero p { color: var(--text-light); margin-bottom: 30px; font-size: 1.1rem; }
.search-box { max-width: 500px; margin: 0 auto; position: relative; }
.search-box input { width: 100%; padding: 15px 20px; border: 1px solid var(--border); border-radius: 50px; font-size: 1rem; box-shadow: var(--shadow); outline: none; }
.search-box button { position: absolute; right: 5px; top: 5px; bottom: 5px; background: var(--primary); color: white; border: none; border-radius: 50px; padding: 0 20px; cursor: pointer; font-weight: 600; }

/* Tool Card */
.tool-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; height: 100%; }
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-img { height: 160px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.2rem; margin-bottom: 10px; font-weight: 700; }
.card-desc { font-size: 0.9rem; color: var(--text-light); margin-bottom: 15px; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cat-tag { font-size: 0.75rem; text-transform: uppercase; color: var(--text-light); font-weight: 600; }
.btn-view { background: var(--primary); color: white; padding: 8px 16px; border-radius: 4px; font-size: 0.9rem; font-weight: 600; }
.btn-view:hover { background: var(--primary-dark); color: white; }

/* --- SINGLE TOOL PAGE --- */
.single-tool-wrap { 
    background: var(--bg-white); 
    padding: 40px; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    margin-top: 30px; 
}

.tool-head { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 30px; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 20px; 
}

.tool-icon { 
    width: 80px; 
    height: 80px; 
    border-radius: 12px; 
    overflow: hidden; 
    background: #f3f4f6; 
    border: 1px solid var(--border); 
}

.entry-title { 
    font-size: 2rem; 
    font-weight: 700; 
    margin: 0; 
}

.tool-meta { 
    color: var(--text-light); 
    font-size: 0.9rem; 
    margin-top: 5px; 
}

/* --- SIMPLE BUTTON BOX --- */
.tool-action-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.tool-action-box p {
    margin-bottom: 20px;
    color: var(--text-light);
}

/* The Simple Button */
.btn-simple {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-simple:hover {
    background: var(--primary-dark);
}

/* Iframe Wrapper */
.tool-iframe-wrapper {
    display: none;
    width: 100%;
    height: 800px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.tool-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.tool-content { 
    margin-top: 30px; 
    line-height: 1.8; 
    color: #374151; 
}

.tool-content h2 { 
    font-size: 1.25rem; 
    margin-bottom: 15px; 
    font-weight: 700; 
}

.no-url-msg { 
    background: #fef3c7; 
    color: #92400e; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
}

/* Footer */
.site-footer { background: #111827; color: #d1d5db; padding: 40px 0; margin-top: 60px; text-align: center; }

/* Responsive */
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: white; padding: 20px; border-bottom: 1px solid var(--border); }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; }
    .mobile-toggle { display: block; }
    .hero h1 { font-size: 1.8rem; }
    .single-tool-wrap { padding: 20px; }
    .tool-head { flex-direction: column; text-align: center; }
    .tool-iframe-wrapper { height: 600px; }
}