/* Tools Hub Header */
.tools-header { text-align: center; margin-bottom: 30px; padding-top: 23px; }
.tools-header h1 { color: #111827; font-size: 36px; margin-bottom: 10px; font-weight: 900; }
.tools-header p { color: #6b7280; font-size: 18px; }

/* Grid Layout */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-bottom: 60px; }

/* Tool Card */
.tool-card {
    background: white; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 30px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
    text-align: center; display: block;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); border-color: #0056b3; }
.tool-icon { font-size: 40px; margin-bottom: 20px; }
.tool-card h3 { color: #111827; margin-bottom: 10px; font-size: 20px; font-weight: 700; }
.tool-card p { color: #6b7280; font-size: 14px; line-height: 1.5; }

/* CALCULATOR INTERNAL STYLES */
.calc-container { max-width: 600px; margin: 0 auto 60px auto; background: white; padding: 30px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #e5e7eb; }
.calc-group { margin-bottom: 20px; text-align: left; }
.calc-group label { display: block; font-weight: 700; margin-bottom: 8px; color: #374151; }
.calc-input { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 16px; box-sizing: border-box; }
.btn-calc { width: 100%; background: #0056b3; color: white; padding: 12px; border: none; border-radius: 6px; font-weight: bold; font-size: 16px; cursor: pointer; transition: 0.3s; }
.btn-calc:hover { background: #004494; }

.result-box { margin-top: 30px; background: #f0f9ff; border: 1px dashed #0056b3; padding: 20px; border-radius: 8px; display: none; }
.result-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e0f2fe; }
.result-item strong { color: #0056b3; font-size: 18px; }

.calculation-steps { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.calculation-steps h4 { margin-bottom: 10px; color: #444; }
.calculation-steps ul { font-size: 13px; color: #555; padding-left: 20px; line-height: 1.6; }

/* =========================================
   MOBILE DESIGN: COMPACT 2-COLUMN GRID
   ========================================= */

   @media (max-width: 768px) {
    
    /* 1. Switch to 2 Columns instead of 1 */
    .tools-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; /* Tighter gap */
        margin-bottom: 40px;
    }

    /* 2. Compact Card Styling */
    .tool-card {
        padding: 15px 10px; /* Much less padding */
        min-height: 140px;  /* Ensure uniform height */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* 3. Smaller Icon */
    .tool-icon { 
        font-size: 28px; 
        margin-bottom: 10px; 
    }

    /* 4. Smaller Title */
    .tool-card h3 { 
        font-size: 14px; 
        margin-bottom: 5px; 
        line-height: 1.2;
    }

    /* 5. Hide Description Text on Mobile */
    /* This saves the most space and keeps it clean */
    .tool-card p { 
        display: none; 
    }

    /* Adjust Header for Mobile */
    .tools-header {
        padding-top: 20px;
        margin-bottom: 25px;
    }
    .tools-header h1 { font-size: 24px; }
    .tools-header p { font-size: 14px; }
}