/*
Theme Name: Prime4AI
Theme URI: https://prime4ai.com/
Author: Prime4AI / US Tech Solutions
Author URI: https://ustechsolutions.com/
Description: Marketing theme for Prime4AI — PRIME services, the BRIGGE platform, industry solutions, a standalone Resources page and a standalone Contact page with a built-in enquiry form that stores submissions in the WordPress admin.
Version: 1.1.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prime4ai
Tags: one-column, custom-logo, custom-menu, featured-images, full-width-template, editor-style
*/

/* ==========================================================================
   Base — mirrors the original design's reset and typography
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, sans-serif;
  color: #4b5563;
  line-height: 1.6;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: #1e40af; text-decoration: none; }
a:hover { color: #111827; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

input, select, textarea, button { font: inherit; }

h1, h2, h3, h4 { text-wrap: pretty; }

:focus-visible { outline: 2px solid #3b82f6; outline-offset: 3px; }

/* Accessibility helper used by skip link */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #111827;
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.p4-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px clamp(20px, 4vw, 40px);
}

.p4-nav__brand { display: flex; align-items: center; text-decoration: none; }
.p4-nav__brand img { height: 26px; width: auto; }
.p4-nav__brand .p4-nav__title { font-size: 19px; font-weight: 700; color: #000; letter-spacing: -0.5px; }

.p4-nav__menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(16px, 2.5vw, 34px);
  list-style: none;
  margin: 0;
}

