/*
 * Riofos – Custom CSS
 * Mobile-first responsive stylesheet complementing Bootstrap 5.
 * Matches Figma desktop + mobile design.
 */

/* =============================================================
   1. DESIGN TOKENS / CSS VARIABLES
============================================================= */
:root {
  --brand:           #1419a4;
  --brand-dark:      #08093e;
  --brand-mid:       #2e3192;
  --brand-light-bg:  #f0f1fc;
  --text-muted:      #767676;
  --shadow-card:     0 2px 12px rgba(0,0,0,0.08);
  --shadow-nav:      0 0 11px rgba(0,0,0,0.18);
  --radius-pill:     87px;
  --radius-card:     16px;
  --radius-badge:    14px;
  --font-main:       'Poppins', sans-serif;
  --transition:      0.2s ease;
}

/* =============================================================
   2. BASE RESET
============================================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  color: #212121;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* =============================================================
   3. TYPOGRAPHY UTILITIES
============================================================= */
.text-brand          { color: var(--brand) !important; }
.bg-brand-light      { background-color: var(--brand-light-bg) !important; }
.min-w-0             { min-width: 0; }

.text-brand-gradient {
  background: linear-gradient(90deg, var(--brand) 17%, #2456a9 51%, #1e6db7 79%, #1c75bc 96%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand);
}

.xsmall { font-size: 0.72rem; }

/* =============================================================
   4. BRAND BUTTON
============================================================= */
.btn-outline-brand {
  border: 1.5px solid var(--brand-mid);
  background: transparent;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.875rem;
  /* Gradient text */
  background-image: linear-gradient(90deg, var(--brand-mid) 17%, #2456a9 51%, #1e6db7 79%, #1c75bc 96%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-outline-brand:hover,
.btn-outline-brand:focus {
border: 1.5px solid var(--brand-mid);
background-image: linear-gradient(180deg, var(--brand-mid) 17%, #2456a9 51%, #1e6db7 79%, #1c75bc 96%);
}

/* =============================================================
   5. HEADER
============================================================= */
.site-header {
  z-index: 1030;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.search-bar {
  max-width: 540px;
  background: #fff;
  box-shadow: var(--shadow-nav);
}
.search-bar input { font-size: 0.875rem; }
.search-bar input::placeholder { color: var(--text-muted); font-size: 0.875rem; }

/* Nav pill bar (desktop) */
.nav-pill-bar { font-size: 0.8rem; }
.pill-link {
  color: var(--brand-mid);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 20px;
  transition: background var(--transition);
}
.pill-link:hover  { background: var(--brand-light-bg); }
.pill-link.active { background: var(--brand-light-bg); font-weight: 600; }

/* =============================================================
   6. OFFCANVAS MOBILE MENU
============================================================= */
.offcanvas-nav-link {
  display: block;
  padding: 10px 12px;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}
.offcanvas-nav-link:hover,
.offcanvas-nav-link.active { background: var(--brand-light-bg); color: var(--brand); }
.offcanvas-nav-link.active  { font-weight: 600; }

.offcanvas-nav-link-sub {
  display: block;
  padding: 8px 12px;
  color: #555;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: color var(--transition);
}
.offcanvas-nav-link-sub:hover { color: var(--brand); }

/* =============================================================
   7. HERO SECTION
============================================================= */
.site-favicon {
  width: 40px; height: 40px;
  background-color: var(--brand-light-bg);
}

.hero-title { font-size: 1rem; line-height: 1.4; }

/* Result cards (pill style) */
.result-card {
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  border: none !important;
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20,25,164,0.12);
}

/* Hero image container */
.hero-img-placeholder {
  width: 100%;
  height: 220px;
  border-radius: 1.25rem;
  overflow: hidden;
}
.hero-img-placeholder img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Decorative blur circles (desktop only) */
.hero-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.2;
  pointer-events: none;
}
.hero-circle-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
  top: 40px; left: -40px; z-index: 0;
}
.hero-circle-2 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #1c75bc 0%, transparent 70%);
  bottom: 0; right: 0; z-index: 0;
}

/* Desktop overlay stat badges */
.stat-badge {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(118,118,118,0.5);
  border-radius: var(--radius-badge);
  padding: 0.65rem 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.18);
  text-align: center;
  white-space: nowrap;
}
.stat-badge-tl { top: 14px;    left: -8px; }
.stat-badge-tr { top: 70px;    right: -8px; }
.stat-badge-bl { bottom: 110px; left: -8px; }
.stat-badge-br { bottom: 36px;  right: -8px; }

