/* =========================================
   Tvarka Greitai — Custom Theme Stylesheet
   Loads AFTER Bootstrap 5.3 — overrides only
   ========================================= */

/* --- CSS Custom Properties (Brand Tokens) --- */
:root {
  --bs-primary: #1B8A5A;
  --bs-primary-rgb: 27, 138, 90;
  --bs-secondary: #1A2332;
  --bs-secondary-rgb: 26, 35, 50;
  --bs-success: #28A745;
  --bs-warning: #FFC107;
  --bs-danger: #DC3545;
  --bs-info: #17A2B8;
  --bs-light: #F5F7FA;
  --bs-dark: #1A2332;
  --bs-body-color: #2D3748;
  --bs-body-bg: #FFFFFF;
  --bs-border-color: #D1D5DB;
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
  --bs-link-color: #1B8A5A;
  --bs-link-color-rgb: 27, 138, 90;
  --bs-link-hover-color: #15704A;
  --bs-link-hover-color-rgb: 21, 112, 74;

  --tg-accent: #E8611A;
  --tg-accent-rgb: 232, 97, 26;
  --tg-accent-hover: #C7510F;
  --tg-primary-hover: #15704A;
  --tg-primary-light: #E8F5EE;
  --tg-accent-light: #FFF0E8;
  --tg-section-alt-bg: #F5F7FA;
  --tg-hero-bg: #1A2332;
  --tg-hero-text: #FFFFFF;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #1A2332;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: #2D3748;
  line-height: 1.6;
}

/* --- Links --- */
a {
  color: var(--bs-primary);
  transition: color 0.15s ease;
}

a:hover {
  color: var(--tg-primary-hover);
}

/* --- Section Spacing --- */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--tg-section-alt-bg);
}

@media (max-width: 767.98px) {
  .section {
    padding: 48px 0;
  }
}

/* --- Top Bar --- */
.top-bar {
  background-color: #1A2332;
}

.top-bar a:hover {
  color: #fff !important;
  opacity: 0.9;
}

/* --- Navbar --- */
.navbar {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* --- Sticky Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* Prevent anchor links being hidden under sticky header */
html {
  scroll-padding-top: 88px;
}

@media (min-width: 992px) {
  html {
    scroll-padding-top: 120px;
  }
}

.navbar .nav-link {
  color: #2D3748;
  transition: color 0.15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--bs-primary);
}

.navbar .nav-link.active {
  color: var(--bs-primary);
}

/* --- Bootstrap .btn-primary Override (Component-Level) --- */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #1B8A5A;
  --bs-btn-border-color: #1B8A5A;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #15704A;
  --bs-btn-hover-border-color: #15704A;
  --bs-btn-focus-shadow-rgb: 27, 138, 90;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #126340;
  --bs-btn-active-border-color: #126340;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #1B8A5A;
  --bs-btn-disabled-border-color: #1B8A5A;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 138, 90, 0.3);
}

/* --- Bootstrap .btn-outline-primary Override --- */
.btn-outline-primary {
  --bs-btn-color: #1B8A5A;
  --bs-btn-border-color: #1B8A5A;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1B8A5A;
  --bs-btn-hover-border-color: #1B8A5A;
  --bs-btn-focus-shadow-rgb: 27, 138, 90;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #15704A;
  --bs-btn-active-border-color: #15704A;
  font-weight: 600;
  border-radius: 8px;
}

