/*
Theme Name: MonthlySSH
Theme URI: https://monthlyssh.net
Author: MonthlySSH
Description: Lookalike theme for MonthlySSH free SSH/VPN account platform.
Version: 1.1.5
Text Domain: monthlyssh
*/

/* Main offset for fixed navbar — hero pages absorb this themselves */
.ms-main {
  padding-top: 72px;
}
.home .ms-main,
.page .ms-main,
.msa-route .ms-main,
.blog .ms-main,
.single-post .ms-main,
.archive .ms-main,
.search .ms-main {
  padding-top: 0;
}

/* Home + service + blog heroes: sit flush under fixed nav, no white band */
.ms-home-hero,
.ms-service-hero,
.ms-blog-hero {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0;
}
.ms-home-hero .page-header-content,
.ms-service-hero .page-header-content {
  padding-top: calc(72px + 3.25rem);
  padding-bottom: 3.5rem;
}
.ms-blog-hero .page-header-content {
  padding-top: calc(72px + 2.5rem);
  padding-bottom: 2.75rem;
}
.ms-home-hero-img {
  max-height: 280px;
  width: auto;
}
.ms-service-hero .page-header-content img.img-fluid {
  max-height: 260px;
  width: auto;
}

/* Tighter section rhythm (replaces huge py-10 gaps) */
.ms-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.ms-section-why {
  padding-bottom: 4.5rem;
}
.ms-why-list {
  padding-left: 1.15rem;
  margin-bottom: 0;
}
.ms-why-list li {
  margin-bottom: 0.5rem;
}

.ms-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.ms-service-card {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 0.75rem;
  padding: 1.15rem 1rem;
  text-align: center;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.ms-service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
}
.ms-service-card img {
  height: 44px;
  width: auto;
  margin-bottom: 0.65rem;
}
.ms-service-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #00ba94 0%, #144f37 100%);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
/* Info updates — centered mid-page card */
.ms-info-mid {
  padding: 1.5rem 0 0;
  background: transparent;
}
.ms-info-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-left: 4px solid #0d9488;
  border-radius: 0.75rem;
  padding: 1.15rem 1.35rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.55;
}
.ms-info-card-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}
.ms-info-card-title .fa {
  color: #0d9488;
  margin-right: 0.35rem;
}
.ms-info-banner {
  padding: 0.35rem 0;
  border-top: 1px dashed #e2e8f0;
}
.ms-info-banner:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.ms-info-banner a {
  color: #0d9488;
  font-weight: 600;
}
.ms-footer-stats .badge-success {
  font-size: 0.65rem;
}
img {
  max-width: 100%;
  height: auto;
}
.navbar-brand {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  margin-right: 0.75rem;
}
.navbar-brand .ms-navbar-logo,
.navbar-brand img {
  display: block;
  height: 28px !important;
  width: auto !important;
  max-height: 28px !important;
  max-width: 150px !important;
}

.ms-alert {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.ms-alert-success { background: #d4edda; color: #155724; }
.ms-alert-warning { background: #fff3cd; color: #856404; }
.ms-alert-danger { background: #f8d7da; color: #721c24; }
.ms-create-form input {
  margin-bottom: 0.75rem;
}

/* Footer — flush to last section, no white strip */
.ms-footer {
  margin-top: 0 !important;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  background-color: #1b2335 !important;
  color: rgba(255, 255, 255, 0.65);
}
.ms-footer .footer-brand {
  color: #fff;
  letter-spacing: 0.04em;
}
.ms-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.ms-footer a:hover {
  color: #fff;
  text-decoration: none;
}
.ms-footer hr {
  border-color: rgba(255, 255, 255, 0.12);
}
.ms-footer .text-uppercase-expanded {
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.7rem;
}
.ms-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ms-footer-social a:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  color: #fff;
}

/* Static pages hero */
.ms-page-hero {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.ms-page-hero .page-header-content {
  padding-top: calc(72px + 2.5rem);
  padding-bottom: 2.5rem;
}
.home .ms-page-hero .page-header-content {
  padding-top: calc(72px + 2.5rem);
}
.ms-page-content p,
.ms-seo-copy p {
  margin-bottom: 1rem;
  line-height: 1.7;
}
.ms-page-content h2,
.ms-page-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.ms-perfect-card {
  background: linear-gradient(135deg, #00ba94 0%, #144f37 100%);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 0.75rem;
  padding: 1.75rem 1.5rem;
}
.ms-perfect-card .fa-check {
  color: #fff;
}
.ms-faq .card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  overflow: hidden;
}
.ms-faq .card-header {
  background: #fff;
  border-bottom: 0;
}
.ms-faq .btn-link:hover,
.ms-faq .btn-link:focus {
  text-decoration: none;
}

/* ——— Blog ——— */
.ms-blog-hero-cat {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
}
.ms-blog-hero-cat:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff !important;
}

.ms-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.85rem;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ms-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.ms-blog-card-media {
  position: relative;
  display: block;
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, #00ba94 0%, #144f37 100%);
  text-decoration: none;
}
.ms-blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ms-blog-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 2rem;
}
.ms-blog-card-badge {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ms-blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.2rem 1.25rem;
}
.ms-blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.65rem;
}
.ms-blog-card-title a {
  color: #1e293b;
  text-decoration: none;
}
.ms-blog-card-title a:hover {
  color: #0d9488;
  text-decoration: none;
}
.ms-blog-card-excerpt {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  flex: 1;
}
.ms-blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
}
.ms-blog-card-meta .fa {
  margin-right: 0.25rem;
  color: #0d9488;
}

