/* Constrade.us — Construction Tenders Platform */

:root {
  --navy: #1a2f4a;
  --navy-dark: #0f1c2e;
  --navy-light: #2a4a6b;
  --orange: #e67e22;
  --orange-dark: #cf6d17;
  --orange-light: #f39c12;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --success: #16a34a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-700);
  line-height: 1.6;
  background: var(--white);
}

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

a { color: var(--orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-dark); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 0.75rem;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.125rem;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-300);
}
.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--white);
}

.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.375rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.125rem;
}

.main-nav { display: flex; align-items: center; gap: 2rem; }

.main-nav a {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.main-nav a:hover,
.main-nav a.active { color: var(--orange); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  color: var(--white);
  padding: 5rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero-content h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero-content p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--orange-light);
}

.stat-item span {
  font-size: 0.875rem;
  opacity: 0.75;
}

.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-visual img { width: 100%; }

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-hero h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero p {
  font-size: 1.125rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

/* Sections */
section { padding: 5rem 0; }
section.bg-gray { background: var(--gray-50); }
section.bg-navy { background: var(--navy); color: var(--white); }
section.bg-navy h2, section.bg-navy h3 { color: var(--white); }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(230, 126, 34, 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--gray-500); margin-bottom: 0; font-size: 0.9375rem; }

/* Audience split */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.audience-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--white);
}

.audience-card-header {
  padding: 2rem;
  background: var(--navy);
  color: var(--white);
}

.audience-card-header.clients { background: linear-gradient(135deg, var(--navy), var(--navy-light)); }
.audience-card-header.companies { background: linear-gradient(135deg, #2c3e50, var(--navy-light)); }

.audience-card-header h3 { color: var(--white); margin-bottom: 0.5rem; }
.audience-card-header p { opacity: 0.85; margin: 0; font-size: 0.9375rem; }

.audience-card-body { padding: 2rem; }

.audience-card-body ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.audience-card-body li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--gray-700);
}

.audience-card-body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

/* Portal showcase */
.portal-showcase { padding: 5rem 0; }

.portal-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.portal-tab {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  color: var(--gray-700);
}

.portal-tab.active,
.portal-tab:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.portal-preview {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  max-width: 960px;
  margin: 0 auto;
}

.portal-preview img { width: 100%; }

.portal-caption {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--gray-500);
  font-size: 0.9375rem;
}

.portal-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.portal-gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition);
}

.portal-gallery-item:hover { transform: scale(1.02); }

.portal-gallery-item figcaption {
  padding: 1rem 1.25rem;
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 auto 1.25rem;
}

.step-item h3 { margin-bottom: 0.5rem; }
.step-item p { color: var(--gray-500); font-size: 0.9375rem; margin: 0; }

/* Features list */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(230, 126, 34, 0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  font-size: 1.125rem;
}

.feature-item h4 { font-size: 1rem; margin-bottom: 0.375rem; }
.feature-item p { font-size: 0.875rem; color: var(--gray-500); margin: 0; }

/* Forms */
.form-section { padding: 4rem 0 5rem; }

.form-wrapper {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.form-intro h2 { margin-bottom: 0.5rem; }
.form-intro p { color: var(--gray-500); margin: 0; }

.form-group { margin-bottom: 1.25rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

label .required { color: #dc2626; margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--gray-900);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

input.error, select.error, textarea.error {
  border-color: #dc2626;
}

.field-error {
  color: #dc2626;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}

.field-error.visible { display: block; }

textarea { resize: vertical; min-height: 100px; }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.checkbox-group input { width: auto; margin-top: 0.25rem; }

.checkbox-group label {
  font-weight: 400;
  font-size: 0.875rem;
  margin: 0;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 1rem;
  text-align: center;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.visible { display: block; }
.form-success .success-icon {
  width: 64px;
  height: 64px;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  color: var(--success);
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p {
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
}

.cta-banner .btn-primary {
  background: var(--white);
  color: var(--orange);
  border-color: var(--white);
}
.cta-banner .btn-primary:hover {
  background: var(--gray-100);
  color: var(--orange-dark);
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .logo { color: var(--white); margin-bottom: 1rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; }

.footer-col h4 {
  color: var(--white);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  text-decoration: none;
}
.footer-col a:hover { color: var(--orange-light); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { color: var(--gray-700); }

/* Responsive */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 600px; margin: 0 auto; }
  .audience-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .portal-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .main-nav a {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .nav-actions .btn { width: 100%; }

  .hero { padding: 3rem 0 4rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
}

/* Portal access page */
.portal-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.portal-type-btn {
  padding: 1rem 1.25rem;
  border: 2px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gray-700);
  text-align: left;
  transition: all var(--transition);
}

.portal-type-btn small {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.portal-type-btn:hover {
  border-color: var(--orange);
}

.portal-type-btn.active {
  border-color: var(--navy);
  background: rgba(26, 47, 74, 0.04);
  color: var(--navy);
}

.portal-panel { display: none; }
.portal-panel.active { display: block; }

@media (max-width: 600px) {
  .portal-type-switch { grid-template-columns: 1fr; }
}

/* In-button reCAPTCHA host — stays 304x74 in layout as a slot */
.btn.rc-captcha-host,
a.rc-captcha-host {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 304px !important;
  min-width: 304px !important;
  max-width: 100%;
  height: 74px !important;
  min-height: 74px !important;
  padding: 0 !important;
  overflow: hidden;
  vertical-align: middle;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: transparent !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  z-index: 40;
  pointer-events: none;
}

/* Floating shell sits over the button; grows only for the instruction */
.rc-captcha-shell {
  position: fixed;
  z-index: 2147483000;
  overflow: hidden;
  background: transparent;
  pointer-events: auto;
}

.rc-captcha-shell.is-modal {
  overflow: visible;
}

.rc-captcha-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

.rc-captcha-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2147482990;
}
