/*
Theme Name: OknaExpress
Description: Custom WordPress theme for OknaMax - windows, doors, gates and shutters company
Version: 1.0
Author: Custom Development
*/

:root {
  /* Brand accent switched to blue */
  --green-accent: #3f51b5; /* primary blue */
}

body {
  font-family: "Poppins", sans-serif;
}

/* Fix anchor link scrolling with fixed navbar */
html {
  scroll-behavior: smooth;
}

/* Add scroll margin to account for fixed navbar height */
section[id] {
  scroll-margin-top: 80px; /* Adjust based on your navbar height */
}

/* Specific adjustments for different sections */
#hero {
  scroll-margin-top: 0; /* Hero section doesn't need offset */
}

#usp,
#oferta,
#realizacje,
#opinie,
#kontakt {
  scroll-margin-top: 80px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  section[id] {
    scroll-margin-top: 70px; /* Slightly less on mobile */
  }

  #usp,
  #oferta,
  #realizacje,
  #opinie,
  #kontakt {
    scroll-margin-top: 70px;
  }
}

.bg-green-accent {
  background-color: var(--green-accent);
}
.text-green-accent {
  color: var(--green-accent);
}
.border-green-accent {
  border-color: var(--green-accent);
}
.hover\:bg-green-accent-dark:hover {
  background-color: #2f3b8f;
}