.ms-blog-widget {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.85rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.15rem;
}
.ms-blog-widget-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #0d9488;
}
.ms-blog-widget-title .fa {
  color: #0d9488;
}
.ms-blog-search {
  position: relative;
}
.ms-blog-search input {
  width: 100%;
  height: 2.6rem;
  padding: 0 2.75rem 0 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.9rem;
  outline: none;
}
.ms-blog-search input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.ms-blog-search button {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ba94 0%, #144f37 100%);
  color: #fff;
  cursor: pointer;
}
.ms-blog-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.35rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.ms-blog-cat-link:last-child {
  margin-bottom: 0;
}
.ms-blog-cat-link:hover {
  background: #0d9488;
  color: #fff;
  text-decoration: none;
}
.ms-blog-cat-count {
  background: #0d9488;
  color: #fff;
  min-width: 1.65rem;
  text-align: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
}
.ms-blog-cat-link:hover .ms-blog-cat-count {
  background: #fff;
  color: #0d9488;
}
.ms-blog-popular {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.ms-blog-popular:first-of-type {
  padding-top: 0;
}
.ms-blog-popular:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ms-blog-popular h4 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.3rem;
}
.ms-blog-popular h4 a {
  color: #1e293b;
  text-decoration: none;
}
.ms-blog-popular h4 a:hover {
  color: #0d9488;
}
.ms-blog-popular-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}
.ms-blog-cta {
  background: linear-gradient(135deg, #00ba94 0%, #144f37 100%) !important;
  border: 0 !important;
  color: #fff;
}
.ms-blog-cta .ms-blog-widget-title .fa {
  color: #fff;
}
.ms-blog-cta .text-white-50 {
  color: rgba(255, 255, 255, 0.8) !important;
}

.ms-blog-empty {
  text-align: center;
  padding: 3.5rem 1.25rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.85rem;
}
.ms-blog-empty .fa {
  font-size: 2.25rem;
  color: #cbd5e1;
}

.ms-blog-article {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.85rem;
  padding: 1.75rem 1.75rem 2rem;
}
.ms-blog-article-cover {
  border-radius: 0.65rem;
  overflow: hidden;
}
.ms-blog-article-cover img {
  width: 100%;
  height: auto;
  display: block;
}
.ms-blog-article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}
.ms-blog-article-content h2,
.ms-blog-article-content h3,
.ms-blog-article-content h4 {
  color: #0f172a;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.ms-blog-article-content p {
  margin-bottom: 1.15rem;
}
.ms-blog-article-content ul,
.ms-blog-article-content ol {
  margin-bottom: 1.15rem;
  padding-left: 1.35rem;
}
.ms-blog-article-content a {
  color: #0d9488;
  font-weight: 600;
}
.ms-blog-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.ms-blog-article-content pre,
.ms-blog-article-content code {
  font-size: 0.9em;
}
.ms-blog-article-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.15rem;
  border-radius: 0.5rem;
  overflow-x: auto;
}
.ms-blog-tags {
  border-top: 1px solid #f1f5f9;
}
.ms-blog-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  margin: 0 0.3rem 0.3rem 0;
  background: #f1f5f9;
  color: #334155;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}
.ms-blog-tag:hover {
  background: #0d9488;
  color: #fff;
  text-decoration: none;
}
.ms-blog-nav-link {
  display: block;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-radius: 0.65rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.ms-blog-nav-link:hover {
  background: #ecfdf5;
  text-decoration: none;
  color: inherit;
}
.ms-blog-nav-link strong {
  font-size: 0.9rem;
  color: #0f172a;
}
.ms-blog-page .pagination {
  margin-top: 0.5rem;
}
.ms-blog-page .page-numbers {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  margin: 0 0.15rem;
  border-radius: 0.4rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}
.ms-blog-page .page-numbers.current,
.ms-blog-page .page-numbers:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

/* ——— Typography safety (kill justify / wide tracking) ——— */
.page-header-title,
.page-header-text,
.page-header-ui-title,
.ms-section p,
.ms-info-banner,
.ms-blog-article-content,
.country-hero-stat,
.server-hero-stat,
.badge {
  letter-spacing: normal;
  word-spacing: normal;
}
.page-header-text,
.ms-section p,
.ms-info-banner,
.ms-blog-article-content,
.lead {
  text-align: left;
  text-justify: auto;
}
.ms-info-card {
  text-align: left;
}
.ms-info-card-title {
  text-align: center;
}
.btn-marketing,
.text-uppercase-expanded {
  letter-spacing: 0.04em;
}
.country-hero-stats,
.server-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}
.country-hero-stat strong,
.server-hero-stat strong {
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
}

