/* =============================================================================
   IMPROVED AND MODERNIZED STYLESHEET FOR ASSAMJOBZ.COM TOOLS
   ========================================================================== */

/* --- 1. Root Variables & Global Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

:root {
    --primary: #007bff;
    --darkPrimary: #0056b3;
    --textDark: #212529;
    --text: #495057;
    --bg: #f8f9fa;
    --border: #dee2e6;
    --white: #ffffff;
    --success: #28a745;
    --danger: #dc3545;
    
    --siteWidth: 1200px;
    --radius: 0.375rem; /* Standardized border-radius */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 2. General & Reusable Components --- */
img { max-width: 100%; height: auto; }

.container {
    width: 100%;
    max-width: var(--siteWidth);
    margin: 0 auto;
    padding: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.5;
}

.btn:is(:hover, :focus-visible) {
    background-color: var(--darkPrimary);
    border-color: var(--darkPrimary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn:disabled {
    background-color: #ced4da;
    color: #6c757d;
    border-color: #ced4da;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- 3. Header --- */
header {
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    height: 4rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99;
}
header .container { display: flex; justify-content: space-between; align-items: center; }
header .logo { display: flex; align-items: center; justify-content: center; }
header .nav { display: flex; align-items: center; gap: 0.75rem; }

/* --- 4. Main Content & Layout --- */
main { min-height: calc(100vh - 9rem); }
main.container { padding-top: 1.5rem; padding-bottom: 4rem; }
main > *:not(:last-child) { margin-bottom: 2rem; }

div.ad-box {
    background-color: var(--bg);
    min-height: 100px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 5. Tool Specific Styles (Homepage & Individual Tools) --- */
.tools h1 {
    background-color: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* For the main homepage list of tools */
.tools-list { display: grid; gap: 1rem; }
.tool-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    position: relative;
    transition: var(--transition);
}
.tool-item:is(:hover, :focus-visible) {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.tool-item .arrow { position: absolute; right: 1rem; opacity: 0.4; font-size: 1.25rem; transition: right 0.2s ease; }
.tool-item:hover .arrow { right: 0.75rem; }
.tool-info h3 { font-size: 1rem; font-weight: 600; color: var(--textDark); margin: 0 0 0.25rem 0; }
.tool-info p { font-size: 0.875rem; color: #6c757d; margin: 0; line-height: 1.4; }

/* For individual tool pages (Resizer, Calculator, etc.) */
.tools-action {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
}

.tools-option {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background-color: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.tools-option label, .tools-option h3 {
    font-size: 0.9rem;
    color: var(--textDark);
    font-weight: 500;
    margin-bottom: -0.75rem; /* Pull input closer to its label */
}
.tools-option input, .tools-option select {
    font-family: inherit;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}
.tools-option input:focus, .tools-option select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.input-group { display: flex; gap: 1rem; }
.input-group button { flex: 1; }

.checkbox-group { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-group input[type="checkbox"] { width: auto; }
.checkbox-group label { font-size: 0.85rem; font-weight: 400; margin: 0; }

.preview {
    background-color: var(--bg);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}
.preview h3 {
    background-color: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin: -1rem -1rem 1rem -1rem; /* Make header full-bleed */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.preview p { margin: 0 0 1rem 0; padding: 0 0.75rem; font-size: 1.1rem; }
.preview p::before { content: "➥ "; color: var(--primary); font-weight: 600; }
.preview p:last-child { margin-bottom: 0; }

/* --- 6. Common Sections (About, Footer) --- */
.about > h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--textDark);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    background-color: transparent; /* Override old style */
    margin-bottom: 1rem;
}
.about > div.content {
    border: none;
    padding: 0;
    font-size: 1rem;
    background-color: transparent;
    text-align: left;
}
.content a { color: var(--primary); text-decoration: none; font-weight: 500; }
.content a:hover { text-decoration: underline; }

footer {
    background-color: var(--textDark);
    font-size: 0.875rem;
    color: var(--white);
    padding: 2rem 0;
    height: auto;
}
footer .container { display: flex; justify-content: space-between; align-items: center; text-align: left; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--white); text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--primary); }

/* --- 7. Responsive Design --- */
@media only screen and (min-width: 768px) {
    .tools-list { grid-template-columns: repeat(2, 1fr); }
}
@media only screen and (max-width: 768px) {
    footer .container { flex-direction: column; gap: 1rem; text-align: center; }
}