/**
 * Elementor CSS Fixes for Prosjektmarkedet
 * This file contains fixes for Elementor's messy CSS
 * Updated with new brand colors and professional styling
 * Primary: #004225 (Green)
 * Secondary: #2b4257 (Blue)
 * Accent: #d6ad60 (Gold)
 * Light Accent: #88a9c3 (Light Blue)
 * Neutral: #c0c0c0 (Silver)
 */

/* Fix Elementor container width */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: var(--container-width) !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Fix Elementor section padding */
.elementor-section {
  padding-top: 60px !important;
  padding-bottom: 60px !important;
}

.elementor-section.elementor-top-section:first-child {
  padding-top: 0 !important;
}

/* Fix Elementor column gaps */
.elementor-column-gap-default > .elementor-column > .elementor-element-populated {
  padding: 20px !important;
}

/* Fix Elementor widget margins */
.elementor-widget:not(:last-child) {
  margin-bottom: 20px !important;
}

/* Fix Elementor headings */
.elementor-widget-heading .elementor-heading-title {
  line-height: 1.3 !important;
  letter-spacing: -0.02em !important;
}

/* Fix Elementor text editor */
.elementor-widget-text-editor {
  line-height: 1.6 !important;
  font-size: 16px !important;
}

/* Fix Elementor buttons */
.elementor-button {
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: all 0.3s ease !important;
}

.elementor-button.elementor-size-xs {
  padding: 8px 16px !important;
  font-size: 14px !important;
}

.elementor-button.elementor-size-md {
  padding: 12px 24px !important;
  font-size: 16px !important;
}

.elementor-button.elementor-size-lg {
  padding: 16px 32px !important;
  font-size: 18px !important;
}

.elementor-button.elementor-size-xl {
  padding: 20px 36px !important;
  font-size: 20px !important;
}

/* Button colors */
.elementor-button.elementor-button-primary {
  background-color: #004225 !important;
  color: #ffffff !important;
}

.elementor-button.elementor-button-secondary {
  background-color: #2b4257 !important;
  color: #ffffff !important;
}

.elementor-button.elementor-button-accent {
  background-color: #d6ad60 !important;
  color: #ffffff !important;
}

.elementor-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.elementor-button.elementor-button-primary:hover {
  background-color: #003019 !important;
}

.elementor-button.elementor-button-secondary:hover {
  background-color: #1e3040 !important;
}

.elementor-button.elementor-button-accent:hover {
  background-color: #c09c50 !important;
}

/* Fix Elementor icon boxes */
.elementor-widget-icon-box .elementor-icon-box-wrapper {
  display: flex !important;
  align-items: flex-start !important;
  text-align: left !important;
}

.elementor-widget-icon-box .elementor-icon-box-icon {
  margin-right: 15px !important;
  margin-bottom: 0 !important;
}

.elementor-widget-icon-box .elementor-icon {
  font-size: 24px !important;
}

.elementor-widget-icon-box .elementor-icon-box-title {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  font-size: 18px !important;
}