/* ——— Responsive: tablet ——— */
@media (max-width: 991.98px) {
  .ms-home-hero .page-header-content,
  .ms-service-hero .page-header-content,
  .ms-blog-hero .page-header-content,
  .ms-page-hero .page-header-content {
    padding-top: calc(72px + 2.25rem);
    padding-bottom: 2.5rem;
  }
  .ms-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .ms-service-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.85rem;
  }
  .ms-blog-article {
    padding: 1.25rem;
  }
  .ms-blog-sidebar {
    margin-top: 1.5rem;
  }
  .page-header-title {
    font-size: 1.85rem !important;
    line-height: 1.25;
    word-break: break-word;
    letter-spacing: normal !important;
  }
  .page-header-text {
    font-size: 1rem !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-align: left !important;
  }
  .navbar .dropdown-menu {
    max-height: 60vh;
    overflow-y: auto;
  }
  .ms-footer .text-md-right {
    text-align: left !important;
  }
  .btn-marketing {
    letter-spacing: 0.03em !important;
  }
}

/* ——— Responsive: mobile ——— */
@media (max-width: 575.98px) {
  .navbar {
    padding: 0.35rem 0.75rem;
  }
  .navbar-brand .ms-navbar-logo,
  .navbar-brand img {
    height: 24px !important;
    max-height: 24px !important;
    max-width: 120px !important;
  }
  .ms-home-hero .page-header-content,
  .ms-service-hero .page-header-content,
  .ms-blog-hero .page-header-content,
  .ms-page-hero .page-header-content {
    padding-top: calc(64px + 1.5rem);
    padding-bottom: 1.75rem;
  }
  .ms-section {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }
  .ms-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .ms-service-card {
    padding: 0.9rem 0.55rem;
  }
  .ms-service-card img {
    height: 36px;
  }
  .ms-service-card strong {
    font-size: 0.8rem;
    line-height: 1.25;
    display: block;
  }
  .ms-service-badge {
    top: 0.35rem;
    right: 0.35rem;
    font-size: 0.58rem;
    padding: 0.1rem 0.35rem;
  }
  .page-header-title {
    font-size: 1.55rem !important;
    letter-spacing: normal !important;
  }
  .page-header-text,
  .page-header-ui-title {
    font-size: 0.95rem !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-align: left !important;
  }
  .btn-marketing {
    display: inline-block;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em !important;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .country-hero-stats,
  .server-hero-stats {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin: 0.85rem 0 1rem !important;
  }
  .country-hero-stat,
  .server-hero-stat {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 88px;
    max-width: 100%;
    padding: 0.45rem 0.65rem;
  }
  .country-hero-stat strong,
  .server-hero-stat strong {
    font-size: 1rem;
    letter-spacing: normal !important;
  }
  .country-hero-stat span,
  .server-hero-stat span {
    font-size: 0.68rem;
    letter-spacing: normal !important;
  }
  .ms-service-hero .badge,
  .ms-service-hero .badge-pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
    letter-spacing: normal !important;
  }
  .ms-service-hero .badge .badge {
    margin-top: 0.15rem;
    word-break: break-all;
  }
  .ms-info-mid {
    padding: 1rem 0.75rem 0;
  }
  .ms-info-card {
    padding: 1rem;
    font-size: 0.82rem;
    border-radius: 0.65rem;
    text-align: left;
  }
  .ms-info-banner {
    overflow-wrap: anywhere;
    letter-spacing: normal !important;
    word-spacing: normal !important;
  }
  .breadcrumb {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }
  .breadcrumb-item {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .ms-blog-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .ms-blog-article {
    padding: 1rem;
  }
  .ms-blog-article-content {
    font-size: 1rem;
    word-break: break-word;
    letter-spacing: normal !important;
    text-align: left !important;
  }
  .ms-blog-nav .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.65rem;
  }
  .ms-blog-nav .text-right {
    text-align: left !important;
  }
  .table-responsive {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive .table {
    font-size: 0.78rem;
  }
  .table-responsive .table td,
  .table-responsive .table th {
    white-space: nowrap;
  }
  .ms-footer {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
  }
  .ms-footer .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .card.p-4,
  .card.p-3 {
    padding: 1rem !important;
  }
  .ms-create-form .form-control {
    font-size: 16px; /* prevent iOS zoom */
  }
  .bg-light .text-center .small,
  .ms-section .text-center p {
    text-align: left !important;
  }
  .ms-section .text-center h2,
  .ms-section .text-center h3,
  .ms-section .text-center .h5 {
    text-align: center !important;
  }
}

/* Prevent horizontal scroll sitewide */
html, body {
  overflow-x: hidden;
}
img, svg, video, iframe {
  max-width: 100%;
}
.container {
  max-width: 100%;
}