/* Mobile stat badge pills (horizontal scroll) */
.stat-badge-mobile {
  background: var(--brand-light-bg);
  border: 1px solid rgba(46,49,146,0.2);
  border-radius: 10px;
  padding: 8px 14px;
  text-align: center;
  min-width: 72px;
}
.stat-badges-scroll::-webkit-scrollbar { display: none; }

/* =============================================================
   8. REVIEWS & FORM
============================================================= */
.review-card { transition: box-shadow var(--transition); }
.review-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.input-group.border {
  border: 1.5px solid #d0d0d0 !important;
  border-radius: var(--radius-card) !important;
}
.input-group.border:focus-within {
  border-color: var(--brand-mid) !important;
  box-shadow: 0 0 0 3px rgba(46,49,146,0.08);
}
.form-control:focus { box-shadow: none; border-color: transparent; }

/* =============================================================
   9. DIVIDER (centered CTA with gradient lines)
============================================================= */
.divider-line {
  display: inline-block;
  width: 28%;
  max-width: 320px;
  height: 1px;
  background-color: #2E3192;
  vertical-align: middle;
}

/* =============================================================
   10. BLOG CARDS
============================================================= */
.blog-card {
  border: none !important;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.blog-thumb {
  width: 90px; height: 90px;
  object-fit: cover;
  border-radius: 10px;
}

/* =============================================================
   11. CTA SECTION
============================================================= */
.cta-section { background: #fff; }
.cta-heading {
  font-size: clamp(1.6rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.2;
}

/* Pagination dots */
.pager-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #d0d0d0;
}
.pager-dot.active { background: var(--brand); width: 24px; border-radius: 5px; }

/* =============================================================
   12. FOOTER
============================================================= */
.logo-text { color: #212121; }

.social-icon {
  font-size: 1.15rem;
  color: #555;
  text-decoration: none;
  transition: color var(--transition);
}
.social-icon:hover { color: var(--brand); }

.footer-link { text-decoration: none; transition: color var(--transition); }
.footer-link:hover { color: var(--brand) !important; }

/* =============================================================
   13. MOBILE BOTTOM CTA BAR
============================================================= */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 1040;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  height: 60px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}

.mobile-cta-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #555;
  font-size: 0.6rem;
  font-weight: 500;
  font-family: var(--font-main);
  transition: color var(--transition), background var(--transition);
  padding: 4px 2px;
}
.mobile-cta-item i { font-size: 1.1rem; }
.mobile-cta-item:hover { color: var(--brand); background: var(--brand-light-bg); }

.mobile-cta-primary {
  color: var(--brand);
  background: var(--brand-light-bg);
  border-left: 1px solid rgba(46,49,146,0.1);
  border-right: 1px solid rgba(46,49,146,0.1);
  font-weight: 600;
}
.mobile-cta-primary i { color: var(--brand); }

.mobile-cta-spacer { height: 60px; }

/* =============================================================
   14. RESPONSIVE — TABLET (md: 768px+)
============================================================= */
@media (min-width: 768px) {
  .hero-img-placeholder { height: 300px; }
  .hero-title { font-size: 1.1rem; }
  .section-title { font-size: 1.3rem; }
  .blog-thumb { width: 110px; height: 110px; }
}

/* =============================================================
   15. RESPONSIVE — DESKTOP (lg: 992px+)
============================================================= */
@media (min-width: 992px) {
  .hero-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .hero-img-placeholder { height: 430px; }
  .hero-image-wrap { position: relative; }
  .hero-title { font-size: 1.1rem; }
  .section-title { font-size: 1.35rem; }
  .blog-thumb { width: 130px; height: 130px; border-radius: 1rem; }
  .result-card { padding: 0.75rem 1.5rem; }
  .search-bar { max-width: 600px; }
}

/* =============================================================
   16. RESPONSIVE — LARGE DESKTOP (xl: 1200px+)
============================================================= */
@media (min-width: 1200px) {
  .hero-img-placeholder { height: 460px; }
  .stat-badge-tl { top: 18px;    left: -12px; }
  .stat-badge-tr { top: 80px;    right: -12px; }
  .stat-badge-bl { bottom: 130px; left: -12px; }
  .stat-badge-br { bottom: 44px;  right: -12px; }
}

/* =============================================================
   17. ACCESSIBILITY — focus visible
============================================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =============================================================
   18. ELEMENTOR — zero out default widget container padding
============================================================= */
.elementor-widget-riofos_hero .elementor-widget-container,
.elementor-widget-riofos_reviews_connect .elementor-widget-container,
.elementor-widget-riofos_about .elementor-widget-container,
.elementor-widget-riofos_industries .elementor-widget-container,
.elementor-widget-riofos_blog_stories .elementor-widget-container,
.elementor-widget-riofos_related_search .elementor-widget-container,
.elementor-widget-riofos_cta_section .elementor-widget-container,
.elementor-widget-riofos_nav_header .elementor-widget-container,
.elementor-widget-riofos_footer .elementor-widget-container,
.elementor-widget-riofos_mobile_cta_bar .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}
.elementor-widget-container { font-family: var(--font-main); }