/* Gradient backgrounds */
.gradient-green {
  background: linear-gradient(135deg, #2f3b8f 0%, #3f51b5 50%, #6f84de 100%);
}

.gradient-green-dark {
  background: linear-gradient(135deg, #25307a 0%, #2f3b8f 50%, #3f51b5 100%);
}

.gradient-green-light {
  background: linear-gradient(135deg, #90a4ee 0%, #a8b9f0 50%, #c7d2ff 100%);
}

/* Unified rounded radii to match logo softness */
.rounded-lg {
  border-radius: 12px;
}
.rounded-xl {
  border-radius: 16px;
}
.rounded-2xl {
  border-radius: 20px;
}

.hero-bg {
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("https://images.unsplash.com/photo-1659962911037-bc6bd6d4e813?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxtb2Rlcm4lMjBob3VzZSUyMGxhcmdlJTIwd2luZG93c3xlbnwxfHx8fDE3NTk2MDQyMTd8MA&ixlib=rb-4.1.0&q=80&w=1080&utm_source=figma&utm_medium=referral");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll;
  }
}

.card-hover:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

.image-hover:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.star-filled {
  color: #fbbf24;
  fill: #fbbf24;
}

/* Contact Form 7 Styling */
.contact-form-wrapper {
  max-width: 100%;
}

.contact-form-wrapper label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
  color: #374151;
}

.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper select,
.contact-form-wrapper textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form-wrapper input[type="text"]:focus,
.contact-form-wrapper input[type="email"]:focus,
.contact-form-wrapper input[type="tel"]:focus,
.contact-form-wrapper select:focus,
.contact-form-wrapper textarea:focus {
  outline: none;
  border-color: #3f51b5;
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.contact-form-wrapper textarea {
  min-height: 120px;
  resize: vertical;
}

/* Enhanced Checkbox Styling */
.checkbox-wrapper,
.privacy-wrapper {
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  position: relative;
}

.checkbox-wrapper .checkbox-label,
.privacy-wrapper .checkbox-label {
  display: flex !important;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0 !important;
  position: relative;
}

/* Hide the default CF7 checkbox completely */
.checkbox-wrapper input[type="checkbox"],
.privacy-wrapper input[type="checkbox"] {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.checkmark {
  position: relative;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  margin-right: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  display: inline-block;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark,
.privacy-wrapper input[type="checkbox"]:checked + .checkmark {
  background-color: #3f51b5;
  border-color: #3f51b5;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after,
.privacy-wrapper input[type="checkbox"]:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  flex: 1;
  color: #374151;
  display: inline-block;
}

.privacy-wrapper {
  background-color: #fef3c7;
  border-color: #f59e0b;
}

.privacy-wrapper .checkbox-text {
  color: #92400e;
}

.privacy-wrapper .checkmark {
  border-color: #f59e0b;
}

.privacy-wrapper input[type="checkbox"]:checked + .checkmark {
  background-color: #f59e0b;
  border-color: #f59e0b;
}

.privacy-wrapper a {
  color: #92400e;
  text-decoration: underline;
  font-weight: 600;
}

.privacy-wrapper a:hover {
  color: #78350f;
}

/* Fix for CF7 checkbox duplication */
.wpcf7-checkbox .wpcf7-list-item {
  display: none !important;
}

.wpcf7-checkbox .wpcf7-list-item:first-child {
  display: block !important;
}

/* Submit Button Styling */
.contact-form-wrapper input[type="submit"] {
  background: linear-gradient(135deg, #3f51b5 0%, #2f3b8f 100%);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.contact-form-wrapper input[type="submit"]:hover {
  background: linear-gradient(135deg, #2f3b8f 0%, #1e2a6b 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(63, 81, 181, 0.3);
}

/* Form Validation Styling */
.wpcf7-not-valid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.wpcf7-not-valid-tip {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.wpcf7-response-output {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  font-weight: 500;
}

.wpcf7-mail-sent-ok {
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.wpcf7-validation-errors {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

/* Custom Logo Styling */
.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.navbar-logo img:hover {
  opacity: 0.8;
}

/* Mobile logo adjustments */
@media (max-width: 768px) {
  .navbar-logo img {
    height: 35px;
    max-width: 150px;
  }
}

/* Logo fallback text styling */
.navbar-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s ease;
}

.navbar-logo .logo-text:hover {
  color: #3f51b5;
}

@media (max-width: 768px) {
  .navbar-logo .logo-text {
    font-size: 1.25rem;
  }
}

/* Floating Contact Widget */
#floating-contact-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  transition: all 0.3s ease;
}

#floating-contact-widget:hover {
  transform: scale(1.05);
}

/* Main floating button */
.floating-contact-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #3f51b5 0%, #2f3b8f 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(63, 81, 181, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.floating-contact-btn:hover {
  box-shadow: 0 6px 25px rgba(63, 81, 181, 0.6);
  transform: scale(1.1);
}

.floating-contact-btn i {
  color: white !important;
  font-size: 24px;
  transition: transform 0.3s ease;
}

.floating-contact-btn:hover i {
  transform: rotate(15deg);
}

/* Contact options panel */
.contact-options-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-options-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Contact option buttons */
.contact-option {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.contact-option:hover {
  background-color: #f3f4f6;
  transform: translateX(-2px);
}

.contact-option:last-child {
  margin-bottom: 0;
}

.contact-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.contact-option-icon i {
  color: white !important;
  font-size: 18px;
}

.contact-option-text {
  flex: 1;
}

.contact-option-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.contact-option-desc {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
}

/* Specific contact option colors */
.contact-option.phone .contact-option-icon {
  background: linear-gradient(135deg, #3f51b5 0%, #2f3b8f 100%);
}

.contact-option.whatsapp .contact-option-icon {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.contact-option.form .contact-option-icon {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Pulse animation for main button */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(63, 81, 181, 0.4);
  }
  50% {
    box-shadow:
      0 4px 20px rgba(63, 81, 181, 0.4),
      0 0 0 10px rgba(63, 81, 181, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(63, 81, 181, 0.4);
  }
}

.floating-contact-btn.pulse {
  animation: pulse 2s infinite;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #floating-contact-widget {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .floating-contact-btn {
    width: 56px;
    height: 56px;
  }

  .floating-contact-btn i {
    font-size: 22px;
  }

  .contact-options-panel {
    bottom: 66px;
    right: -20px;
    min-width: 260px;
    width: 260px;
    padding: 1rem;
  }

  .contact-option {
    padding: 0.75rem;
  }

  .contact-option-icon {
    width: 40px;
    height: 40px;
  }

  .contact-option-icon i {
    font-size: 18px;
  }

  .contact-option-title {
    font-size: 0.9rem;
  }

  .contact-option-desc {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Show/hide based on scroll position */
#floating-contact-widget.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

/* Desktop specific adjustments */
@media (min-width: 769px) {
  .contact-options-panel {
    min-width: 220px;
  }
}

/* Ensure all Lucide icons in contact widget are white */
#floating-contact-widget i[data-lucide] {
  color: white !important;
  stroke: white !important;
  fill: white !important;
}

#floating-contact-widget svg {
  color: white !important;
  stroke: white !important;
  fill: white !important;
}
