/* Global styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 0;
}

/* Header styles */
.site-header {
    background: #003366;
    color: white;
    padding: 1rem 0;
    margin-bottom: 0;
    /* removed extra bottom margin */
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 500;
}

.nav-link:hover {
    text-decoration: underline;
}

/* Hero section */
.hero {
    background: linear-gradient(to bottom, #0066cc, #003366);
    color: white;
    padding: 2.5rem 1rem 2rem;
    text-align: center;
    margin: 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Latest Guides */
.latest-guides {
    margin: 3rem auto;
    padding: 0 1rem;
    max-width: 1100px;
}

.latest-guides h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.article-card h3 a {
    color: #003366;
    text-decoration: none;
}

.article-card h3 a:hover {
    text-decoration: underline;
}

.article-card p {
    margin: 0.75rem 0;
    line-height: 1.5;
}

.card-date {
    font-size: 0.85rem;
    color: #666;
}

/* Footer styles */
footer {
    background: #003366;
    color: white;
    padding: 1rem 0;
    margin-top: 0;
    /* removed extra top margin */
}

footer .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Article page container */
main.article-page {
    padding: 2rem 1rem;
}

/* Main article box */
.article-box {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.article-box h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.article-box h2,
.article-box h3 {
    color: #003366;
    margin-top: 2rem;
}

.article-box p {
    line-height: 1.7;
    margin: 1rem 0;
}

/* Button styling */
.button {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: #005eb8;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.button:hover {
    background: #004a94;
}

/* Callout box (warning, info, etc.) */
.callout.warning {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 1rem;
    border-radius: 6px;
    margin: 2rem 0;
}

/* Blockquote with attribution */
blockquote.quote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 5px solid #005eb8;
    background: #f9f9f9;
    font-style: italic;
    color: #333;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

blockquote.quote footer {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 500;
    color: #666;
    text-align: right;
    font-size: 0.95rem;
    background: none;
    padding: 0;
}

/* Table styling */
.table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #fff;
}

th,
td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

th {
    background: #f1f1f1;
}

/* FAQ section */
.faq .faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: none;
    font: inherit;
    padding: 1rem 1rem 1rem 2.5rem;
    font-weight: bold;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: left;
    position: relative;
    background-color: #e9efff;
    border-radius: 4px;
    color: #000;
}

.faq-question .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #000;
}

.faq-question.open .icon {
    transform: translateY(-50%) rotate(90deg);
}

.faq-answer {
    padding: 0.75rem 1rem;
    background: #f9f9f9;
    display: none;
    border-radius: 0 0 4px 4px;
}

.faq-question.open+.faq-answer {
    display: block;
}

/* Responsive video embed */
.video-wrapper {
    margin: 2rem 0;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Static pages wrapper + box for equal spacing */
.page-wrapper {
    /* Controls gap above & below the white box */
    padding: 4rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
    background: #f0f2f5;
    /* ensure grey background inside */
}

.content-box {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin: 0;
    /* no extra margins */
}

.last-updated {
    font-size: 0.95rem;
    color: #666;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Prevent extra whitespace from first/last child inside .content-box */
.content-box>*:first-child {
    margin-top: 0;
}

.content-box>*:last-child {
    margin-bottom: 0;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #cccccc;
    text-decoration: underline;
}

/* Button style for "View all guides" */
.view-all .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #0077cc;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.view-all .btn:hover {
    background-color: #005fa3;
}

/* All Guides Page */
.all-guides {
    padding: 2rem 1rem 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.article-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.all-guides h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0b2c52;
    text-align: center;
}

.search-box {
    margin-bottom: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.search-box input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 0.65rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: border 0.2s ease;
}

.search-box input[type="text"]:focus {
  border-color: #004080;
  outline: none;
}