/* ==========================================================
   Udaipur Software Developer — theme polish layer
   Sits on top of GeneratePress + GenerateBlocks (theme unchanged).
   Brand: logo navy #2F3B69 · accent red #FF3131 · plum #58045C (hero gradient)
   ========================================================== */
:root {
  --usd-navy: #2f3b69;
  --usd-navy-deep: #1d2547;
  --usd-ink: #1c2238;
  --usd-text: #3d4459;
  --usd-muted: #6b7189;
  --usd-line: #e3e5ee;
  --usd-bg: #f6f7fb;
  --usd-red: #ff3131;
  --usd-red-deep: #e0242a;
  --usd-plum: #58045c;
  --usd-radius-s: 6px;
  --usd-radius-m: 12px;
  --usd-radius-l: 18px;
  --usd-shadow-1: 0 1px 2px rgba(29, 37, 71, .06), 0 2px 8px rgba(29, 37, 71, .05);
  --usd-shadow-2: 0 6px 24px rgba(29, 37, 71, .10);
  --usd-shadow-3: 0 14px 40px rgba(29, 37, 71, .16);
  --usd-ease: cubic-bezier(.22, .61, .36, 1);
  --usd-font-head: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --usd-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --accent: var(--usd-navy);
}

/* ---------- Base typography ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--usd-font-body);
  color: var(--usd-text);
  background: var(--usd-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .entry-title, .gb-headline, .main-title {
  font-family: var(--usd-font-head);
  color: var(--usd-ink);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1, .entry-title { font-weight: 600; line-height: 1.2; }
h2 { font-weight: 600; line-height: 1.25; }
h3, h4 { font-weight: 600; line-height: 1.3; }
p { text-wrap: pretty; }
a { transition: color .2s var(--usd-ease); }
.single .entry-content a, .page .entry-content .gb-container-bf007dde a { color: var(--usd-navy); }
.single .entry-content a:hover { color: var(--usd-red-deep); }
::selection { background: var(--usd-navy); color: #fff; }
:focus-visible { outline: 2px solid var(--usd-red); outline-offset: 3px; border-radius: 4px; }
img { border-radius: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--usd-ease), border-color .25s var(--usd-ease);
}
.usd-scrolled .site-header { box-shadow: 0 4px 20px rgba(29, 37, 71, .08); border-bottom-color: var(--usd-line); }
.admin-bar .site-header { top: 32px; }
.inside-header { padding-top: 14px; padding-bottom: 14px; }
.site-logo img.header-image { max-height: 64px; width: auto; transition: max-height .25s var(--usd-ease); }
.usd-scrolled .site-logo img.header-image { max-height: 52px; }
.main-navigation .main-nav ul li a {
  font-family: var(--usd-font-body); font-weight: 500; font-size: 15.5px;
  color: var(--usd-ink); position: relative;
}
.main-navigation .main-nav ul li:not(.usd-nav-cta) > a::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 12px; height: 2px;
  background: var(--usd-red); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--usd-ease);
}
.main-navigation .main-nav ul li:not(.usd-nav-cta) > a:hover::after,
.main-navigation .main-nav ul li.current-menu-item > a::after { transform: scaleX(1); }
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li > a:hover { color: var(--usd-navy); background: transparent; }
.main-navigation .main-nav ul li.usd-nav-cta { display: flex; align-items: center; margin-left: 10px; }
.main-navigation .main-nav ul li.usd-nav-cta > a {
  line-height: 1; padding: 13px 22px; border-radius: 999px;
  background: var(--usd-red); color: #fff; font-weight: 600;
  box-shadow: 0 6px 18px rgba(255, 49, 49, .28);
  transition: transform .2s var(--usd-ease), box-shadow .2s var(--usd-ease), background .2s var(--usd-ease);
}
.main-navigation .main-nav ul li.usd-nav-cta > a:hover { background: var(--usd-red-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255, 49, 49, .34); }
.menu-toggle { border-radius: var(--usd-radius-s); }

/* ---------- Buttons (GenerateBlocks + forms) ---------- */
.gb-button { transition: transform .2s var(--usd-ease), box-shadow .2s var(--usd-ease), background-color .2s var(--usd-ease), border-color .2s var(--usd-ease), color .2s; }
.gb-button:hover { transform: translateY(-2px); }
.gb-button:active { transform: translateY(0); }
.gb-button .gb-icon svg { transition: transform .2s var(--usd-ease); }
.gb-button:hover .gb-icon svg { transform: translateX(4px); }
button, input[type=submit], input[type=button] {
  font-family: var(--usd-font-body); font-weight: 600; border-radius: 999px;
  background: var(--usd-navy); color: #fff; padding: 13px 30px; border: 0; cursor: pointer;
  transition: background .2s var(--usd-ease), transform .2s var(--usd-ease), box-shadow .2s var(--usd-ease);
}
input[type=submit]:hover, button:not(.menu-toggle):hover { background: var(--usd-red); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(255, 49, 49, .25); }
.menu-toggle, .menu-toggle:hover { transform: none; box-shadow: none; }

