/* Lightweight Smart Slider CSS */

.lw-smartslider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.lw-smartslider {
  position: relative;
  width: 100%;
  height: var(--desktop-height, 470px); /* Use CSS custom property with fallback */
  overflow: hidden;
}

.lw-smartslider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.lw-smartslider-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Alternative background style for better mobile fit */
.lw-smartslider-slide.fit-mobile {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* Flexible height for contain mode on mobile only - allows Elementor to control height */
@media (max-width: 767px) {
  .lw-smartslider.flexible-height {
    height: auto;
    min-height: var(--mobile-height, 350px);
  }
  
  .lw-smartslider.flexible-height .lw-smartslider-slide {
    height: auto;
    min-height: var(--mobile-height, 350px);
  }
}

.lw-smartslider-slide-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

/* Mobile adjustments for better text fit */
@media (max-width: 767px) {
  .lw-smartslider-slide-content {
    padding: 15px;
  }
}

@media (max-width: 575px) {
  .lw-smartslider-slide-content {
    padding: 10px;
  }
}

/* Content Positioning */
.lw-smartslider-slide-content.top {
  justify-content: flex-start;
}

.lw-smartslider-slide-content.middle {
  justify-content: center;
}

.lw-smartslider-slide-content.bottom {
  justify-content: flex-end;
}

/* Text Alignment */
.lw-smartslider-slide-content.left {
  align-items: flex-start;
  text-align: left;
}

.lw-smartslider-slide-content.center {
  align-items: center;
  text-align: center;
}

.lw-smartslider-slide-content.right {
  align-items: flex-end;
  text-align: right;
}

/* Responsive title and description styles */
.lw-smartslider-title {
  font-size: var(--desktop-font-size, 2.5rem) !important;
}

.lw-smartslider-description {
  font-size: var(--desktop-font-size, 1.2rem) !important;
}

/* Mobile responsive font scaling */
@media (max-width: 767px) {
  .lw-smartslider-title {
    font-size: min(calc(var(--desktop-font-size, 40px) * 0.6), 32px) !important;
  }
  
  .lw-smartslider-description {
    font-size: min(calc(var(--desktop-font-size, 18px) * 0.8), 16px) !important;
  }
}

@media (max-width: 575px) {
  .lw-smartslider-title {
    font-size: min(calc(var(--desktop-font-size, 40px) * 0.5), 28px) !important;
  }
  
  .lw-smartslider-description {
    font-size: min(calc(var(--desktop-font-size, 18px) * 0.7), 14px) !important;
  }
}

.lw-smartslider-slide-content h2 {
  margin: 0 0 15px 0;
  font-size: 2.5rem;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.lw-smartslider-slide-content p {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Button Styles */
.lw-smartslider-button {
  position: absolute;
  display: inline-block;
  padding: 12px 24px;
  background-color: #0073e6;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease;
  z-index: 20;
  border: none;
  cursor: pointer;
}

.lw-smartslider-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Button Sizes */
.lw-smartslider-button.small {
  padding: 8px 16px;
  font-size: 14px;
}

.lw-smartslider-button.medium {
  padding: 12px 24px;
  font-size: 16px;
}

.lw-smartslider-button.large {
  padding: 16px 32px;
  font-size: 18px;
}

/* Button Positions */
.lw-smartslider-button.bottom-left {
  bottom: 20px;
  left: 20px;
}

.lw-smartslider-button.bottom-center {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.lw-smartslider-button.bottom-right {
  bottom: 20px;
  right: 20px;
}

.lw-smartslider-button.middle-left {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}

.lw-smartslider-button.middle-right {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.lw-smartslider-button.top-left {
  top: 20px;
  left: 20px;
}

.lw-smartslider-button.top-center {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.lw-smartslider-button.top-right {
  top: 20px;
  right: 20px;
}

.lw-smartslider-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.lw-smartslider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: opacity 0.3s ease;
  padding: 5px;
  margin: 0;
  border-radius: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.lw-smartslider-nav-btn:hover {
  opacity: 0.8;
}

.lw-smartslider-nav-btn.prev {
  left: 20px;
}

.lw-smartslider-nav-btn.next {
  right: 20px;
}

.lw-smartslider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lw-smartslider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.lw-smartslider-dot.active {
  background: #fff;
}

/* Responsive design */
/* Large desktop screens */

/* Portfolio Widget Styles */
.elementor-portfolio {
    direction: ltr;
}

.elementor-portfolio-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: 1fr;
    gap: var(--grid-row-gap, 30px) var(--grid-column-gap, 30px);
}

.elementor-portfolio-item {
    position: relative;
    overflow: hidden;
    text-align: center;
    align-self: flex-start;
    transform-style: preserve-3d;
    transition-property: transform, opacity;
    transition-timing-function: ease-in-out;
}

.elementor-portfolio-item__img {
    display: block;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    line-height: 0;
}

.elementor-portfolio-item__img img {
    display: block;
    max-height: none;
    max-width: none;
    transition: filter 0.3s;
    width: 100%;
}

.elementor-portfolio-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all 0.5s ease;
    opacity: 0;
    background-color: rgba(123, 123, 123, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 15px;
    text-align: center;
}

.elementor-portfolio-item:hover .elementor-portfolio-item__overlay {
    opacity: 1;
    transition: opacity 0.5s;
}

.elementor-portfolio-item__title {
    margin: 15px 0 0;
    padding: 0;
    color: #1f1f1f;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
}

.elementor-portfolio-item__title a {
    color: inherit;
    text-decoration: none;
}

/* Portfolio with Item Ratio */
.elementor-portfolio.elementor-has-item-ratio .elementor-portfolio-item__img {
    position: relative;
    overflow: hidden;
    padding-bottom: 56.25%; /* This will be overridden by the control */
}

.elementor-portfolio.elementor-has-item-ratio .elementor-portfolio-item__img img {
    height: auto;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-height: none;
    max-width: none;
}

.elementor-portfolio.elementor-has-item-ratio .elementor-portfolio-item__img.elementor-fit-height img {
    height: 100%;
    width: auto;
}

/* Portfolio Filter */
.elementor-portfolio__filter-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.elementor-portfolio__filter {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.elementor-portfolio__filter-item {
    cursor: pointer;
    margin: 0;
    padding: 8px;
}

/* Responsive Grid */
.elementor-grid-1 .elementor-portfolio-wrapper {
    grid-template-columns: repeat(1, 1fr);
}

.elementor-grid-2 .elementor-portfolio-wrapper {
    grid-template-columns: repeat(2, 1fr);
}

.elementor-grid-3 .elementor-portfolio-wrapper {
    grid-template-columns: repeat(3, 1fr);
}

.elementor-grid-4 .elementor-portfolio-wrapper {
    grid-template-columns: repeat(4, 1fr);
}

.elementor-grid-5 .elementor-portfolio-wrapper {
    grid-template-columns: repeat(5, 1fr);
}

.elementor-grid-6 .elementor-portfolio-wrapper {
    grid-template-columns: repeat(6, 1fr);
}

/* Masonry Layout */
.elementor-portfolio--masonry .elementor-portfolio-wrapper {
    display: block;
    align-items: flex-start;
}

.elementor-portfolio--masonry .elementor-portfolio-item {
    position: absolute;
    width: calc(100% / 1 - var(--grid-column-gap, 30px) * (1 - 1) / 1);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .elementor-grid-mobile-1 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .elementor-grid-mobile-2 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .elementor-grid-mobile-3 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .elementor-grid-mobile-4 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .elementor-grid-mobile-5 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .elementor-grid-mobile-6 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .elementor-portfolio--masonry .elementor-portfolio-item {
        width: calc(100% / 1 - var(--grid-column-gap, 30px) * (1 - 1) / 1);
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .elementor-grid-tablet-1 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .elementor-grid-tablet-2 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .elementor-grid-tablet-3 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .elementor-grid-tablet-4 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .elementor-grid-tablet-5 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .elementor-grid-tablet-6 .elementor-portfolio-wrapper {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .elementor-portfolio--masonry .elementor-portfolio-item {
        width: calc(100% / 2 - var(--grid-column-gap, 30px) * (2 - 1) / 2);
    }
}

/* Container Widget Styles */
.lw-container {
    display: flex;
    width: 100%;
    min-height: 300px;
    position: relative;
}

.lw-container-content {
    width: 100%;
    height: 100%;
}

/* Enhanced font family support */
.lw-smartslider-title,
.lw-smartslider-description {
  font-family: inherit;
}

/* Specific font family overrides */
.lw-smartslider-title[style*="font-family: Damion"],
.lw-smartslider-description[style*="font-family: Damion"] {
  font-family: 'Damion', cursive !important;
}

.lw-smartslider-title[style*="font-family: 'Damion'"],
.lw-smartslider-description[style*="font-family: 'Damion'"] {
  font-family: 'Damion', cursive !important;
}

/* Additional Google Fonts support - add more as needed */
.lw-smartslider-title[style*="font-family: Roboto"],
.lw-smartslider-description[style*="font-family: Roboto"] {
  font-family: 'Roboto', sans-serif !important;
}

.lw-smartslider-title[style*="font-family: 'Open Sans'"],
.lw-smartslider-description[style*="font-family: 'Open Sans'"] {
  font-family: 'Open Sans', sans-serif !important;
}

/* Large desktop screens */
@media (min-width: 1200px) {
  .lw-smartslider {
    height: var(--desktop-height, 470px);
  }
}

/* Medium devices (tablets, less than 1200px) */
@media (max-width: 1199px) and (min-width: 992px) {
  .lw-smartslider {
    height: var(--tablet-height, 420px);
  }
  
  .lw-smartslider-slide-content h2 {
    font-size: 2.2rem;
  }
  
  .lw-smartslider-slide-content p {
    font-size: 1.1rem;
  }
}

/* Small devices (landscape tablets, less than 992px) */
@media (max-width: 991px) and (min-width: 768px) {
  .lw-smartslider {
    height: var(--tablet-height, 380px);
  }
  
  .lw-smartslider-slide {
    background-size: cover;
    background-position: center center;
  }
  
  /* For portrait images on tablets, use contain to show full image */
  .lw-smartslider-slide.portrait-mobile {
    background-size: contain;
  }
  
  .lw-smartslider-slide-content h2 {
    font-size: 2rem;
  }
  
  .lw-smartslider-slide-content p {
    font-size: 1rem;
  }
  
  .lw-smartslider-nav-btn {
    font-size: 20px;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  }
}

/* Extra small devices (portrait tablets and large phones, less than 768px) */
@media (max-width: 767px) and (min-width: 576px) {
  .lw-smartslider {
    height: var(--mobile-height, 350px);
  }
  
  .lw-smartslider-slide {
    background-size: cover;
    background-position: center center;
  }
  
  /* For portrait images on small devices, use contain to show full image */
  .lw-smartslider-slide.portrait-mobile {
    background-size: contain;
  }
  
  .lw-smartslider-slide-content h2 {
    line-height: 1.2;
  }
  
  .lw-smartslider-slide-content p {
    line-height: 1.4;
  }
  
  .lw-smartslider-nav-btn {
    font-size: 18px;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  }
  
  .lw-smartslider-nav-btn.prev {
    left: 10px;
  }
  
  .lw-smartslider-nav-btn.next {
    right: 10px;
  }
  
  /* Mobile button adjustments */
  .lw-smartslider-button {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .lw-smartslider-button.small {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .lw-smartslider-button.medium {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .lw-smartslider-button.large {
    padding: 14px 28px;
    font-size: 16px;
  }
  
  .lw-smartslider-button.bottom-left,
  .lw-smartslider-button.bottom-center,
  .lw-smartslider-button.bottom-right {
    bottom: 15px;
  }
  
  .lw-smartslider-button.top-left,
  .lw-smartslider-button.top-center,
  .lw-smartslider-button.top-right {
    top: 15px;
  }
  
  .lw-smartslider-button.bottom-left,
  .lw-smartslider-button.middle-left,
  .lw-smartslider-button.top-left {
    left: 15px;
  }
  
  .lw-smartslider-button.bottom-right,
  .lw-smartslider-button.middle-right,
  .lw-smartslider-button.top-right {
    right: 15px;
  }
}

/* Small devices (phones, less than 576px) */
@media (max-width: 575px) {
  .lw-smartslider {
    height: var(--small-mobile-height, 300px);
  }
  
  .lw-smartslider-slide {
    background-size: cover;
    background-position: center center;
  }
  
  /* For portrait images on small mobile, use contain to show full image */
  .lw-smartslider-slide.portrait-mobile {
    background-size: contain;
  }
  
  .lw-smartslider-slide-content {
    padding: 10px;
  }
  
  .lw-smartslider-slide-content h2 {
    margin: 0 0 10px 0;
    line-height: 1.2;
  }
  
  .lw-smartslider-slide-content p {
    margin: 0 0 15px 0;
    line-height: 1.4;
  }
  
  .lw-smartslider-dot {
    width: 10px;
    height: 10px;
    margin: 0 3px;
  }
  
  /* Small mobile button adjustments */
  .lw-smartslider-button {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .lw-smartslider-button.small {
    padding: 4px 8px;
    font-size: 10px;
  }
  
  .lw-smartslider-button.medium {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .lw-smartslider-button.large {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .lw-smartslider-button.bottom-left,
  .lw-smartslider-button.bottom-center,
  .lw-smartslider-button.bottom-right {
    bottom: 10px;
  }
  
  .lw-smartslider-button.top-left,
  .lw-smartslider-button.top-center,
  .lw-smartslider-button.top-right {
    top: 10px;
  }
  
  .lw-smartslider-button.bottom-left,
  .lw-smartslider-button.middle-left,
  .lw-smartslider-button.top-left {
    left: 10px;
  }
  
  .lw-smartslider-button.bottom-right,
  .lw-smartslider-button.middle-right,
  .lw-smartslider-button.top-right {
    right: 10px;
  }
  
  .lw-smartslider-nav-btn {
    font-size: 16px;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  }
}