/* =========================================
   Base Styles (Shared)
   ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    color: #333;
}

/* =========================================
   Home Page Styles (index.html)
   ========================================= */
header {
    background-color: #2c3e50;
    color: white;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 1px;
}

main {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.intro-text {
    text-align: center;
    font-size: 18px;
    color: #555;
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tool-card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    border-top: 5px solid #3498db;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    border-top-color: #2980b9;
}

.tool-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 20px;
}

.tool-card p {
    color: #666;
    margin-bottom: 0;
    line-height: 1.5;
}

/* =========================================
   Converter Page Styles (vin-converter.html)
   ========================================= */
.container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 600px;
    margin: 50px auto; /* Centers the converter on the page */
    box-sizing: border-box;
}

.header-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eef2f5;
    padding-bottom: 15px;
}

.header-with-logo img {
    height: 45px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.header-with-logo h2 {
    margin: 0;
    text-align: left;
    color: #2c3e50;
}

.input-section {
    margin-bottom: 20px;
    background: #eef2f5;
    padding: 15px;
    border-radius: 6px;
    border-left: 5px solid #3498db;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-transform: uppercase;
    font-family: monospace;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

.error {
    color: #d9534f;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

th:nth-child(2) {
    background-color: #d35400;
    color: white;
}

th:nth-child(3) {
    background-color: #27ae60;
    color: white;
}

td.hex-output {
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: bold;
}

.forscan-note {
    margin-top: 20px;
    font-size: 14px;
    color: #555;
    background: #fff3cd;
    padding: 10px;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}
.card-text {
    display: flex;
    flex-direction: column;
}
.card-logo {
    height: auto;
    width: 70px;         /* Made smaller */
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 0;      /* Prevents the text from squishing the logo */
    margin-bottom: 0;    /* Removed the bottom margin since it's on the side now */
}