/* ---------- Home: hero ---------- */
.home .gb-headline-text { text-wrap: balance; }

/* Service cards — lift + Learn More pinned to bottom */
.column-shadow {
  border-radius: var(--usd-radius-l) !important;
  border-color: var(--usd-line) !important;
  background: #fff;
  box-shadow: var(--usd-shadow-1);
  display: flex; flex-direction: column;
  transition: transform .3s var(--usd-ease), box-shadow .3s var(--usd-ease), border-color .3s var(--usd-ease);
}
.column-shadow:hover { transform: translateY(-6px); box-shadow: var(--usd-shadow-3); border-color: transparent !important; }
.column-shadow > .gb-container:last-child { margin-top: auto; }
.column-shadow .wp-block-image img { transition: transform .4s var(--usd-ease); }
.column-shadow:hover .wp-block-image img { transform: scale(1.06) rotate(-2deg); }
.column-shadow h4 { font-size: 20px; }

/* Recent projects cards — brand colours */
.wp-block-latest-posts.is-grid > li { border-color: var(--usd-line); border-radius: var(--usd-radius-l); box-shadow: var(--usd-shadow-1); }
.wp-block-latest-posts.is-grid > li:hover { box-shadow: var(--usd-shadow-3); transform: translateY(-6px); }
.wp-block-latest-posts.is-grid .wp-block-latest-posts__featured-image img { transition: transform .6s var(--usd-ease); }
.wp-block-latest-posts.is-grid > li:hover .wp-block-latest-posts__featured-image img { transform: scale(1.04); }
.wp-block-latest-posts.is-grid .wp-block-latest-posts__post-title { font-family: var(--usd-font-head); font-weight: 600; font-size: 16.5px; color: var(--usd-ink); }

