/*
Theme Name: Maggioli Destinazioni Turistiche
Description: Template WordPress per destinazioni turistiche basato su Bootstrap Italia
Version: 1.0.0
Author: Maggioli
Text Domain: maggioli-tourism
*/

/* Import Bootstrap Italia */
@import url('node_modules/bootstrap-italia/dist/css/bootstrap-italia.min.css');

/* Custom styles for tourism destinations */
:root {
  --accent-color: #28a745;
  --text-color: #333333;
  --light-bg: #f8f9fa;
}

body {
  font-family: 'Titillium Web', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

/* Header styles */
.top-bar {
  font-size: 0.875rem;
}

.top-bar .ente-name {
  font-size: 1rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.top-bar .social-links a:hover {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.language-selector .dropdown-toggle {
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.language-selector .dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.site-header {
  border-bottom: 1px solid #e9ecef;
}

.site-branding .site-title a {
  font-size: 1.75rem;
  font-weight: 700;
}

.site-branding .site-description {
  font-size: 0.875rem;
}

/* Logo e Titolo allineati */
.site-branding .custom-logo-link {
  display: inline-block;
  vertical-align: middle;
}

.site-branding .custom-logo-link img {
  max-height: 60px;
  width: auto;
  vertical-align: middle;
}

.site-branding .d-flex.align-items-center .site-title {
  margin-bottom: 0.25rem;
}

.site-branding .d-flex.align-items-center .site-description {
  margin-bottom: 0;
}

.search-container .input-group {
  max-width: 400px;
}

.search-container .form-control {
  border-radius: 25px 0 0 25px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
}

.search-container .btn {
  border-radius: 0 25px 25px 0;
  border: 2px solid var(--primary-color);
  padding: 0.75rem 1rem;
}

.main-navigation {
  background: var(--primary-color) !important;
}

.main-navigation .navbar-nav .nav-link {
  color: white !important;
  font-weight: 600;
  padding: 1rem 1.25rem;
  transition: all 0.3s ease;
  position: relative;
}

.main-navigation .navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
}

.main-navigation .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-navigation .navbar-nav .nav-link:hover::after {
  width: 80%;
}

.main-navigation .navbar-nav .dropdown-menu {
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin-top: 0;
}

.main-navigation .navbar-nav .dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.main-navigation .navbar-nav .dropdown-item:hover {
  background: var(--primary-color);
  color: white;
}

.main-navigation .btn-light {
  background: white;
  border: 2px solid white;
  color: var(--primary-color) !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.main-navigation .btn-light:hover {
  background: transparent;
  color: white !important;
}

/* Responsive adjustments for header */
@media (max-width: 991.98px) {
  .top-bar .col-md-6:first-child {
    text-align: center;
    margin-bottom: 0.5rem;
  }
  
  .top-bar .col-md-6:last-child {
    text-align: center;
  }
  
  .search-container {
    margin: 1rem 0;
  }
  
  .search-container .input-group {
    max-width: 100%;
  }
  
  .main-navigation .navbar-nav {
    text-align: center;
  }
  
  .main-navigation .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .main-navigation .btn-light {
    margin-top: 1rem;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .top-bar {
    font-size: 0.75rem;
  }
  
  .top-bar .social-links {
    justify-content: center;
  }
  
  .site-branding .site-title a {
    font-size: 1.5rem;
  }
  
  .site-branding .site-description {
    display: none;
  }
}

/* Hero section */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  padding: 12rem 0;
  text-align: center;
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

/* Hero Carousel Styles */
.hero-carousel-section {
  padding: 0;
  min-height: 80vh;
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.hero-carousel-section .carousel {
  height: 80vh;
  min-height: 600px;
  width: 100%;
  position: relative;
}

.hero-carousel-section .carousel-inner {
  height: 100%;
  width: 100%;
  position: relative;
}

.hero-carousel-section .carousel-item {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.8s ease-in-out;
  opacity: 0;
}

.hero-carousel-section .carousel-item.active {
  opacity: 1;
  position: relative;
}

.hero-slide {
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
  z-index: 1;
}

.hero-carousel-section .container {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 15px;
}

.hero-carousel-section .hero-slide .container {
  position: relative;
  z-index: 3;
}

/* Row full width */
.hero-carousel-section .row {
  width: 100%;
  margin: 0;
}

/* Hero text alignment */
.hero-carousel-section .text-start {
  text-align: left !important;
}

.hero-carousel-section .text-start .hero-title {
  text-align: left;
}

.hero-carousel-section .text-start .hero-subtitle {
  text-align: left;
}

.hero-carousel-section .text-start .btn {
  margin-right: auto;
  display: inline-block;
}

/* Hero title specific styling */
.hero-carousel-section .hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero-carousel-section .hero-subtitle {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.5;
}


/* Fade effect for carousel */
.hero-carousel-section .carousel-fade .carousel-item {
  opacity: 0;
  transition-property: opacity;
  transform: none;
}

.hero-carousel-section .carousel-fade .carousel-item.active {
  opacity: 1;
}

.hero-carousel-section .carousel-fade .carousel-item.active,
.hero-carousel-section .carousel-fade .carousel-item-next.carousel-item-start,
.hero-carousel-section .carousel-fade .carousel-item-prev.carousel-item-end {
  transform: none;
}

/* Full width carousel */
.hero-carousel-section {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}

.hero-carousel-section .carousel,
.hero-carousel-section .carousel-inner,
.hero-carousel-section .carousel-item,
.hero-slide {
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
}

/* Ensure proper slide positioning */
.hero-carousel-section .carousel-inner {
  position: relative;
  height: 100%;
}

.hero-carousel-section .carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero-carousel-section .carousel-item.active {
  opacity: 1;
  position: absolute;
  z-index: 2;
}

.hero-carousel-section .carousel-item:not(.active) {
  opacity: 0;
  z-index: 1;
}

/* Bootstrap carousel overrides */
.hero-carousel-section .carousel-item.active,
.hero-carousel-section .carousel-item-next,
.hero-carousel-section .carousel-item-prev {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-carousel-section .carousel-item.active {
  opacity: 1;
  z-index: 2;
}

.hero-carousel-section .carousel-item-next:not(.carousel-item-start),
.hero-carousel-section .carousel-item-prev:not(.carousel-item-end) {
  opacity: 0;
  z-index: 1;
}


/* Loading state for carousel */
.hero-carousel-section .carousel-loading {
  opacity: 0.8;
}

.hero-carousel-section .carousel-loading .carousel-item {
  opacity: 0.7;
}

.hero-carousel-section .carousel-loading .carousel-control-prev,
.hero-carousel-section .carousel-loading .carousel-control-next,
.hero-carousel-section .carousel-loading .carousel-indicators {
  opacity: 0.5;
  pointer-events: none;
}

/* Smooth image loading */
.hero-slide {
  transition: opacity 0.5s ease-in-out;
}

.hero-slide.loading {
  opacity: 0.7;
}

.hero-slide.loaded {
  opacity: 1;
}

.hero-section h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero-carousel-section .hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-section .btn {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.hero-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Destination cards */
.destination-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 2rem;
}

.destination-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.destination-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.destination-card .card-body {
  padding: 1.5rem;
}

.destination-card .card-title {
  font-weight: 700;
  color: var(--primary-color);
}

/* Services section */
.services-section {
  background: var(--light-bg);
  padding: 4rem 0;
}

.service-item {
  text-align: center;
  padding: 2rem 1rem;
}

.service-item i {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background: #2c3e50;
  color: white;
  padding: 3rem 0 1rem;
}

.site-footer h5 {
  color: var(--secondary-color);
  font-weight: 700;
}

.site-footer a {
  color: #bdc3c7;
  text-decoration: none;
}

.site-footer a:hover {
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 8rem 0;
    min-height: 60vh;
    background-attachment: scroll;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-section p {
    font-size: 1.1rem;
  }
  
  .hero-section .btn {
    font-size: 1rem;
    padding: 0.875rem 2rem;
  }
  
  /* Hero Carousel Mobile */
  .hero-carousel-section {
    min-height: 60vh;
    height: 60vh;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: 100vw;
  }
  
  .hero-carousel-section .carousel {
    height: 60vh;
    min-height: 60vh;
  }
  
  .hero-carousel-section .carousel-inner {
    height: 60vh;
  }
  
  .hero-carousel-section .carousel-item {
    height: 60vh;
  }
  
  .hero-carousel-section .hero-slide {
    height: 60vh;
  }
  
  /* Mobile text alignment */
  .hero-carousel-section .text-start {
    text-align: left !important;
  }
  
  .hero-carousel-section .text-start .hero-title {
    text-align: left;
  }
  
  .hero-carousel-section .text-start .hero-subtitle {
    text-align: left;
  }
  
  .hero-carousel-section .text-start .btn {
    margin-right: auto;
    display: inline-block;
  }
  
  /* Mobile container padding */
  .hero-carousel-section .container {
    padding: 0 25px;
    max-width: 100%;
    margin: 0;
  }
  
  /* Mobile hero title styling */
  .hero-carousel-section .hero-title {
    font-size: 2.5rem;
    line-height: 1.3;
  }
  
  .hero-carousel-section .hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.5;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 6rem 0;
    min-height: 50vh;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  /* Hero Carousel Small Mobile */
  .hero-carousel-section {
    min-height: 50vh;
    height: 50vh;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: 100vw;
  }
  
  .hero-carousel-section .carousel {
    height: 50vh;
    min-height: 50vh;
  }
  
  .hero-carousel-section .carousel-inner {
    height: 50vh;
  }
  
  .hero-carousel-section .carousel-item {
    height: 50vh;
  }
  
  .hero-carousel-section .hero-slide {
    height: 50vh;
  }
  
  /* Small mobile container padding */
  .hero-carousel-section .container {
    padding: 0 30px;
    max-width: 100%;
    margin: 0;
  }
  
/* Small mobile hero title styling */
.hero-carousel-section .hero-title {
  font-size: 2rem;
  line-height: 1.3;
}

.hero-carousel-section .hero-subtitle {
  font-size: 1rem;
  line-height: 1.5;
}

/* Header Language Button - Remove Border */
.language-selector .btn,
.language-selector-header .btn,
.language-selector .btn-link,
.language-selector-header .btn-outline-primary {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.language-selector .btn:hover,
.language-selector-header .btn:hover,
.language-selector .btn-link:hover,
.language-selector-header .btn-outline-primary:hover {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.language-selector .btn:focus,
.language-selector-header .btn:focus,
.language-selector .btn-link:focus,
.language-selector-header .btn-outline-primary:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.language-selector .btn:active,
.language-selector-header .btn:active,
.language-selector .btn-link:active,
.language-selector-header .btn-outline-primary:active {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Additional specificity for Bootstrap buttons */
.top-bar .language-selector .btn-link,
.site-header .language-selector-header .btn-outline-primary {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.top-bar .language-selector .btn-link:hover,
.site-header .language-selector-header .btn-outline-primary:hover {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.top-bar .language-selector .btn-link:focus,
.site-header .language-selector-header .btn-link:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Language button styling */
.language-selector .btn-link,
.language-selector-header .btn-link {
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.language-selector .btn-link:hover,
.language-selector-header .btn-link:hover {
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.language-selector .btn-link:focus,
.language-selector-header .btn-link:focus {
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.language-selector .btn-link:active,
.language-selector-header .btn-link:active {
  color: var(--bs-primary) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ultra specific CSS for language buttons */
.top-bar .language-selector .btn-link,
.site-header .language-selector-header .btn-link,
.top-bar .language-selector .btn,
.site-header .language-selector-header .btn {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.top-bar .language-selector .btn-link:hover,
.site-header .language-selector-header .btn-link:hover,
.top-bar .language-selector .btn:hover,
.site-header .language-selector-header .btn:hover {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.top-bar .language-selector .btn-link:focus,
.site-header .language-selector-header .btn-link:focus,
.top-bar .language-selector .btn:focus,
.site-header .language-selector-header .btn:focus {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.top-bar .language-selector .btn-link:active,
.site-header .language-selector-header .btn-link:active,
.top-bar .language-selector .btn:active,
.site-header .language-selector-header .btn:active {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

/* Override Bootstrap Italia styles */
.btn-link.dropdown-toggle,
button.btn-link.dropdown-toggle {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.btn-link.dropdown-toggle:hover,
button.btn-link.dropdown-toggle:hover {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.btn-link.dropdown-toggle:focus,
button.btn-link.dropdown-toggle:focus {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.btn-link.dropdown-toggle:active,
button.btn-link.dropdown-toggle:active {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

/* Override Bootstrap CSS variables for language buttons */
.language-selector .btn-link,
.language-selector-header .btn-link {
  --bs-btn-font-weight: 400 !important;
  --bs-btn-color: var(--primary-color) !important;
  --bs-btn-bg: transparent !important;
  --bs-btn-border-color: transparent !important;
  --bs-btn-hover-color: var(--primary-color) !important;
  --bs-btn-hover-border-color: transparent !important;
  --bs-btn-active-color: var(--primary-color) !important;
  --bs-btn-active-border-color: transparent !important;
  --bs-btn-disabled-color: hsl(0, 0%, 32%) !important;
  --bs-btn-disabled-border-color: transparent !important;
  --bs-btn-box-shadow: none !important;
  --bs-btn-focus-shadow-rgb: 38, 125, 212 !important;
  text-decoration: none !important;
}

/* Override Bootstrap CSS variables for dropdown buttons */
.btn-link.dropdown-toggle,
button.btn-link.dropdown-toggle {
  --bs-btn-font-weight: 400 !important;
  --bs-btn-color: var(--primary-color) !important;
  --bs-btn-bg: transparent !important;
  --bs-btn-border-color: transparent !important;
  --bs-btn-hover-color: var(--primary-color) !important;
  --bs-btn-hover-border-color: transparent !important;
  --bs-btn-active-color: var(--primary-color) !important;
  --bs-btn-active-border-color: transparent !important;
  --bs-btn-disabled-color: hsl(0, 0%, 32%) !important;
  --bs-btn-disabled-border-color: transparent !important;
  --bs-btn-box-shadow: none !important;
  --bs-btn-focus-shadow-rgb: 38, 125, 212 !important;
  text-decoration: none !important;
}

/* Mobile Top Bar - Show Only Social */
@media (max-width: 768px) {
  .top-bar .col-md-6:first-child {
    display: none !important;
  }
  
  .top-bar .col-md-6:last-child {
    width: 100%;
    text-align: center !important;
  }
  
  .top-bar .d-flex {
    justify-content: center !important;
  }
  
  .top-bar .language-selector {
    display: none !important;
  }
}

/* Four columns section */
.column-card {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.column-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.column-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.column-content h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.column-content p {
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
  color: white;
  text-align: center;
}

/* Fallback for columns without images */
.column-card:not([style*="background-image"]) {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.column-card:not([style*="background-image"]) .column-content {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

/* Menu Lingue nell'Header */
.language-selector-header .dropdown-toggle {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.language-selector-header .dropdown-toggle:hover {
  background-color: var(--primary-color);
  color: white;
}

.language-selector-header .dropdown-menu {
  min-width: 150px;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.language-selector-header .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.language-selector-header .dropdown-item:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Miglioramenti estetici per tutti i dropdown delle lingue (Top Bar e Header) */
.language-selector .dropdown-menu,
.language-selector-header .dropdown-menu {
  min-width: 180px;
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.5rem;
  margin-top: 0.5rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-selector .dropdown-item,
.language-selector-header .dropdown-item {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.language-selector .dropdown-item:hover,
.language-selector-header .dropdown-item:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.language-selector .dropdown-item:active,
.language-selector-header .dropdown-item:active {
  background: var(--primary-color);
  color: white;
  transform: translateX(3px) scale(0.98);
  text-decoration: none;
}

/* Stili per le bandiere e il testo nelle dropdown */
.language-selector .dropdown-item img,
.language-selector-header .dropdown-item img {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.language-selector .dropdown-item .lang-item-name,
.language-selector-header .dropdown-item .lang-item-name {
  font-weight: 600;
  margin-left: 0.5rem;
  padding: 0.25rem 0;
}

/* Stili specifici per i link delle lingue di Polylang */
.language-selector .dropdown-item a,
.language-selector-header .dropdown-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.25rem 0;
}

.language-selector .dropdown-item a:hover,
.language-selector-header .dropdown-item a:hover {
  text-decoration: none;
  color: inherit;
}

/* Animazione di apertura del dropdown */
.language-selector .dropdown-menu.show,
.language-selector-header .dropdown-menu.show {
  animation: dropdownFadeIn 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animazione di chiusura del dropdown */
.language-selector .dropdown-menu,
.language-selector-header .dropdown-menu {
  animation: dropdownFadeOut 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dropdownFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.92);
  }
}

/* Stili specifici per il dropdown nella top bar */
.language-selector .dropdown-toggle {
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.language-selector .dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  transform: translateY(-1px);
}

/* Stili per il pulsante del dropdown nell'header */
.language-selector-header .dropdown-toggle {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-weight: 500;
}

.language-selector-header .dropdown-toggle:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.language-selector-header .dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Responsive per il dropdown delle lingue */
@media (max-width: 768px) {
  .language-selector .dropdown-menu,
  .language-selector-header .dropdown-menu {
    min-width: 160px;
    margin-top: 0.25rem;
  }
  
  .language-selector .dropdown-item,
  .language-selector-header .dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  .language-selector .dropdown-item img,
  .language-selector-header .dropdown-item img {
    width: 18px;
    height: 13px;
  }
  
  .language-selector .dropdown-item .lang-item-name,
  .language-selector-header .dropdown-item .lang-item-name {
    padding: 0.2rem 0;
  }
  
  .language-selector .dropdown-item a,
  .language-selector-header .dropdown-item a {
    padding: 0.2rem 0;
  }
  
  .language-selector-header .dropdown-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .language-selector .dropdown-menu,
  .language-selector-header .dropdown-menu {
    min-width: 140px;
    border-radius: 8px;
  }
  
  .language-selector .dropdown-item,
  .language-selector-header .dropdown-item {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    gap: 0.5rem;
  }
  
  .language-selector .dropdown-item img,
  .language-selector-header .dropdown-item img {
    width: 16px;
    height: 12px;
  }
  
  .language-selector .dropdown-item .lang-item-name,
  .language-selector-header .dropdown-item .lang-item-name {
    padding: 0.15rem 0;
  }
  
  .language-selector .dropdown-item a,
  .language-selector-header .dropdown-item a {
    padding: 0.15rem 0;
  }
}

.search-container .input-group {
  max-width: 400px;
}

.search-container .form-control {
  border-radius: 25px 0 0 25px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
}

.search-container .btn {
  border-radius: 0 25px 25px 0;
  border: 2px solid var(--primary-color);
  padding: 0.75rem 1rem;
}

/* Sezione Immagine + Testo */
.image-text-section {
  background: #f8f9fa;
}

.image-text-section .img-fluid {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-text-section .img-fluid:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-text-content h2 {
  color: var(--primary-color);
  font-weight: 700;
}

.image-text-content .lead {
  color: #666;
  line-height: 1.8;
}

.image-text-content .btn {
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.image-text-content .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.placeholder-image {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 2px dashed #dee2e6;
}

/* Responsive per sezione immagine + testo */
@media (max-width: 991.98px) {
  .image-text-section .row {
    flex-direction: column;
  }
  
  .image-text-section .col-lg-6:first-child {
    order: 1;
  }
  
  .image-text-section .col-lg-6:last-child {
    order: 2;
  }
  
  .image-text-content {
    text-align: center;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .image-text-content h2 {
    font-size: 2rem;
  }
  
  .image-text-content .lead {
    font-size: 1rem;
  }
  
  .image-text-content .btn {
    width: 100%;
    margin-top: 1rem;
  }
}

/* ULTRA SPECIFIC CSS FOR LANGUAGE BUTTONS - HIGHEST PRIORITY */
.top-bar .language-selector .btn-link.dropdown-toggle,
.site-header .language-selector-header .btn-link.dropdown-toggle,
.top-bar .language-selector button.btn-link.dropdown-toggle,
.site-header .language-selector-header button.btn-link.dropdown-toggle {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  --bs-btn-color: var(--primary-color) !important;
  --bs-btn-hover-color: var(--primary-color) !important;
  --bs-btn-active-color: var(--primary-color) !important;
  --bs-btn-border-color: transparent !important;
  --bs-btn-hover-border-color: transparent !important;
  --bs-btn-active-border-color: transparent !important;
  --bs-btn-bg: transparent !important;
  --bs-btn-box-shadow: none !important;
}

.top-bar .language-selector .btn-link.dropdown-toggle:hover,
.site-header .language-selector-header .btn-link.dropdown-toggle:hover,
.top-bar .language-selector button.btn-link.dropdown-toggle:hover,
.site-header .language-selector-header button.btn-link.dropdown-toggle:hover {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.top-bar .language-selector .btn-link.dropdown-toggle:focus,
.site-header .language-selector-header .btn-link.dropdown-toggle:focus,
.top-bar .language-selector button.btn-link.dropdown-toggle:focus,
.site-header .language-selector-header button.btn-link.dropdown-toggle:focus {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.top-bar .language-selector .btn-link.dropdown-toggle:active,
.site-header .language-selector-header .btn-link.dropdown-toggle:active,
.top-bar .language-selector button.btn-link.dropdown-toggle:active,
.site-header .language-selector-header button.btn-link.dropdown-toggle:active {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

/* Service Promo Block Styles */
.service-promo-block {
  padding: 3rem 0;
  margin: 2rem 0;
}

.service-promo-block .container {
  max-width: 1200px;
}

.service-promo-block .service-promo-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.service-promo-block .service-promo-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.service-promo-block .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.service-promo-block .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.service-promo-block img {
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.service-promo-block img:hover {
  transform: scale(1.02);
}

/* Editor Styles */
.service-promo-block-editor {
  margin: 1rem 0;
}

.service-promo-block-editor .service-promo-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.service-promo-block-editor .service-promo-description {
  font-size: 1rem;
  line-height: 1.6;
}

/* Editor Responsive Styles */
@media (max-width: 768px) {
  .service-promo-block-editor .ps-md-4 {
    padding-left: 0 !important;
    margin-top: 3rem;
  }
  
  .service-promo-block-editor img {
    width: 100% !important;
    height: auto;
    border-radius: 8px;
  }
}

@media (max-width: 576px) {
  .service-promo-block-editor .ps-md-4 {
    margin-top: 3.5rem;
  }
  
  .service-promo-block-editor img {
    width: 100% !important;
    height: auto;
    border-radius: 6px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .service-promo-block {
    padding: 2rem 0;
  }
  
  .service-promo-block .service-promo-title {
    font-size: 2rem;
  }
  
  .service-promo-block .service-promo-description {
    font-size: 1rem;
  }
  
  .service-promo-block .ps-md-4 {
    padding-left: 0 !important;
    margin-top: 3rem;
  }
  
  .service-promo-block img {
    width: 100% !important;
    height: auto;
    border-radius: 8px;
  }
}

@media (max-width: 576px) {
  .service-promo-block {
    padding: 1.5rem 0;
  }
  
  .service-promo-block .service-promo-title {
    font-size: 1.75rem;
  }
  
  .service-promo-block .btn {
    width: 100%;
    padding: 1rem 2rem;
  }
  
  .service-promo-block .ps-md-4 {
    margin-top: 3.5rem;
  }
  
  .service-promo-block img {
    width: 100% !important;
    height: auto;
    border-radius: 6px;
  }
}

/* Hide language label on mobile */
@media (max-width: 768px) {
  .language-selector .language-label,
  .language-selector-header .language-label {
    display: none !important;
  }
  
  .language-selector .btn,
  .language-selector-header .btn {
    padding: 0.5rem !important;
  }
  
  /* Increase globe icon size on mobile */
  .language-selector .bi-globe,
  .language-selector-header .bi-globe {
    font-size: 1.5rem !important;
  }
}

/* Language dropdown items styling */
.language-selector .dropdown-item,
.language-selector-header .dropdown-item {
  padding: 0.75rem 1.5rem !important;
  text-decoration: none !important;
}

.language-selector .dropdown-item:hover,
.language-selector-header .dropdown-item:hover {
  text-decoration: none !important;
}

.language-selector .dropdown-item:focus,
.language-selector-header .dropdown-item:focus {
  text-decoration: none !important;
}

.language-selector .dropdown-item:active,
.language-selector-header .dropdown-item:active {
  text-decoration: none !important;
}

/* Footer Logo Styles */
.footer-logo img,
.site-footer .footer-logo img,
footer .footer-logo img {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}

/* Additional footer logo styles */
.footer-logo,
.site-footer .footer-logo,
footer .footer-logo {
  display: block;
}

.footer-logo img,
.site-footer .footer-logo img,
footer .footer-logo img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}


/* Specific footer logo image styles */
.footer-logo-img {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}

.site-footer .footer-logo-img {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}

/* Custom logo styles */
img.custom-logo {
  max-width: 100%;
  height: auto;
}


/* Ultra specific custom logo styles */
.site-footer img.custom-logo,
footer img.custom-logo,
#colophon img.custom-logo {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}

/* Text Page Template Styles */
.text-page-content {
    padding: 3rem 0;
}

.text-page-article {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 3rem;
    margin: 2rem 0;
}

.text-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color, #0066cc);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.text-page-excerpt {
    font-size: 1.25rem;
    color: #666;
    font-style: italic;
    line-height: 1.6;
}

.text-page-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.text-page-body p {
    margin-bottom: 1.5rem;
}

.text-page-body h1,
.text-page-body h2,
.text-page-body h3,
.text-page-body h4,
.text-page-body h5,
.text-page-body h6 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color, #0066cc);
    font-weight: 600;
}

.text-page-body h1 {
    font-size: 2rem;
}

.text-page-body h2 {
    font-size: 1.75rem;
}

.text-page-body h3 {
    font-size: 1.5rem;
}

.text-page-body h4 {
    font-size: 1.25rem;
}

.text-page-body h5,
.text-page-body h6 {
    font-size: 1.1rem;
}

/* Image spacing and styling in text pages */
.text-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 2rem 0;
    display: block;
}

.text-page-body .wp-block-image {
    margin: 2.5rem 0;
    text-align: center;
}

.text-page-body .wp-block-image img {
    margin: 0 auto;
}

.text-page-body .wp-block-image figcaption {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 0.75rem;
    text-align: center;
}

/* Lists styling */
.text-page-body ul,
.text-page-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.text-page-body li {
    margin-bottom: 0.75rem;
}

/* Blockquotes styling */
.text-page-body blockquote {
    border-left: 4px solid var(--primary-color, #0066cc);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-radius: 0 8px 8px 0;
}

/* Code styling */
.text-page-body code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.text-page-body pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.text-page-body pre code {
    background: none;
    padding: 0;
}

/* Tables styling */
.text-page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.text-page-body th,
.text-page-body td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.text-page-body th {
    background: var(--primary-color, #0066cc);
    color: #fff;
    font-weight: 600;
}

.text-page-body tr:hover {
    background: #f8f9fa;
}

/* Responsive adjustments for text pages */
@media (max-width: 768px) {
    .text-page-article {
        padding: 2rem 1.5rem;
        margin: 1rem 0;
    }
    
    .text-page-title {
        font-size: 2rem;
    }
    
    .text-page-excerpt {
        font-size: 1.1rem;
    }
    
    .text-page-body {
        font-size: 1rem;
    }
    
    .text-page-body img {
        margin: 1.5rem 0;
    }
    
    .text-page-body .wp-block-image {
        margin: 2rem 0;
    }
    
    .text-page-body blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .text-page-body table {
        font-size: 0.9rem;
    }
    
    .text-page-body th,
    .text-page-body td {
        padding: 0.75rem;
    }
} 