/* scientific-style.css */

/* --- Global Resets and Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px; /* Base font size */
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif; /* Clear, readable sans-serif */
    line-height: 1.65;
    background-color: #f8f9fa; /* Light gray background */
    color: #212529; /* Dark gray text for good contrast */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Container and Layout --- */
.container {
    width: 90%;
    max-width: 1100px; /* Max width for content */
    margin: 0 auto;
    padding: 20px 15px;
}

.main-content {
    flex-grow: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Slightly different, strong sans-serif for headings */
    color: #0056b3; /* Professional blue for headings */
    margin-bottom: 0.75em;
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: 2.25rem;
    border-bottom: 2px solid #dee2e6; /* Subtle separator */
    padding-bottom: 0.3em;
    margin-bottom: 1em;
}

h2 {
    font-size: 1.75rem;
    margin-top: 1.5em;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.25em;
}

h4 {
    font-size: 1.15rem;
    color: #343a40; /* Darker gray for sub-headings */
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: #007bff; /* Standard link blue */
    text-decoration: none;
    transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}

a:hover, a:focus {
    color: #0056b3;
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem; /* Standard indentation */
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    border-left: 4px solid #007bff;
    padding: 10px 20px;
    margin: 1.5rem 0;
    background-color: #e9ecef; /* Light background for quote */
    color: #495057;
    font-style: italic;
}

code, pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    background-color: #eef1f3; /* Subtle background for code */
    border-radius: 4px;
    font-size: 0.9em;
}

code {
    padding: 0.2em 0.4em;
    color: #c7254e; /* A common color for inline code */
}

pre {
    padding: 1rem;
    overflow-x: auto; /* Allow horizontal scrolling for long code blocks */
    border: 1px solid #d1d5da;
    line-height: 1.5;
}

pre code {
    padding: 0;
    background-color: transparent;
    color: inherit; /* Inherit color from pre for block code */
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

th, td {
    border: 1px solid #dee2e6; /* Light gray borders */
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
}

thead th {
    background-color: #e9ecef; /* Header background */
    color: #0056b3; /* Header text color */
    font-weight: 600;
    border-bottom-width: 2px;
}

tbody tr:nth-child(even) {
    background-color: #f8f9fa; /* Subtle striping for readability */
}

tbody tr:hover {
    background-color: #e2e6ea; /* Hover effect for rows */
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #343a40;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

.form-text {
    font-size: 0.875em;
    color: #6c757d;
    margin-top: 0.25rem;
}

.form-check {
    display: block;
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
}

.form-check-input {
    position: absolute;
    margin-left: -1.75rem;
    margin-top: 0.2rem; /* Align better with text */
}

.form-check-label {
    margin-bottom: 0;
    font-weight: normal;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-weight: 500;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.65rem 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-primary:focus, .btn-primary.focus {
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}

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

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

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}
.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* --- Cards / Content Blocks --- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.35rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: #f0f3f5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-size: 1.1rem;
    font-weight: 600;
    color: #0056b3;
}
.card-header:first-child {
    border-radius: calc(0.35rem - 1px) calc(0.35rem - 1px) 0 0;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem; /* Overrides general h* if needed */
}

.card-text:last-child {
    margin-bottom: 0;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: #f0f3f5;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}
.card-footer:last-child {
    border-radius: 0 0 calc(0.35rem - 1px) calc(0.35rem - 1px);
}


/* --- Alerts / Notifications --- */
.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-heading {
    color: inherit;
    font-weight: 600;
}

.alert-primary {
    color: #004085;
    background-color: #cce5ff;
    border-color: #b8daff;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* --- Utilities --- */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.text-muted { color: #6c757d !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.p-3 { padding: 1rem !important; }
.p-5 { padding: 3rem !important; }


/* --- Header and Footer Specific (Example Structure) --- */
.site-header {
    background-color: #0056b3; /* Primary blue */
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.site-title {
    font-size: 1.75rem;
    color: #fff;
    text-decoration: none;
    margin: 0;
    padding: 0;
    border: none;
}
.site-title:hover {
    color: #e0e0e0;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.site-nav li {
    margin-left: 1.5rem;
    margin-bottom: 0;
}

.site-nav a {
    color: #f8f9fa;
    text-decoration: none;
    font-weight: 500;
}

.site-nav a:hover {
    color: #cce5ff;
    text-decoration: underline;
}

.site-footer {
    background-color: #343a40; /* Dark footer */
    color: #adb5bd;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9em;
    margin-top: auto; /* Pushes footer to bottom */
}
.site-footer p {
    margin-bottom: 0.25rem;
}
.site-footer a {
    color: #80bdff;
}
.site-footer a:hover {
    color: #f8f9fa;
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    .container {
        width: 95%;
    }
    .site-header .container {
        flex-direction: column;
    }
    .site-title {
        margin-bottom: 0.5rem;
    }
    .site-nav ul {
        flex-direction: column;
        align-items: center;
    }
    .site-nav li {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    h1 {
        font-size: 1.75rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    .form-control, .form-select, .btn {
        padding: 0.5rem 0.75rem; /* Smaller padding for small screens */
        font-size: 0.95rem;
    }
}