/* Red long-copy band: links readable on dark background */
.gb-container-d47dfef4 a, .gb-container-037845de a, .gb-container-65abd9c4 a, .gb-container-8ead21bd a { color: #fff !important; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 3px; font-weight: 600; }
.gb-container-d47dfef4 a:hover, .gb-container-8ead21bd a:hover { text-decoration-color: #fff; }
/* Welcome heading: brand navy instead of brown */
.gb-headline-2ed06f39 { color: var(--usd-navy) !important; }

/* Long-copy sections: readable measure */
.entry-content p { line-height: 1.75; }

/* ---------- Content containers (separate-containers layout) ---------- */
.separate-containers .inside-article,
.separate-containers .page-header,
.separate-containers .paging-navigation {
  border-radius: var(--usd-radius-l);
  box-shadow: var(--usd-shadow-1);
}
.home.separate-containers .inside-article { border-radius: 0; box-shadow: none; }

/* ---------- Single post ---------- */
.single .inside-article { padding: 48px 56px; }
.single .featured-image, .single .post-image { margin-bottom: 28px; }
.single .featured-image img, .single .post-image img { border-radius: var(--usd-radius-m); box-shadow: var(--usd-shadow-2); }
.single .entry-title { font-size: clamp(28px, 3.4vw, 40px); }
.single .entry-meta { color: var(--usd-muted); font-size: 14px; }
.single .entry-content { font-size: 17px; color: var(--usd-text); }
.single .entry-content h2 { font-size: clamp(22px, 2.4vw, 28px); margin-top: 1.6em; }
.single .entry-content h3 { font-size: clamp(19px, 2vw, 22px); margin-top: 1.4em; }
.single .entry-content img { border-radius: var(--usd-radius-m); }
.single .entry-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.single footer.entry-meta { border-top: 1px solid var(--usd-line); padding-top: 18px; margin-top: 32px; }
.post-navigation .nav-previous, .post-navigation .nav-next { padding: 4px 0; }

/* Related posts */
.crp_related h3, .crp_related .crp_title { font-family: var(--usd-font-head); }
.crp_related.crp-thumbs-grid ul li a.crp_link { border-radius: var(--usd-radius-m) !important; overflow: hidden; box-shadow: var(--usd-shadow-1) !important; border: 1px solid var(--usd-line) !important; transition: transform .25s var(--usd-ease), box-shadow .25s var(--usd-ease); }
.crp_related.crp-thumbs-grid ul li a.crp_link:hover { transform: translateY(-4px); box-shadow: var(--usd-shadow-2) !important; }
.crp_related .crp_title { background: linear-gradient(transparent, rgba(29, 37, 71, .92)) !important; font-size: 13px !important; line-height: 1.35 !important; }

/* ---------- Archives (Portfolio / category) — 2-column card grid ---------- */
.archive .site-content .content-area, .blog .site-content .content-area { max-width: 1140px; }
.archive .site-main, .blog .site-main {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px;
}
.archive .site-main > .page-header, .archive .site-main > .paging-navigation, .archive .site-main > nav,
.blog .site-main > .paging-navigation { grid-column: 1 / -1; margin: 0 !important; }
.archive .site-main > article, .blog .site-main > article { margin: 0 !important; }
.archive .site-main > article .inside-article, .blog .site-main > article .inside-article {
  height: 100%; display: flex; flex-direction: column; padding: 0 0 22px; overflow: hidden;
  transition: transform .3s var(--usd-ease), box-shadow .3s var(--usd-ease);
}
.archive .site-main > article .inside-article:hover { transform: translateY(-5px); box-shadow: var(--usd-shadow-3); }
.archive article .entry-header { order: 2; padding: 22px 26px 0; }
.archive article .post-image { order: 1; margin: 0 !important; aspect-ratio: 789 / 560; overflow: hidden; background: #eef0f6; }
.archive article .post-image a { display: block; height: 100%; }
.archive article .post-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--usd-ease); }
.archive article .inside-article:hover .post-image img { transform: scale(1.04); }
.archive article .entry-summary { order: 3; padding: 0 26px; font-size: 15px; color: var(--usd-text); }
.archive article footer.entry-meta { order: 4; padding: 0 26px; margin-top: auto; font-size: 13px; }
.archive article .entry-title { font-size: 21px; line-height: 1.35; }
.archive article .entry-title a { color: var(--usd-ink); text-decoration: none; }
.archive article .entry-title a:hover { color: var(--usd-red-deep); }
.archive article .entry-meta { font-size: 13px; color: var(--usd-muted); }
.archive .page-header { padding: 34px 40px; }
.archive .page-header h1 { font-size: clamp(28px, 3vw, 38px); margin: 0; }
.read-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.read-more::after { content: " →"; }

/* Pagination */
.paging-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.paging-navigation .nav-links > * {
  min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--usd-line); background: #fff; text-decoration: none; color: var(--usd-ink); font-weight: 500;
}
.paging-navigation .nav-links .current { background: var(--usd-navy); border-color: var(--usd-navy); color: #fff; }
.paging-navigation .nav-links a:hover { border-color: var(--usd-red); color: var(--usd-red-deep); }

/* Blog page (GenerateBlocks query loop) */
.gb-query-loop-wrapper .gb-container { transition: transform .3s var(--usd-ease); }
.gb-query-loop-wrapper .gb-block-image { border-radius: var(--usd-radius-m); box-shadow: var(--usd-shadow-1); }
.gb-query-loop-wrapper .gb-block-image img { transition: transform .5s var(--usd-ease); }
.gb-query-loop-wrapper .gb-grid-column:hover .gb-block-image img { transform: scale(1.05); }
.gb-query-loop-wrapper .gb-headline a { color: var(--usd-ink); }
.gb-query-loop-wrapper .gb-headline a:hover { color: var(--usd-red-deep); }

/* ---------- Contact form ---------- */
.usd-contact-form input[type=text], .usd-contact-form input[type=email],
.usd-contact-form input[type=tel], .usd-contact-form textarea {
  border: 1px solid var(--usd-line); background: #fff; border-radius: var(--usd-radius-s);
  padding: 12px 14px; font-size: 15.5px; color: var(--usd-ink);
  transition: border-color .2s var(--usd-ease), box-shadow .2s var(--usd-ease);
}
.usd-contact-form input:focus, .usd-contact-form textarea:focus {
  outline: none; border-color: var(--usd-navy); box-shadow: 0 0 0 3px rgba(47, 59, 105, .14);
}
.usd-contact-form label { color: var(--usd-ink); font-size: 14.5px; }
.usd-contact-form input[type=submit] { background: var(--usd-red); padding: 14px 36px; }
.usd-contact-form input[type=submit]:hover { background: var(--usd-red-deep); }

/* ---------- Footer ---------- */
.usd-footer {
  background: var(--usd-navy-deep);
  background-image: radial-gradient(1200px 400px at 85% -10%, rgba(255, 49, 49, .16), transparent 60%),
                    radial-gradient(900px 380px at 0% 110%, rgba(88, 4, 92, .35), transparent 60%);
  color: rgba(255, 255, 255, .78); font-size: 15px;
}
.usd-footer .usd-footer-in { max-width: 1200px; margin: 0 auto; padding: 64px 40px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.usd-footer h2 { font-family: var(--usd-font-head); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 18px; }
.usd-footer ul { list-style: none; margin: 0; padding: 0; }
.usd-footer li { margin: 0 0 10px; line-height: 1.45; }
.usd-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.usd-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.usd-footer .usd-f-logo { display: inline-block; background: #fff; border-radius: var(--usd-radius-m); padding: 10px 14px; margin-bottom: 18px; }
.usd-footer .usd-f-logo img { height: 50px; width: auto; display: block; }
.usd-footer p { margin: 0 0 14px; line-height: 1.65; }
.usd-footer .usd-f-contact li { display: flex; gap: 10px; align-items: flex-start; }
.usd-footer .usd-f-contact svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; fill: var(--usd-red); }
.usd-footer .usd-f-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 11px 20px; border-radius: 999px; background: #25d366; color: #fff !important; font-weight: 600; text-decoration: none !important; transition: transform .2s var(--usd-ease), box-shadow .2s; }
.usd-footer .usd-f-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 211, 102, .3); }
.usd-footer .usd-f-cta svg { width: 18px; height: 18px; fill: #fff; }
.site-footer .site-info { background: #151b36; color: rgba(255, 255, 255, .6); font-size: 13.5px; }
.site-footer .site-info a { color: rgba(255, 255, 255, .8); }
.site-footer .site-info a:hover { color: #fff; }
.site-footer .inside-site-info { padding-top: 18px; padding-bottom: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }

/* ---------- Back to top ---------- */
.usd-top {
  position: fixed; left: 22px; bottom: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  background: var(--usd-navy); color: #fff; display: grid; place-items: center; padding: 0;
  box-shadow: var(--usd-shadow-2); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s var(--usd-ease), transform .25s var(--usd-ease), visibility .25s, background .2s;
}
.usd-top.is-on { opacity: 1; visibility: visible; transform: none; }
.usd-top:hover { background: var(--usd-red); transform: translateY(-2px); }
.usd-top svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .usd-footer .usd-footer-in { grid-template-columns: 1fr 1fr; }
  .single .inside-article { padding: 36px 32px; }
}
@media (max-width: 768px) {
  .site-logo img.header-image, .usd-scrolled .site-logo img.header-image { max-height: 46px; }
  .inside-header { padding-top: 10px; padding-bottom: 10px; }
  .main-navigation .main-nav ul li:not(.usd-nav-cta) > a::after { display: none; }
  .main-navigation .main-nav ul li.usd-nav-cta { margin: 10px 20px 16px; }
  .main-navigation .main-nav ul li.usd-nav-cta > a { display: inline-block; }
  .archive .site-main, .blog .site-main { grid-template-columns: 1fr; gap: 20px; }
  .archive .page-header { padding: 24px; }
  .single .inside-article { padding: 26px 20px; }
  .single .entry-content { font-size: 16.5px; }
  .usd-footer .usd-footer-in { grid-template-columns: 1fr; gap: 30px; padding: 48px 22px 30px; }
  .usd-top { left: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ---------- Contact captcha ---------- */
.usd-contact-form .cf-cap-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.usd-contact-form .cf-cap-row img { border-radius: var(--usd-radius-s); border: 1px solid var(--usd-line); background: #f1f3f9; display: block; }
.usd-contact-form .cf-cap-new { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--usd-line); color: var(--usd-navy); }
.usd-contact-form .cf-cap-new:hover { background: var(--usd-navy); color: #fff; transform: rotate(-30deg); box-shadow: none; }
.usd-contact-form .cf-cap-new svg { width: 18px; height: 18px; fill: currentColor; }
.usd-contact-form input#cf-captcha { width: 110px !important; flex: 0 0 110px; text-align: center; font-weight: 600; letter-spacing: .05em; }
