/*
Theme Name: RG Connect Global Official
Theme URI: https://rgconnectglobal.com/
Author: RG Connect Global
Author URI: https://rgconnectglobal.com/
Description: The official theme of RG Connect Global — a clean, professional design for practical tech and internet guides. Deep ocean blue with a cyan accent, readable typography, card-based post grids, and a fully responsive layout that auto-adjusts to every screen from large desktops to small phones.
Version: 1.1.4
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rg-connect-global-official
Tags: blog, education, technology, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar
*/

/* ============================================================
   1. TOKENS & RESET
   ============================================================ */
:root {
  --navy: #0f3057;
  --navy-dark: #0b2542;
  --navy-light: #1b4066;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --teal: #0d9488;
  --amber: #f59e0b;
  --bg: #f6f9fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-light: #eef2f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 48, 87, 0.08), 0 4px 14px rgba(15, 48, 87, 0.06);
  --shadow-hover: 0 4px 10px rgba(15, 48, 87, 0.1), 0 12px 28px rgba(15, 48, 87, 0.12);
  --font-head: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Safety net against horizontal overflow on small screens.
   `clip` (where supported) does not create a scroll container,
   so the sticky header keeps working. */
html, body { overflow-x: hidden; }
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

::selection { background: var(--cyan); color: #fff; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--cyan-dark); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.3;
  margin: 0 0 0.6em;
  font-weight: 700;
}

/* Fluid type: headings scale smoothly with the viewport so text
   never overflows a small phone screen. */
h1 { font-size: clamp(1.85rem, 1.25rem + 2.4vw, 2.35rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.75rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.35rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

blockquote {
  margin: 1.4em 0;
  padding: 0.9em 1.2em;
  border-left: 4px solid var(--cyan);
  background: #eefbfd;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--navy);
}

code {
  background: #eef2f7;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
  overflow-wrap: break-word;
}

pre {
  background: var(--navy-dark);
  color: #e2e8f0;
  padding: 1.1em 1.3em;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.92em;
  line-height: 1.6;
}
pre code { background: transparent; padding: 0; color: inherit; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

table { border-collapse: collapse; width: 100%; margin-bottom: 1.2em; }
th, td { border: 1px solid var(--border); padding: 0.6em 0.8em; text-align: left; }
th { background: var(--bg); color: var(--navy); font-family: var(--font-head); }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; margin: 0 auto; }

/* ============================================================
   2. BUTTONS & FORMS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: #fff; }
.btn-primary:hover { background: var(--cyan-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
}
input:focus, textarea:focus { border-color: var(--cyan); outline: 3px solid rgba(6, 182, 212, 0.25); }
label { font-weight: 600; color: var(--navy); display: block; margin-bottom: 6px; }

/* Search forms (custom searchform.php): flat flex layout.
   min-width: 0 lets the field shrink below its intrinsic width
   on narrow phones instead of overflowing the row. */
.search-form { display: flex; gap: 10px; }
.search-form .search-field { flex: 1 1 auto; min-width: 0; }
.search-submit {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.search-submit:hover { background: var(--navy-dark); transform: translateY(-1px); }

/* ============================================================
   3. HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(15, 48, 87, 0.05);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 68px;
}
.site-branding { flex-shrink: 1; min-width: 0; }
.site-branding a { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.site-branding a:hover { text-decoration: none; }
.custom-logo { max-height: 46px; width: auto; }
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo-text span { color: var(--cyan-dark); }
.logo-tagline {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.main-navigation { margin-left: auto; }
.main-navigation ul {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.main-navigation a {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-parent > a,
.main-navigation .current-category-parent > a {
  background: #e6f7fb;
  color: var(--cyan-dark);
  text-decoration: none;
}
.main-navigation .menu-item-has-children { position: relative; }
.main-navigation .sub-menu {
  display: none;
  position: absolute; left: 0; top: 100%; min-width: 220px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover); padding: 6px; z-index: 120;
}
.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu { display: block; }
.main-navigation .sub-menu li { display: block; }
.main-navigation .sub-menu a { border-radius: 6px; padding: 9px 12px; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--border); border-radius: 50%;
  color: var(--navy); cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: #e6f7fb; border-color: var(--cyan); }
.icon-btn svg { width: 20px; height: 20px; }

.menu-toggle { display: none; }

.header-search {
  display: none;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 14px 0;
}
.header-search.open { display: block; }
.header-search .search-form { max-width: 640px; margin: 0 auto; }
.header-search .search-field { flex: 1; }

/* ============================================================
   4. HERO (front page)
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, #14486e 100%);
  color: #fff;
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 340px; height: 340px; border-radius: 50%;
  border: 60px solid rgba(6, 182, 212, 0.14);
}
/* Hero text sits above the decorative ring (positioned, z-index 2),
   so the ring can never paint over the heading on tablet widths. */
.hero h1 { color: #fff; font-size: clamp(1.9rem, 1.35rem + 2.4vw, 2.6rem); margin-bottom: 0.4em; max-width: 640px; position: relative; z-index: 2; }
.hero h1 span { color: var(--cyan); }
.hero p.lead { font-size: 1.15rem; color: #cbd9e6; max-width: 620px; margin-bottom: 1.6em; position: relative; z-index: 2; }
.hero .search-form { display: flex; gap: 10px; max-width: 560px; margin-bottom: 1.4em; position: relative; z-index: 2; }
.hero .search-field { border: none; padding: 14px 18px; border-radius: 999px; font-size: 1.02rem; }
.hero .search-submit { background: var(--cyan); border-radius: 999px; white-space: nowrap; }
.hero .search-submit:hover { background: var(--cyan-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 2; }

/* ============================================================
   5. SECTIONS, CATEGORY CARDS, POST GRID
   ============================================================ */
.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2rem); margin-bottom: 0.3em; }
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--cyan); border-radius: 2px; margin: 14px auto 0;
}
.section-head.left h2::after { margin-left: 0; }
.section-head p { color: var(--muted); margin: 0; }
.section-head.left { text-align: left; margin-left: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cat-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--cyan);
}
.cat-card:nth-child(2)::before { background: var(--teal); }
.cat-card:nth-child(3)::before { background: var(--amber); }
.cat-card:nth-child(4)::before { background: var(--navy); }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #a8e6f5; text-decoration: none; }
.cat-card h3 { margin-bottom: 0.3em; font-size: 1.3rem; }
.cat-card h3 a { color: var(--navy); }
.cat-card p { color: var(--muted); margin-bottom: 0.9em; font-size: 0.98rem; }
.cat-count {
  display: inline-block;
  font-size: 0.85rem; font-weight: 600; color: var(--cyan-dark);
  background: #e6f7fb; padding: 4px 12px; border-radius: 999px;
}
.cat-card .cat-link { display: inline-block; font-weight: 600; color: var(--cyan-dark); font-size: 0.95rem; transition: transform 0.2s; }
.cat-card:hover .cat-link { transform: translateX(4px); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-grid.two-col { grid-template-columns: repeat(2, 1fr); }

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #bfeef8; }
.post-card-thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #dbe7f0; }
.post-card-thumb-link { display: block; height: 100%; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s; }
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card-title {
  font-size: 1.18rem; line-height: 1.4; margin-bottom: 0.5em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-title a { color: var(--navy); text-decoration: none; }
.post-card-title a:hover { color: var(--cyan-dark); }
.post-card-excerpt {
  color: var(--muted); font-size: 0.95rem; margin-bottom: 1em; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.post-meta time { white-space: nowrap; }
.post-meta .dot::before { content: "•"; margin-right: 14px; color: #b6c4d2; }

.cat-badge {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: #fff; background: var(--teal);
  padding: 4px 11px; border-radius: 999px;
  text-decoration: none; line-height: 1.5;
}
a.cat-badge:hover { color: #fff; text-decoration: none; opacity: 0.88; }
.cat-badge.cat-internet-connectivity { background: var(--navy); }
.cat-badge.cat-mobile-apps { background: var(--cyan-dark); }
.cat-badge.cat-business { background: var(--amber); color: #3a2a00; }
.post-card-thumb .cat-badge { position: absolute; left: 14px; top: 14px; z-index: 2; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }

/* ============================================================
   6. PAGE HEADERS, ARCHIVE, SEARCH, 404
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff;
  padding: 48px 0 52px;
  text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: 0.25em; }
.page-header p { color: #cbd9e6; margin: 0 auto; max-width: 640px; }
.page-header .post-count { color: var(--cyan); font-weight: 600; }

.no-results {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 48px 32px; text-align: center; box-shadow: var(--shadow);
}
.no-results h2 { margin-bottom: 0.4em; }
.no-results p { color: var(--muted); }
.no-results .search-form { display: flex; gap: 10px; max-width: 480px; margin: 1.4em auto 0; }
.no-results .search-field { flex: 1; }
.not-found-title { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.4rem); }

/* ============================================================
   7. SINGLE POST
   ============================================================ */
.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin: 28px 0 18px; line-height: 1.6; overflow-wrap: break-word; }
.breadcrumbs a { color: var(--cyan-dark); }
.breadcrumbs .sep { margin: 0 8px; color: #b6c4d2; }

.single-article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
  margin-bottom: 32px;
}
.single-article .entry-title { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem); margin-bottom: 0.4em; }
.single-article .post-meta { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border-light); gap: 8px 16px; }
.single-article .featured-image { margin: 0 0 28px; border-radius: var(--radius-sm); overflow: hidden; }
.single-article .featured-image img { width: 100%; display: block; }
.entry-content { font-size: 1.06rem; overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figure img { border-radius: var(--radius-sm); }
.entry-content figcaption { font-size: 0.88rem; color: var(--muted); text-align: center; margin-top: 0.5em; }
.entry-content ul li::marker, .entry-content ol li::marker { color: var(--cyan-dark); }
.entry-content a { font-weight: 500; overflow-wrap: break-word; }
.entry-content .wp-block-image img { border-radius: var(--radius-sm); }
/* Wide tables scroll horizontally instead of breaking the layout. */
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content iframe, .entry-content embed, .entry-content object, .entry-content video { max-width: 100%; }
.entry-content .wp-block-embed iframe { width: 100%; }
.entry-content .alignwide { max-width: 100%; }
.entry-content .wp-block-button__link {
  background: var(--navy); color: #fff; border-radius: 999px;
  padding: 12px 26px; font-family: var(--font-head); font-weight: 600;
}
.entry-content .wp-block-button__link:hover { background: var(--navy-dark); color: #fff; text-decoration: none; }
.page-links { margin-top: 1.6em; font-weight: 600; color: var(--navy); }
.page-links a {
  display: inline-block; min-width: 36px; text-align: center;
  padding: 4px 10px; margin-left: 6px;
  border: 1px solid var(--border); border-radius: 8px; text-decoration: none;
}
.page-links a:hover { border-color: var(--cyan); color: var(--cyan-dark); text-decoration: none; }

.post-tags { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-light); font-size: 0.92rem; }
.post-tags a {
  display: inline-block; background: var(--bg); color: var(--navy);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 13px; margin: 0 6px 6px 0; font-size: 0.88rem; text-decoration: none;
}
.post-tags a:hover { background: #e6f7fb; border-color: var(--cyan); text-decoration: none; }

.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: #eefbfd; border: 1px solid #c9eef7; border-radius: var(--radius);
  padding: 24px 26px; margin-bottom: 32px;
}
.author-avatar {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--cyan);
}
.author-box h3 { margin-bottom: 0.25em; font-size: 1.15rem; }
.author-box p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.post-navigation {
  display: flex; justify-content: space-between; gap: 16px; margin-bottom: 40px;
}
.post-navigation a {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 18px; color: var(--navy); font-weight: 600; font-size: 0.97rem;
  box-shadow: var(--shadow); text-decoration: none; max-width: 48%;
  transition: border-color 0.2s, color 0.2s;
}
.post-navigation a:hover { border-color: var(--cyan); color: var(--cyan-dark); text-decoration: none; }
.post-navigation .nav-label { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }

.related-posts { margin-bottom: 40px; }
.related-posts h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.6rem); margin-bottom: 1em; }
.related-posts h2::after {
  content: ""; display: block; width: 48px; height: 4px;
  background: var(--cyan); border-radius: 2px; margin-top: 10px;
}

/* Comments */
.comments-area {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px 36px; margin-bottom: 40px;
}
.comments-area h2 { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--border-light); padding: 18px 0; }
.comment-list .comment:last-child { border-bottom: 0; }
.comment-author { font-weight: 700; color: var(--navy); }
.comment-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.comment-form label { margin-top: 12px; }
.comment-form textarea { min-height: 140px; }
.comment-form .form-submit { margin-top: 16px; }
.comment-form input[type="submit"] {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 12px 26px; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.comment-form input[type="submit"]:hover { background: var(--navy-dark); transform: translateY(-1px); }

/* ============================================================
   8. PAGES
   ============================================================ */
.page-article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
  margin: 40px 0;
}
.page-article .entry-title { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.1rem); }
.page-article .entry-content { font-size: 1.05rem; }
.page-article .featured-image { margin: 0 0 28px; border-radius: var(--radius-sm); overflow: hidden; }
.page-article .featured-image img { width: 100%; display: block; }

/* ============================================================
   9. CTA BAND
   ============================================================ */
.cta-band {
  background: linear-gradient(135deg, var(--cyan-dark), var(--cyan));
  border-radius: var(--radius);
  padding: 44px 40px;
  text-align: center;
  color: #fff;
  margin-bottom: 56px;
}
.cta-band h2 { color: #fff; margin-bottom: 0.35em; }
.cta-band p { color: #e0f7fc; max-width: 560px; margin: 0 auto 1.4em; }
.cta-band .btn-navy { background: var(--navy); }
.cta-band .btn-navy:hover { background: var(--navy-dark); }

/* ============================================================
   10. PAGINATION
   ============================================================ */
.pagination { margin: 40px 0 8px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  color: var(--navy); font-weight: 600; text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--cyan); color: var(--cyan-dark); text-decoration: none; }
.pagination .current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination .dots { border: none; background: transparent; }

/* ============================================================
   11. FOOTER
   ============================================================ */
.site-footer { background: var(--navy-dark); color: #cbd9e6; margin-top: 40px; }
.footer-widgets { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 52px 0 40px; }
.footer-widgets h3 {
  color: #fff; font-size: 1.05rem; margin-bottom: 1em;
  padding-bottom: 0.5em; border-bottom: 2px solid var(--cyan);
  display: inline-block;
}
.footer-widgets p { font-size: 0.95rem; }
.footer-widgets a { color: #cbd9e6; }
.footer-widgets a:hover { color: var(--cyan); text-decoration: none; }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets ul li { margin-bottom: 9px; }
.footer-widgets ul li a { display: inline-block; }
.footer-widgets ul li a::before { content: "›"; color: var(--cyan); margin-right: 8px; font-weight: 700; }
.footer-brand .logo-text { color: #fff; font-size: 1.35rem; }
.footer-brand .logo-tagline { color: #9fb3c8; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0; font-size: 0.9rem; color: #9fb3c8;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footer-bottom a { color: #cbd9e6; }

/* ============================================================
   12. WIDGETS / SIDEBAR
   ============================================================ */
.widget-area { margin: 40px 0; }
.widget {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow);
}
.widget h2, .widget .widget-title { font-size: 1.1rem; margin-bottom: 0.8em; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--border-light); margin: 0; }
.widget ul li:last-child { border-bottom: 0; }
.widget a { color: var(--navy); }
.widget a:hover { color: var(--cyan-dark); }

/* ============================================================
   12b. WPFORMS (Contact page form — theme styling only,
   the form itself is untouched)
   ============================================================ */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container select,
.wpforms-container textarea { width: 100% !important; max-width: 100%; }
.wpforms-container .wpforms-submit,
.wpforms-container button[type="submit"] {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 12px 28px; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.wpforms-container .wpforms-submit:hover,
.wpforms-container button[type="submit"]:hover { background: var(--navy-dark); transform: translateY(-1px); }

/* ============================================================
   13. RESPONSIVE
   Breakpoints: 1020px (small laptop), 900px (mobile menu),
   768px (tablet), 720px (large phone), 480px (phone),
   360px (small phone).
   ============================================================ */
@media (max-width: 1020px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .main-navigation {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 48, 87, 0.12);
    padding: 10px 20px 16px;
    margin-left: 0;
  }
  .main-navigation.toggled { display: block; }
  .main-navigation ul { flex-direction: column; align-items: stretch; gap: 2px; }
  /* 44px minimum tap targets in the mobile menu. */
  .main-navigation a { display: flex; align-items: center; min-height: 44px; padding: 11px 12px; border-radius: 8px; }
  .main-navigation .sub-menu { display: block; position: static; box-shadow: none; border: none; padding: 0 0 0 16px; }
  .header-inner { position: relative; }
  .header-actions { margin-left: auto; }
  .hero { padding: 48px 0 56px; }
}

@media (max-width: 768px) {
  .section { padding: 44px 0; }
  .page-header { padding: 38px 0 42px; }
  .single-article, .page-article { padding: 32px 28px; }
  .comments-area { padding: 28px; }
  .cta-band { padding: 36px 28px; }
  .hero::after { width: 240px; height: 240px; border-width: 40px; right: -60px; top: -60px; }
  .hero p.lead { font-size: 1.08rem; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .post-grid, .post-grid.two-col, .cat-grid { grid-template-columns: 1fr; }
  .single-article, .page-article, .comments-area { padding: 26px 20px; }
  .footer-widgets { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
  .footer-widgets ul li a { padding: 6px 0; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
  .post-navigation { flex-direction: column; }
  .post-navigation a { max-width: 100%; }
  .hero .search-form { flex-direction: column; }
  .hero .search-submit { width: 100%; }
  .header-search .search-form { flex-direction: column; }
  .header-search .search-submit { width: 100%; }
  .no-results .search-form { flex-direction: column; }
  .no-results .search-submit { width: 100%; }
  .no-results { padding: 36px 22px; }
  .author-box { flex-direction: column; }
  .logo-tagline { display: none; }
  .entry-content { font-size: 1rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 12px; min-height: 60px; }
  .logo-mark { width: 32px; height: 32px; }
  .logo-text { font-size: 1rem; white-space: normal; line-height: 1.2; }
  .hero { padding: 40px 0 46px; }
  .hero::after { display: none; }
  .hero p.lead { font-size: 1.02rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 34px 0; }
  .section-head { margin-bottom: 26px; }
  .cat-grid { gap: 16px; }
  .cat-card { padding: 22px 20px; }
  .post-grid { gap: 18px; }
  .post-card-body { padding: 16px 18px 18px; }
  .single-article, .page-article { padding: 24px 16px; }
  .comments-area { padding: 24px 16px; }
  .page-header { padding: 32px 0 36px; }
  .cta-band { padding: 30px 20px; margin-bottom: 40px; }
  .no-results { padding: 30px 18px; }
  .btn { padding: 12px 22px; }
  /* 16px minimum on form fields prevents iOS auto-zoom on focus. */
  .entry-content input, .entry-content textarea, .entry-content select,
  .wpforms-container input, .wpforms-container textarea, .wpforms-container select { font-size: 16px; }
  .post-navigation a { padding: 12px 16px; }
}

@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .logo-text { font-size: 0.95rem; }
  .icon-btn { width: 40px; height: 40px; }
  .hero { padding: 34px 0 40px; }
  .single-article, .page-article { padding: 22px 14px; }
  .cat-card { padding: 20px 16px; }
  .footer-widgets { padding: 32px 0 24px; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .post-navigation, .comments-area, .cta-band { display: none; }
  body { background: #fff; }
  .single-article, .page-article { border: none; box-shadow: none; padding: 0; }
}