.p4-nav__menu a {
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.p4-nav__menu a:hover,
.p4-nav__menu .current-menu-item > a,
.p4-nav__menu .current_page_item > a { color: #000; }

.p4-nav__menu .p4-nav__cta > a,
.p4-nav__menu .menu-item-cta > a {
  color: #fff;
  background: #000;
  padding: 8px 16px;
  border-radius: 6px;
}

.p4-nav__menu .p4-nav__cta > a:hover,
.p4-nav__menu .menu-item-cta > a:hover { background: #1f2937; color: #fff; }

.p4-nav__toggle {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
}

@media (max-width: 782px) {
  .p4-nav__toggle { display: block; }
  .p4-nav__menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 8px;
  }
  .p4-nav__menu.is-open { display: flex; }
  .p4-nav__menu li { width: 100%; }
  .p4-nav__menu a { display: block; padding: 10px 2px; font-size: 15px; }
  .p4-nav__menu .p4-nav__cta > a,
  .p4-nav__menu .menu-item-cta > a { display: inline-block; }
}

/* ==========================================================================
   Page header used by the Resources / Contact / generic page templates
   ========================================================================== */

.p4-page-intro {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 40px) clamp(24px, 4vw, 40px);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.p4-page-intro h1 {
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 700;
  color: #000;
  letter-spacing: -1.4px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.p4-page-intro p { font-size: 17px; line-height: 1.75; }

.p4-page-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px) clamp(48px, 7vw, 80px);
  font-size: 16px;
  line-height: 1.8;
}

.p4-page-content h2 { font-size: 28px; color: #000; margin: 32px 0 12px; }
.p4-page-content h3 { font-size: 21px; color: #000; margin: 26px 0 10px; }
.p4-page-content p,
.p4-page-content ul,
.p4-page-content ol { margin-bottom: 18px; }
.p4-page-content ul,
.p4-page-content ol { padding-left: 22px; }
.p4-page-content li { margin-bottom: 8px; }
.p4-page-content img { border-radius: 8px; }
.p4-page-content blockquote {
  border-left: 3px solid #c7d2fe;
  padding-left: 18px;
  color: #374151;
  font-style: italic;
}

/* ==========================================================================
   Teaser bands shown on the front page
   ========================================================================== */

.p4-teaser {
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: clamp(56px, 7vw, 90px) clamp(20px, 4vw, 40px);
}

.p4-teaser--dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #111827 100%);
  color: #cbd5e1;
}

.p4-teaser__inner { position: relative; max-width: 1100px; margin: 0 auto; text-align: center; }

.p4-teaser h2 {
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 700;
  color: #000;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.p4-teaser--dark h2 { color: #fff; }

.p4-teaser p {
  font-size: 16px;
  line-height: 1.8;
  max-width: 620px;
  margin: 0 auto clamp(26px, 4vw, 40px);
}

.p4-teaser--dark p { color: #cbd5e1; }

.p4-teaser__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: clamp(28px, 4vw, 40px);
  text-align: left;
}

.p4-teaser__card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.p4-teaser__card:hover { border-color: #000; box-shadow: 0 18px 36px rgba(0, 0, 0, 0.07); }
.p4-teaser__card h3 { font-size: 15px; font-weight: 700; color: #000; margin-bottom: 8px; }
.p4-teaser__card p { font-size: 13px; line-height: 1.65; margin: 0; max-width: none; }

.p4-btn {
  display: inline-block;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  padding: 13px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.p4-btn:hover { background: #1f2937; border-color: #1f2937; color: #fff; }

.p4-btn--light {
  background: #fff;
  color: #000;
  border-color: #e5e7eb;
}

.p4-btn--light:hover { background: #f9fafb; color: #000; border-color: #d1d5db; }

.p4-teaser__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.p4-teaser__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  margin-top: 26px;
  font-size: 14px;
}

.p4-teaser__meta a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.p4-teaser__meta a:hover { color: #fff; border-bottom-color: #fff; }

/* ==========================================================================
   Contact form
   ========================================================================== */

.p4-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.p4-form-message { display: none; }
.p4-form-message.is-visible { display: block; }
.p4-form-message.is-success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.p4-form-message.is-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

.p4-contact-form button[type="submit"][disabled] { opacity: 0.6; cursor: progress; }

/* ==========================================================================
   Comments / generic WordPress output on inner pages
   ========================================================================== */

.p4-comments { max-width: 820px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px) 60px; }
.p4-comments h2 { font-size: 22px; color: #000; margin-bottom: 16px; }

.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: 13px; color: #6b7280; }
.alignleft { float: left; margin: 0 20px 16px 0; }
.alignright { float: right; margin: 0 0 16px 20px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.sticky, .bypostauthor { display: block; }

/* ==========================================================================
   Hover / focus / pseudo-element rules extracted from the original markup
   ========================================================================== */
.p4-s1:hover{border-color: #000; box-shadow: 0 18px 36px rgba(0,0,0,0.07)}
.p4-s2::after{content: ''; position: absolute; bottom: 0; left: 0; width: 48px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%)}
.p4-s3::before{content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%)}
.p4-s4::before{content: '—'; position: absolute; left: 0; color: #9ca3af}
.p4-s5::before{content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%)}
.p4-s6::before{content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%)}
.p4-s7::before{content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #f97316 0%, #dc2626 100%)}
.p4-s8::before{content: '✓'; position: absolute; left: 0; color: #3b82f6; font-weight: 700}
.p4-s9:hover{color: #000}
.p4-s10:hover{color: #93c5fd}
.p4-s11:hover{background: #fff; color: #000}
.p4-s12:focus{outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.14)}
.p4-s13:hover{background: #1f2937}
.p4-s14:hover{background: #f9fafb}
.p4-s15:hover{color: #fff}

/* Footer menus rendered by wp_nav_menu keep the same look */
footer ul li a { color: #9ca3af; font-size: 14px; text-decoration: none; }
footer ul li a:hover { color: #fff; }

/* ==========================================================================
   Page-builder helpers — classes used by the Elementor templates and the
   theme shortcodes. Safe to keep even if you never use a builder.
   ========================================================================== */

/* Buttons inside an HTML widget */
.p4-el-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* Numbered badge on the PRIME cards */
.p4-el-num {
  width: 46px;
  height: 46px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 19px;
  margin: 0 auto 16px;
}

/* Gradient accent rule under a section sub-heading */
.p4-el-rule { position: relative; padding-bottom: 14px; margin-bottom: 26px !important; }
.p4-el-rule::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
}

/* Gradient top bars on the capability cards */
.p4-el-bar1, .p4-el-bar2, .p4-el-bar3, .p4-el-bar4 { position: relative; overflow: hidden; }
.p4-el-bar1::before, .p4-el-bar2::before, .p4-el-bar3::before, .p4-el-bar4::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.p4-el-bar1::before { background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%); }
.p4-el-bar2::before { background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%); }
.p4-el-bar3::before { background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%); }
.p4-el-bar4::before { background: linear-gradient(90deg, #f97316 0%, #dc2626 100%); }

/* Timing pill on the deployment cards */
.p4-el-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #4338ca;
  background: #eef2ff;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

/* Integration tag clouds */
.p4-el-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.p4-el-tags span {
  font-size: 12px;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 11px;
}

/* Resource link columns */
.p4-el-links { list-style: none; display: grid; gap: 14px; margin: 0; padding: 0; }
.p4-el-links a { font-size: 14px; color: #4b5563; text-decoration: none; }
.p4-el-links a:hover { color: #000; }

/* Industry cards: the image sits flush inside the rounded card */
.p4-el-industry { overflow: hidden; }
.p4-el-industry .p4-el-shot img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
.p4-el-industry .elementor-widget-image { line-height: 0; }

/* Contact CTA meta row */
.p4-el-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  margin-top: 26px;
  font-size: 14px;
  color: #cbd5e1;
}
.p4-el-meta a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.p4-el-meta a:hover { border-bottom-color: #fff; }

/* Reach Out panel */
.p4-el-reach { display: grid; gap: 22px; }
.p4-el-reach span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 6px;
}
.p4-el-reach a, .p4-el-reach p { font-size: 16px; color: #fff; text-decoration: none; margin: 0; }
.p4-el-reach a:hover { color: #93c5fd; }

/* Keep the theme's own sections full-bleed inside Elementor pages */
.elementor-widget-shortcode .p4-contact-form { display: grid; gap: 18px; }

/* Width helpers for builder text blocks */
.p4-el-narrow { max-width: 700px; margin-left: auto !important; margin-right: auto !important; }
.p4-el-narrow-900 { max-width: 900px; margin-left: auto !important; margin-right: auto !important; }
.p4-el-narrow-620 { max-width: 620px; margin-left: auto !important; margin-right: auto !important; }
.p4-el-measure { max-width: 640px; }