.elementor-widget-icon-box .elementor-icon-box-description {
  margin-bottom: 0 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

/* Fix Elementor images */
.elementor-widget-image img {
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.elementor-widget-image a:hover img {
  transform: scale(1.02) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Fix Elementor testimonials */
.elementor-testimonial-wrapper {
  background-color: #f5f7fa !important;
  padding: 30px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
  border-left: 4px solid #004225 !important;
}

.elementor-testimonial-content {
  font-size: 16px !important;
  line-height: 1.6 !important;
  font-style: italic !important;
  margin-bottom: 20px !important;
}

.elementor-testimonial-meta {
  display: flex !important;
  align-items: center !important;
}

.elementor-testimonial-image img {
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.elementor-testimonial-name {
  font-weight: 600 !important;
  font-size: 16px !important;
}

.elementor-testimonial-job {
  font-size: 14px !important;
  color: #666 !important;
}

/* Fix Elementor tabs */
.elementor-tabs-wrapper {
  display: flex !important;
  border-bottom: 1px solid #e6e9ed !important;
  margin-bottom: 20px !important;
}

.elementor-tab-title {
  padding: 15px 20px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  border-bottom: 2px solid transparent !important;
  transition: all 0.3s ease !important;
}

.elementor-tab-title.elementor-active {
  border-bottom-color: #004225 !important;
  color: #004225 !important;
}

.elementor-tab-content {
  padding: 20px 0 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

/* Fix Elementor accordions */
.elementor-accordion .elementor-accordion-item {
  border: 1px solid #e6e9ed !important;
  border-radius: 8px !important;
  margin-bottom: 10px !important;
  overflow: hidden !important;
}

.elementor-accordion .elementor-tab-title {
  padding: 20px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

.elementor-accordion .elementor-tab-content {
  padding: 0 20px 20px !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

/* Fix Elementor forms */
.elementor-field-group {
  margin-bottom: 20px !important;
}

.elementor-field-textual {
  padding: 12px 15px !important;
  border-radius: 8px !important;
  border: 1px solid #e6e9ed !important;
  font-size: 16px !important;
  transition: all 0.3s ease !important;
}

.elementor-field-textual:focus {
  border-color: #004225 !important;
  box-shadow: 0 0 0 2px rgba(0, 66, 37, 0.2) !important;
}

.elementor-button.elementor-size-md {
  padding: 12px 24px !important;
}

/* Fix Elementor pricing tables */
.elementor-price-table {
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.elementor-price-table:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.elementor-price-table__header {
  padding: 30px 20px !important;
}

.elementor-price-table__price {
  padding: 20px !important;
}

.elementor-price-table__features-list {
  padding: 20px !important;
}

.elementor-price-table__features-list li {
  padding: 10px 0 !important;
  font-size: 16px !important;
}

.elementor-price-table__footer {
  padding: 30px 20px !important;
}

/* Fix Elementor counters */
.elementor-counter .elementor-counter-number-wrapper {
  font-size: 36px !important;
  font-weight: 700 !important;
  color: #004225 !important;
}

.elementor-counter .elementor-counter-title {
  font-size: 16px !important;
  font-weight: 500 !important;
  margin-top: 10px !important;
}

/* Fix Elementor progress bars */
.elementor-progress-wrapper {
  height: 8px !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.elementor-progress-bar {
  border-radius: 4px !important;
}

.elementor-progress-text {
  padding-right: 15px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* Fix Elementor image carousels */
.elementor-widget-image-carousel .swiper-slide img {
  border-radius: 8px !important;
}

.elementor-widget-image-carousel .swiper-pagination-bullet {
  width: 10px !important;
  height: 10px !important;
  background-color: #004225 !important;
  opacity: 0.3 !important;
}

.elementor-widget-image-carousel .swiper-pagination-bullet-active {
  opacity: 1 !important;
}

/* Fix Elementor icons */
.elementor-icon {
  padding: 15px !important;
  border-radius: 50% !important;
  background-color: #f5f7fa !important;
  transition: all 0.3s ease !important;
}

.elementor-icon:hover {
  background-color: #004225 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}

/* Fix Elementor social icons */
.elementor-social-icons-wrapper {
  display: flex !important;
  gap: 10px !important;
}

.elementor-social-icon {
  font-size: 16px !important;
  padding: 10px !important;
  border-radius: 50% !important;
  transition: all 0.3s ease !important;
}

.elementor-social-icon:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Fix Elementor dividers */
.elementor-divider {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

.elementor-divider-separator {
  border-top-width: 1px !important;
  border-top-color: #e6e9ed !important;
}

/* Fix Elementor spacers */
.elementor-spacer-inner {
  height: 20px !important;
}

/* Mobile menu fixes */
.elementor-menu-toggle {
  background-color: transparent !important;
  color: #004225 !important;
  border: none !important;
  font-size: 24px !important;
  padding: 10px !important;
}

.elementor-nav-menu--dropdown {
  background-color: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
  padding: 10px !important;
}

.elementor-nav-menu--dropdown a {
  color: #333333 !important;
  padding: 12px 15px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
}

.elementor-nav-menu--dropdown a:hover,
.elementor-nav-menu--dropdown a.elementor-item-active {
  background-color: #f5f7fa !important;
  color: #004225 !important;
}

/* Fix Elementor columns on mobile */
.elementor-column {
  width: 100% !important;
}

/* Responsive fixes */
@media (max-width: 767px) {
  .elementor-section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
  
  .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
    padding: 15px !important;
  }
  
  .elementor-widget-heading .elementor-heading-title {
    font-size: 24px !important;
  }
  
  .elementor-button {
    width: 100% !important;
  }
  
  .elementor-tabs-wrapper {
    flex-wrap: wrap !important;
  }
  
  .elementor-tab-title {
    width: 100% !important;
    text-align: center !important;
  }
}

/* Fix Elementor animations */
.elementor-invisible {
  visibility: visible !important;
}

.elementor-animation-grow {
  transition: transform 0.3s ease !important;
}

.elementor-animation-grow:hover {
  transform: scale(1.05) !important;
}

/* Fix Elementor forms */
.elementor-field-group {
  margin-bottom: 15px !important;
}

.elementor-field-group .elementor-field-label {
  font-weight: 600 !important;
  margin-bottom: 5px !important;
  color: #2b4257 !important;
}

.elementor-field-group .elementor-field {
  border-radius: 8px !important;
  border: 1px solid #e6e9ed !important;
  padding: 12px 15px !important;
  font-size: 16px !important;
  transition: all 0.3s ease !important;
}

.elementor-field-group .elementor-field:focus {
  border-color: #004225 !important;
  box-shadow: 0 0 0 2px rgba(0, 66, 37, 0.1) !important;
}

.elementor-field-type-submit .elementor-button {
  width: 100% !important;
  background-color: #004225 !important;
  color: #ffffff !important;
}

.elementor-field-type-submit .elementor-button:hover {
  background-color: #003019 !important;
}

/* Fix Elementor section backgrounds */
.elementor-section[data-settings*="background_background"] {
  background-size: cover !important;
  background-position: center center !important;
}

/* Fix Elementor section overlays */
.elementor-background-overlay {
  border-radius: inherit !important;
}

/* Fix Elementor image galleries */
.elementor-image-gallery .gallery-item {
  padding: 10px !important;
}

.elementor-image-gallery .gallery-item img {
  border: none !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.elementor-image-gallery .gallery-item img:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}