/* glass util (desktop stat badges) */
.glass-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* =============================================================
   19. CTA + FOOTER COMBINED WIDGET
============================================================= */

/* Divider line in CTA */
.cta-divider-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--brand-mid) 30%, var(--brand-mid) 70%, transparent 100%);
  opacity: 0.35;
}

/* Rioooofos logo in CTA */
.cta-rioooofos-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.cta-rioooofos-logo {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}
.cta-rioooofos-text-fallback {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
  font-family: var(--font-main);
}

/* Page links row */
.cta-page-links {
  gap: 1rem;
}
.cta-page-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition);
  font-family: var(--font-main);
}
.cta-page-link:hover {
  color: var(--brand);
}

/* Footer logo image */
.footer-logo-img {
  max-height: 36px;
  width: auto;
  object-fit: contain;
}

/* Zero out Elementor padding for new combined widget */
.elementor-widget-riofos_cta_footer .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}

/* =============================================================
   20. HEADER v3 — Nav header styles
============================================================= */

/* Sticky wrapper div (replaces <header> tag) */
.rew-header {
  z-index: 1030;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

/* Logo */
.rew-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Page title bar (not a form, just a styled div) */
.rew-title-bar {
  max-width: 600px;
  background: #fff;
  box-shadow: 0 0 11px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.12) !important;
  cursor: default;
  user-select: none;
}
.rew-title-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 440px;
}
.rew-title-icon {
  cursor: default;
  opacity: 0.5;
}

/* Services toggle button */
.rew-services-toggle {
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition);
  width: 36px;
  height: 36px;
}
.rew-services-toggle:hover,
.rew-services-toggle[aria-expanded="true"] {
  background: var(--brand-light-bg) !important;
}

/* Desktop nav links */
.rew-desktop-nav {
  font-size: 0.875rem;
}
.rew-nav-link {
  color: #212121;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  font-family: var(--font-main);
  padding: 4px 0;
  position: relative;
  transition: color var(--transition);
  white-space: nowrap;
}
.rew-nav-link:hover { color: var(--brand); }
.rew-nav-link.active {
  color: var(--brand);
  font-weight: 600;
}
.rew-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0; right: 0;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}
.rew-nav-services-btn { cursor: pointer; }
.rew-nav-services-btn:hover { color: var(--brand) !important; }

