/* General Body & Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f8f9fa;
    color: #212529;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

h1, h2, h3 {
    margin-top: 0;
    line-height: 1.2;
}

a {
    color: #4A90E2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    background-color: #343a40;
    color: #fff;
    padding: 2rem 0;
    margin-bottom: 1.5rem;
}

.header-logo {
    height: 45px;
    margin-right: 20px;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.header-title-group {
    flex-grow: 1; /* Allow title group to take up space */
}

.header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.header .subtitle {
    font-size: 1.2rem;
    color: #ced4da;
    margin: 0;
}

.contact-link {
    color: #ced4da;
    font-size: 0.9rem;
    white-space: nowrap; /* Prevent wrapping on smaller screens */
}

.contact-link:hover {
    color: #fff;
}

/* Main Content */
main {
    padding-bottom: 2rem;
}

#tools-list h2 {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Tool Card (Homepage) */
.tool-card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.2s ease-in-out;
}

.tool-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.tool-card p {
    margin-bottom: 1.25rem;
    color: #495057;
}

/* Tool List (Index pages) */
.tool-list-container {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.tool-list {
    list-style-type: none;
    padding: 0;
}
.tool-list li {
    margin-bottom: 15px;
}
.tool-list a {
    font-size: 1.1em;
    font-weight: 500;
}

.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: #4A90E2;
    border: 1px solid #4A90E2;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn:hover {
    text-decoration: none;
    background-color: #357ABD;
    border-color: #357ABD;
}

.btn.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group .btn {
    flex-grow: 1;
}

/* Footer */
.footer {
    background-color: #e9ecef;
    color: #6c757d;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.footer p {
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1050; /* Sit on top, higher than bootstrap's default z-index for navbars etc. */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
    -webkit-animation-name: fadeIn;
    -webkit-animation-duration: 0.4s;
    animation-name: fadeIn;
    animation-duration: 0.4s
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 450px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    text-align: center;
    position: relative;
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 8px;
    right: 15px;
    font-size: 28px;
    font-weight: normal;
    line-height: 1;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.modal-close:hover,
.modal-close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transform: scale(1.1);
}

.modal-body .email-address {
    font-weight: bold;
    font-family: "Courier New", Courier, monospace;
    background-color: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    user-select: all; /* Allow easy copying */
}
.email-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}
.btn-copy {
    padding: 5px 10px;
    font-size: 0.9em;
    flex-shrink: 0;
}

/* Add Animation */
@-webkit-keyframes fadeIn { from {opacity: 0} to {opacity: 1} }
@keyframes fadeIn { from {opacity: 0} to {opacity: 1} }

/* Responsive Adjustments for Smaller Screens */
@media (max-width: 768px) {
    /* Reduce padding and font sizes for a more compact header on mobile */
    .header {
        padding: 1.5rem 0;
    }

    .header h1 {
        font-size: 1.75rem; /* Was 2.25rem */
    }

    .header .subtitle {
        font-size: 1rem; /* Was 1.2rem */
    }

    .header-logo {
        height: 40px; /* Was 45px */
        margin-right: 15px; /* Was 20px */
    }

    /* Make tool cards slightly more compact */
    .tool-card {
        padding: 1.25rem;
    }

    .tool-card h3 {
        font-size: 1.3rem; /* Was 1.5rem */
    }
}