/* Modern Card Design - Enhanced UI/UX */

/* Hero Section Enhancements */
.services-hero {
    position: relative;
    background-image: url('images/Comprehensive Water Solutions.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 75vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.6);
    font-weight: 500;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-main-btn, .hero-secondary-btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-main-btn:hover, .hero-secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: white;
    font-size: 2rem;
    opacity: 0.8;
}

/* Enhanced Search and Filter Section */
.search-filter-container {
    margin-top: 3rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.search-filter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
}

/* Search Bar Enhancement */
.search-bar {
    position: relative;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar .form-control {
    padding: 1rem 3.5rem 1rem 1.5rem;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-bar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-bar .form-control:focus {
    border-color: #0d6efd;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-bar .form-control:focus + .search-icon {
    color: #0d6efd;
}

/* Clear Search Button */
.clear-search {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 0.25rem;
    border-radius: 50%;
}

.clear-search:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.search-bar .form-control:not(:placeholder-shown) + .search-icon + .clear-search {
    opacity: 1;
}

/* Enhanced Filter Buttons */
.service-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #0d6efd, #198754, #dc3545);
    border-color: #0d6efd;
    color: white;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active::before {
    left: 100%;
}

.filter-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.filter-btn:hover i {
    transform: scale(1.1);
}

/* Filter Statistics */
.filter-stats {
    margin-top: 1.5rem;
    text-align: center;
}

.filter-stats #serviceCount {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-stats #serviceCount i {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Clear Filters Button */
.clear-filters-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.clear-filters-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Services Section */
.services-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
}

.services-header {
    margin-bottom: 3rem;
}

.services-header-icon {
    font-size: 3rem;
    color: #0d6efd;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #0d6efd, #198754, #dc3545);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-description {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
}

/* Service Filter Buttons */
.service-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid #0d6efd;
    background: transparent;
    color: #0d6efd;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover, .filter-btn.active {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Enhanced Services Cards Section */
.services-cards-section {
    background: #f8f9fa;
    padding: 4rem 0;
    position: relative;
}

.grid-container {
    width: min(85rem, 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
    gap: 2.5rem;
    padding: 0 1rem;
}

/* Modern Clean Service Cards */
.parent {
  width: 290px;
  height: 300px;
  perspective: 1000px;
}

.card {
  height: 100%;
  border-radius: 16px;
  background: #ffffff;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e1e5e9;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3da9fc, #198754, #dc3545);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.glass {
  transform-style: preserve-3d;
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  transform: translate3d(0px, 0px, 1px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.content {
  padding: 90px 25px 25px 25px;
  transform: translate3d(0, 0, 2px);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: calc(100% - 70px);
}

.content .title {
  display: block;
  color: #2c3e50;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 15px;
  line-height: 1.4;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.content .text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  color: #6c757d;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 0;
  text-align: left;
  flex: 1;
  overflow: hidden;
}

.bottom {
  padding: 0 30px 20px 30px;
  transform-style: preserve-3d;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transform: translate3d(0, 0, 2px);
}

.bottom .view-more {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  color: #3da9fc;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.bottom .view-more:hover {
  color: #0056b3;
  transform: translateX(4px);
}

.bottom .view-more .view-more-button {
  background: none;
  border: none;
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  cursor: pointer;
}

.bottom .view-more .svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.bottom .view-more:hover .svg {
  transform: translateX(4px);
}

.logo {
  position: absolute;
  top: 20px;
  right: 20px;
  transform-style: preserve-3d;
  z-index: 3;
}

.logo .circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3da9fc, #198754);
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(61, 169, 252, 0.3);
  transition: all 0.3s ease;
}

.card:hover .logo .circle {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 6px 20px rgba(61, 169, 252, 0.4);
}

/* Call to Action */
.services-cta {
    margin-top: 4rem;
    padding: 3rem;
    background: linear-gradient(135deg, #007bff, #6610f2);
    border-radius: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.services-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.6);
    font-weight: 600;
}

.services-main-cta {
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.services-main-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(30, 58, 138, 0.2);
    }
}

@keyframes cardLift {
    0% {
        transform: translateY(0px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
    50% {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }
}

@keyframes iconRotate {
    0% { transform: scale(1.1) rotate(10deg); }
    25% { transform: scale(1.15) rotate(20deg); }
    50% { transform: scale(1.1) rotate(10deg); }
    75% { transform: scale(1.05) rotate(-5deg); }
    100% { transform: scale(1.1) rotate(10deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-filters {
        gap: 0.25rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .service-card .card-body {
        padding: 1.5rem;
    }

    .service-card .card-title {
        font-size: 1.3rem;
    }

    .services-cta {
        padding: 2rem 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .service-card {
        margin-bottom: 1.5rem;
    }

    .service-tags .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .service-card, .filter-btn, .hero-main-btn, .hero-secondary-btn, .services-main-cta {
        animation: none;
        transition: none;
    }

    .hero-scroll-indicator {
        animation: none;
    }

    .service-card::after {
        animation: none;
    }

    .services-cta::before {
        animation: none;
    }
}

/* Card Icon Styles */
.card-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a !important;
    font-size: 2rem !important;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(30, 58, 138, 0.1);
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.25);
    background: rgba(255, 255, 255, 1);
}

/* Focus States */
.filter-btn:focus, .hero-main-btn:focus, .hero-secondary-btn:focus, .services-main-cta:focus,
.search-bar .form-control:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.service-card:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 4px;
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}


 /* Update filter button styles for new cards */
.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid #0d6efd;
    background: transparent;
    color: #0d6efd;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover, .filter-btn.active {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}
/* Update services section background for new cards */
.services-cards-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    position: relative;
}
/* Update grid container for new cards */
.grid-container {
    width: min(85rem, 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
    gap: 2.5rem;
    padding: 0 1rem;
}
