.newsletter {
    color: var(--textColor);
    padding: 20px;
    text-align: center;
    width: 100%;
}

.newsletter h2 {
    font-size: 24px;
}

.imageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modalImage {
    object-fit: contain;
    max-height: 80vh;
    max-width: 90vw;
}

.hero {
    background: var(--secondaryBackgroundColor);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5em;
}

.hero p {
    font-size: 1.2em;
    margin-top: 10px;
}

.cta-button {
    display: inline-block;
    font-size: 18px;
    color: var(--textColor);
    background: var(--secondaryColor);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.services {
    background: var(--textColor);
    padding: 50px 0;
    text-align: center;
}

.service {
    margin-top: 20px;
}

.service img {
    width: 50px;
    height: 50px;
}

.services h2 {
    font-size: 2em;
}

.service h3 {
    font-size: 1.5em;
    margin-top: 10px;
}

.service p {
    font-size: 1em;
    margin-top: 10px;
}

.about {
    background: var(--secondaryBackgroundColor);
    padding: 60px 0;
    text-align: center;
}

.about p {
    font-size: 1.2em;
    margin-top: 20px;
}

.why-choose-us {
    background: var(--textColor);
    padding: 60px 0;
    text-align: center;
}

.why-choose-us h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.why-choose-us ul {
    padding: 0;
    list-style: none;
}

.why-choose-us li {
    font-size: 1.2em;
    margin: 10px 0;
}

.testimonials {
    background: var(--secondaryBackgroundColor);
    padding: 60px 0;
    text-align: center;
}

.testimonial img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.testimonial cite {
    display: block;
    margin-top: 10px;
    font-size: 1.2em;
}

.blog {
    background: var(--textColor);
    padding: 60px 0;
    text-align: center;
    align-items: stretch;
}

.blog > h2 {
    text-align: center;
}

#blog-body {
    width: 100%;
}

.blog-post {
    margin-top: 20px;
}

.blog h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.blog-post h3 {
    font-size: 1.5em;
}

.blog-post p {
    font-size: 1em;
    margin-top: 10px;
}

.contact {
    background: var(--secondaryBackgroundColor);
    padding: 60px 0;
    text-align: center;
}

.contact h2 {
    font-size: 2em;
}

.contact ul {
    padding: 0;
    list-style: none;
}

.contact li {
    font-size: 1.2em;
    margin: 10px 0;
}

.login-container {
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 30px auto;
    padding: 30px;
    border: none;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

}

.register-container {
    display: none;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 30px auto;
    padding: 30px;
    border: none;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.login-container h1,
.register-container h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.agree-terms {
    width: auto;
}

.guides {
    width: 100%;
    box-sizing: border-box;
    padding: 24px 16px;
    text-align: center;
}

.guide-grid {
    width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  max-width: 1000px;
  margin: 14px auto 0;
}

.guide-card {
  display: block;
  text-align: left;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  text-decoration: none;
  color: inherit;
}

.guide-card:hover {
  transform: translateY(-1px);
}

.guide-card h3 {
  margin: 0 0 6px;
}

.guide-card p {
  margin: 0;
  opacity: .85;
}

.guide-meta {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
}

/* Home article preview cards */
.home-blog-grid {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.home-blog-card {
    background: var(--textColor);
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}

.home-blog-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--primaryColor), var(--secondaryColor));
}

.home-blog-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    margin: 8px 0 4px;
}

.home-blog-tag {
    background: var(--secondaryColor);
    color: var(--textColor);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
}

.home-blog-date {
    font-size: .78rem;
    color: #666;
    margin: 4px 0 8px;
}

.home-blog-read {
    display: inline-block;
    margin-top: 10px;
    background: var(--primaryColor);
    color: var(--textColor);
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    transition: opacity .2s;
}

.home-blog-read:hover {
    opacity: .85;
}

.home-blog-viewall {
    display: inline-block;
    margin-top: 24px;
    background: var(--secondaryColor);
    color: var(--textColor);
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    transition: opacity .2s;
}

.home-blog-viewall:hover {
    opacity: .85;
}

/* Blog index + article page */
.blog-grid {
    width: 100%;
    box-sizing: border-box;
    max-width: 1040px;
    margin: 20px auto 0;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.blog-post {
    background: var(--textColor);
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    margin: 0;
}

.blog-post::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--primaryColor), var(--secondaryColor));
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 2px;
}

.blog-tag {
    background: var(--secondaryColor);
    color: var(--textColor);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
}

.blog-date {
    font-size: .78rem;
    color: #666;
    margin: 2px 0 8px;
}

.blog-read-btn {
    margin-top: 10px;
    background: var(--primaryColor);
    color: var(--textColor);
    border: none;
    border-radius: 6px;
    padding: 9px 20px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
}

.blog-shell {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    background: var(--textColor);
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 12px;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.blog-back-btn {
    background: #fff;
    border: 1px solid var(--primaryColor);
    color: #1f1f1f;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}

.blog-back-btn:hover {
    background: var(--secondaryBackgroundColor);
}

.guide-section {
    width: 100%;
    box-sizing: border-box;
    display: block;
    text-align: left;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 10px;
    padding: 14px;
    margin: 12px 0;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px;
    color: #5f5f5f;
    font-size: .82rem;
}

.guide-summary {
    color: #444;
    margin: 0 0 8px;
    line-height: 1.45;
    font-size: .92rem;
}

.guide-note {
    margin: 8px 0;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #bdd2ef;
    background: #edf4ff;
    color: #1f3555;
    font-size: .86rem;
}

.guide-note.warn {
    border-color: #d6b273;
    background: #fff4dc;
    color: #6a4a17;
}

.cmd-block {
    margin-top: 8px;
}

.cmd-label {
    font-size: .75rem;
    color: #5a6880;
    margin-bottom: 4px;
}

.guide-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.guide-figure {
    margin: 0;
    border: 1px solid #c7d4ea;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.guide-figure img {
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f4f7fb;
    cursor: zoom-in;
}

.guide-figure figcaption {
    padding: 8px 10px;
    color: #4f5f77;
    font-size: .78rem;
}

.guide-section h3 {
    margin: 0 0 10px;
    color: #1f1f1f;
    font-size: 1.05rem;
}

.guide-section p {
    margin: 6px 0;
    color: #2f2f2f;
    line-height: 1.5;
}

.guide-section ol,
.guide-section ul {
    margin: 8px 0 8px 20px;
    color: #2f2f2f;
}

.guide-section li {
    margin: 6px 0;
}

.guide-cmd {
    background: #f4f7fb;
    border: 1px solid #29384f;
    border-radius: 8px;
    padding: 10px 12px;
    overflow: auto;
    color: #1e2b3f;
    font-family: Consolas, monospace;
    font-size: .84rem;
    margin-top: 8px;
    white-space: pre-wrap;
}

.guide-links {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.guide-links a {
    color: var(--primaryColor);
    text-decoration: none;
}

.guide-links a:hover {
    text-decoration: underline;
}

#blog-error {
    color: #f88;
    padding: 12px 0;
}