/* ── Pure CSS hover dropdowns ── */
.rew-nav-dropdown {
  position: relative;
}
/* Hide panel by default */
.rew-nav-dropdown .rew-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  z-index: 1050;
}
/* Show on hover of parent */
.rew-nav-dropdown:hover .rew-dropdown-panel {
  display: block;
}
/* Small gap bridge so mouse can travel from button to panel */
.rew-nav-dropdown .rew-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.rew-dd-item {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.rew-dd-item:hover {
  background: var(--brand-light-bg);
  color: var(--brand) !important;
}

/* ── Services Drawer — Bootstrap dropdown-menu styling ── */
.rew-services-drawer {
  width: 310px !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18) !important;
  padding: 12px 8px 16px !important;
  border: none !important;
}

/* Drawer header row */
.rew-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 8px;
}
.rew-drawer-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #202124;
  letter-spacing: 0.01em;
}

/* 3-column icon grid — Google style */
.rew-svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

/* Each service tile */
.rew-svc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 12px 4px 10px;
  border-radius: 12px;
  text-decoration: none !important;
  border: none !important;
  transition: background 0.14s;
  cursor: pointer;
}
.rew-svc-card:hover {
  background: #f1f3f4 !important;
  transform: none;
  box-shadow: none;
}
.rew-svc-icon-wrap {
  width: 52px; height: 52px;
  background: var(--brand-light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rew-svc-img {
  width: 30px; height: 30px;
  object-fit: contain;
}
.rew-svc-name {
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  color: #202124;
  word-break: break-word;
}

/* Active state on the 9-dot toggle button */
.rew-toggle-active {
  background: #e8eaed !important;
  border-radius: 50% !important;
}

/* Elementor zero-padding override */
.elementor-widget-riofos_nav_header .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Mobile scrollable nav bar ── */
.rew-mobile-nav {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  white-space: nowrap;
  padding-bottom: 2px;
}
.rew-mobile-nav::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.rew-mobile-nav-link {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.rew-mobile-nav-link.active {
  color: var(--brand);
  border-bottom: 2px solid var(--brand);
  border-radius: 0;
}
.rew-mobile-nav-link:hover { color: var(--brand); }

/* Hide desktop nav on mobile */
.rew-desktop-nav { display: none !important; }
@media (min-width: 992px) {
  .rew-desktop-nav { display: flex !important; }
  .rew-mobile-nav  { display: none !important; }
}

/* ── CF7 Wrapper – Reviews & Connect Section ── */
.riofos-cf7-wrapper .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.riofos-cf7-wrapper .wpcf7-form p {
  margin-bottom: 0;
}
.riofos-cf7-wrapper .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}
.riofos-cf7-wrapper input[type="text"],
.riofos-cf7-wrapper input[type="email"],
.riofos-cf7-wrapper input[type="tel"],
.riofos-cf7-wrapper textarea,
.riofos-cf7-wrapper select {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  outline: none;
  transition: border-color 0.2s;
}
.riofos-cf7-wrapper input[type="text"]:focus,
.riofos-cf7-wrapper input[type="email"]:focus,
.riofos-cf7-wrapper input[type="tel"]:focus,
.riofos-cf7-wrapper textarea:focus {
  border-color: #2e3192;
  box-shadow: 0 0 0 3px rgba(46,49,146,0.1);
}
.riofos-cf7-wrapper textarea {
  min-height: 110px;
  resize: vertical;
}
.riofos-cf7-wrapper input[type="submit"],
.riofos-cf7-wrapper .wpcf7-submit {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: transparent;
  color: #2e3192;
  border: 2px solid #2e3192;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
}
.riofos-cf7-wrapper input[type="submit"]:hover,
.riofos-cf7-wrapper .wpcf7-submit:hover {
  background: #2e3192;
  color: #fff;
}
.riofos-cf7-wrapper .wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}
.riofos-cf7-wrapper .wpcf7-response-output {
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