/* --- Accent Button (CTA) --- */
.btn-accent {
  display: inline-block;
  background-color: var(--tg-accent);
  border: 1px solid var(--tg-accent);
  color: #fff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1.05rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-accent:hover,
.btn-accent:focus {
  background-color: var(--tg-accent-hover);
  border-color: var(--tg-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 97, 26, 0.3);
  text-decoration: none;
}

.btn-accent:active,
.btn-accent.active {
  background-color: #B0430A;
  border-color: #B0430A;
  color: #fff;
  transform: translateY(0);
  box-shadow: none;
}

.btn-accent:visited {
  color: #fff;
}

/* --- Phone CTA Button --- */
.btn-phone {
  background-color: var(--tg-accent);
  border-color: var(--tg-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 32px;
  border-radius: 8px;
}

.btn-phone:hover {
  background-color: var(--tg-accent-hover);
  border-color: var(--tg-accent-hover);
  color: #fff;
}

/* --- Bootstrap .btn-dark Override --- */
.btn-dark {
  --bs-btn-bg: #1A2332;
  --bs-btn-border-color: #1A2332;
  --bs-btn-hover-bg: #111827;
  --bs-btn-hover-border-color: #111827;
}

/* --- Bootstrap .btn-outline-light full white hover --- */
.btn-outline-light:hover {
  color: #1A2332;
}

/* --- Service Cards --- */
.service-card {
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--tg-primary-light);
  border-radius: 12px;
}

.card-icon i {
  color: var(--bs-primary);
}

/* --- Hero Section (with image) --- */
.hero-section {
  background-color: var(--tg-section-alt-bg);
  padding: 60px 0;
}

.hero-section .hero-badge {
  display: inline-block;
  background-color: var(--tg-primary-light);
  color: var(--bs-primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Hero with no image - full width text */
.hero-section .col-lg-6:last-child:empty,
.hero-section .col-lg-6:last-child:not(:has(img)) {
  display: none;
}

.hero-section .col-lg-6:first-child:has(+ .col-lg-6:not(:has(img))),
.hero-section .col-lg-6:first-child:has(+ .col-lg-6:empty) {
  flex: 0 0 100%;
  max-width: 100%;
  text-align: center;
}

/* Fallback for browsers without :has() */
.hero-no-image .col-lg-6:last-child {
  display: none !important;
}

.hero-no-image .col-lg-6:first-child {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  text-align: center;
}

.hero-no-image .d-flex {
  justify-content: center;
}

/* --- Hero Simple (centered text) --- */
.hero-simple {
  background-color: var(--tg-section-alt-bg);
  padding: 60px 0;
  text-align: center;
}

/* --- Section Image --- */
.section-image {
  border-radius: 12px;
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --- Dark Section (Navy BG) Heading & Text Overrides --- */
.dark-section,
[style*="background-color: #1A2332"],
[style*="background-color:#1A2332"] {
  color: rgba(255, 255, 255, 0.7);
}

.dark-section h1, .dark-section h2,
.dark-section h3, .dark-section h4,
.dark-section h5, .dark-section h6 {
  color: #fff;
}

.dark-section a:not(.btn) {
  color: rgba(255, 255, 255, 0.7);
}

.dark-section a:not(.btn):hover {
  color: #fff;
}

/* --- CTA Banner --- */
.cta-banner {
  background-color: var(--bs-primary);
  color: rgba(255, 255, 255, 0.85);
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Footer --- */
.footer-section {
  background-color: #1A2332;
  padding: 60px 0 30px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-section h5,
.footer-section h6 {
  color: #fff;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-section a.footer-link {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.15s ease;
}

.footer-section a.footer-link:hover,
.footer-section a:hover {
  color: #fff;
}

/* --- Sticky Mobile CTA --- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  display: flex;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  padding: 8px;
  gap: 8px;
}

.sticky-cta .btn {
  flex: 1;
  font-weight: 600;
  padding: 12px;
  border-radius: 8px;
}

@media (min-width: 992px) {
  .sticky-cta {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: 72px;
  }
}

/* --- Process Steps --- */
.process-step-number {
  width: 56px;
  height: 56px;
  background-color: var(--bs-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 16px;
}

/* --- Accordion FAQ --- */
.accordion-item {
  border-radius: 8px !important;
  overflow: hidden;
}

.accordion-button {
  font-weight: 500;
  color: #2D3748;
}

.accordion-button:not(.collapsed) {
  background-color: var(--tg-primary-light);
  color: var(--bs-primary);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(27, 138, 90, 0.25);
}

.accordion-button::after {
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231B8A5A'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231B8A5A'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* --- Pricing Tables --- */
.table thead {
  background-color: #1A2332;
}

.table thead th {
  color: #fff;
  font-weight: 600;
  border-bottom: none;
}

.price-value {
  color: var(--bs-primary);
  font-weight: 700;
}

/* --- Testimonials --- */
.testimonial-card {
  border-radius: 12px;
}

.testimonial-card blockquote {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}

/* --- Breadcrumbs --- */
.breadcrumb-section {
  background-color: var(--tg-section-alt-bg);
  padding: 12px 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.breadcrumb-section .breadcrumb-item a {
  color: var(--bs-primary);
  text-decoration: none;
}

.breadcrumb-section .breadcrumb-item a:hover {
  color: var(--tg-primary-hover);
  text-decoration: underline;
}

/* --- Mega Dropdown Menu --- */
.dropdown-menu-mega {
  border-radius: 12px;
  border: none;
  min-width: 480px;
}

.dropdown-menu-mega .dropdown-header {
  padding-left: 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-menu-mega .dropdown-item {
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.925rem;
  color: #2D3748;
}

.dropdown-menu-mega .dropdown-item:hover {
  background-color: var(--tg-primary-light);
  color: var(--bs-primary);
}

/* --- Contact Form (Bootstrap native) --- */
.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(27, 138, 90, 0.25);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  color: var(--bs-primary);
}

/* --- Grav Form Plugin → Bootstrap Styling --- */
.form-wrapper form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-wrapper .form-field {
  min-width: 0;
}

.form-wrapper .form-field:has(textarea) {
  grid-column: 1 / -1;
}

.form-wrapper .buttons {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

.form-wrapper form > input[type="hidden"] {
  display: none !important;
}

@media (max-width: 767.98px) {
  .form-wrapper form {
    grid-template-columns: 1fr;
  }
}

.form-wrapper .form-field .form-label {
  margin-bottom: 0.375rem;
}

.form-wrapper .form-field .form-label label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--bs-body-color);
}

.form-wrapper .form-field .form-label label .required {
  color: var(--tg-accent);
  margin-left: 2px;
}

.form-wrapper .form-field input[type="text"],
.form-wrapper .form-field input[type="email"],
.form-wrapper .form-field input[type="tel"],
.form-wrapper .form-field input[type="number"],
.form-wrapper .form-field input[type="url"],
.form-wrapper .form-field input[type="password"],
.form-wrapper .form-field textarea,
.form-wrapper .form-field select {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-wrapper .form-field input:focus,
.form-wrapper .form-field textarea:focus,
.form-wrapper .form-field select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(27, 138, 90, 0.25);
  outline: 0;
}

.form-wrapper .form-field input::placeholder,
.form-wrapper .form-field textarea::placeholder {
  color: #9CA3AF;
}

.form-wrapper .form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-wrapper .form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.25rem;
}

.form-wrapper .form-field .form-data {
  width: 100%;
}

.form-wrapper .form-field .form-input-wrapper,
.form-wrapper .form-field .form-textarea-wrapper,
.form-wrapper .form-field .form-select-wrapper {
  width: 100%;
}

/* --- Grav Form Messages (notices) --- */
.form-wrapper .notices {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.925rem;
}

.form-wrapper .notices p {
  margin: 0;
}

.form-wrapper .notices.green,
.form-wrapper .notices.success {
  background-color: var(--tg-primary-light);
  color: var(--bs-primary);
  border: 1px solid rgba(27, 138, 90, 0.2);
}

.form-wrapper .notices.red,
.form-wrapper .notices.error {
  background-color: #FEF2F2;
  color: #DC3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.form-wrapper .notices.yellow,
.form-wrapper .notices.warning {
  background-color: #FFFBEB;
  color: #92400E;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* --- Thank You Page --- */
.thankyou-icon {
  font-size: 4rem;
  color: var(--bs-primary);
}

/* --- Notes/Alerts --- */
.notes-section .bi {
  color: var(--tg-accent);
}

/* --- Animations (fade-in-up on scroll) --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Staggered Animation Delays --- */
.fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.fade-in-up:nth-child(4) { transition-delay: 0.3s; }
.fade-in-up:nth-child(5) { transition-delay: 0.15s; }
.fade-in-up:nth-child(6) { transition-delay: 0.25s; }

/* --- Utility: Accent Text --- */
.text-accent {
  color: var(--tg-accent) !important;
}

/* --- Utility: Primary Light BG --- */
.bg-primary-light {
  background-color: var(--tg-primary-light) !important;
}

/* --- Border Radius Consistency --- */
.card {
  border-radius: 12px;
}

.btn {
  border-radius: 8px;
}

/* --- Image Styling for Content Sections --- */
.img-rounded {
  border-radius: 12px;
}

.section-image-shadow {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --- Bootstrap Badge/Pill Override for Accent --- */
.badge.bg-accent {
  background-color: var(--tg-accent) !important;
  color: #fff;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 40px 0;
  }

  .hero-section h1,
  .hero-simple h1 {
    font-size: 2rem;
  }

  .hero-section .lead,
  .hero-simple .lead {
    font-size: 1rem;
  }

  .dropdown-menu-mega {
    min-width: auto;
  }
}

@media (max-width: 575.98px) {
  .hero-section h1,
  .hero-simple h1 {
    font-size: 1.75rem;
  }

  .btn-accent {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .service-card .card-body {
    padding: 1rem !important;
  }

  .section {
    padding: 36px 0;
  }
}

/* --- Offcanvas / Mobile Nav --- */
@media (max-width: 991.98px) {
  .navbar .offcanvas {
    --bs-offcanvas-width: 320px;
  }

  .navbar .offcanvas .accordion-button {
    background-color: transparent;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
    font-size: 1rem;
  }

  .navbar .offcanvas .accordion-button:not(.collapsed) {
    background-color: transparent;
    color: var(--bs-primary);
  }

  .navbar .offcanvas .accordion-body {
    padding-left: 0;
    padding-right: 0;
  }

  .navbar .offcanvas .navbar-nav .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-size: 1rem;
  }
}

/* --- Flash Notifications (Toast) --- */
#flash-notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 440px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.flash-toast {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.flash-toast.flash-visible {
  opacity: 1;
  transform: translateX(0);
}

.flash-toast.flash-hiding {
  opacity: 0;
  transform: translateX(40px);
}

.flash-error {
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid rgba(220, 53, 69, 0.25);
}

.flash-success {
  background-color: var(--tg-primary-light);
  color: #065F46;
  border: 1px solid rgba(27, 138, 90, 0.25);
}

.flash-info {
  background-color: #EFF6FF;
  color: #1E40AF;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.flash-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  margin-left: auto;
  padding: 0 0 0 12px;
  cursor: pointer;
  opacity: 0.6;
  color: inherit;
}

.flash-close:hover {
  opacity: 1;
}

/* reCAPTCHA highlight on validation failure */
.recaptcha-highlight {
  animation: recaptcha-pulse 0.6s ease-in-out 2;
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.4);
}

@keyframes recaptcha-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0.2); }
}

/* --- Print Styles --- */
@media print {
  .sticky-cta,
  .top-bar,
  .cta-banner,
  #flash-notifications {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }
}
