/* Buttons */
.btn-secondary-custom {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--secondary-foreground);
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: var(--radius);
    box-shadow: 0 0 20px rgba(242, 153, 17, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-secondary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(242, 153, 17, 0.6);
    color: var(--secondary-foreground);
}

/* Animations */
@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(194, 255, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(194, 255, 0, 0.6);
    }
}

.animate-glow-pulse {
    animation: glow-pulse 2s infinite;
}

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.text-reveal {
    clip-path: inset(100% 0 0 0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-reveal.active {
    clip-path: inset(0 0 0 0);
}

/* Service Cards Modernized */
.service-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    padding: 3rem 2.2rem;
    background: white;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.05), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: rgba(var(--primary-rgb), 0.1);
    background: #C0C0C0;
    color: #000000;
}

.service-card:hover h2,
.service-card:hover h3,
.service-card:hover p,
.service-card:hover li,
.service-card:hover .text-muted {
    color: #000000 !important;
}

.service-card .icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #f8fafc;
    color: var(--primary);
    position: relative;
}

.service-card .icon-wrapper::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 24px;
    background: currentColor;
    opacity: 0.1;
    transform: scale(0);
    transition: transform 0.5s ease;
}

.service-card:hover .icon-wrapper {
    transform: translateY(-5px) rotate(8deg);
    color: white !important;
    background: var(--primary) !important;
}

.service-card:hover .icon-wrapper::before {
    transform: scale(1.1);
}

.service-card h2,
.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #1e293b;
    transition: color 0.3s ease;
}

.service-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.service-card .learn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
    margin-top: auto;
    transition: gap 0.3s ease;
}

.service-card:hover .learn-more {
    gap: 0.8rem;
}

/* Specific Card Themes */
.card-electrica:hover {
    border-bottom: 5px solid #f59e0b;
}

.card-electrica:hover .icon-wrapper {
    background: #f59e0b !important;
}

.card-hidraulica:hover {
    border-bottom: 5px solid #0ea5e9;
}

.card-hidraulica:hover .icon-wrapper {
    background: #0ea5e9 !important;
}

.card-pintura:hover {
    border-bottom: 5px solid #10b981;
}

.card-pintura:hover .icon-wrapper {
    background: #10b981 !important;
}

.card-alvenaria:hover {
    border-bottom: 5px solid #f97316;
}

.card-alvenaria:hover .icon-wrapper {
    background: #f97316 !important;
}

.card-reparos:hover {
    border-bottom: 5px solid #8b5cf6;
}

.card-reparos:hover .icon-wrapper {
    background: #8b5cf6 !important;
}

.service-card.card-emergency {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: none;
    color: white;
}

.service-card.card-emergency h3,
.service-card.card-emergency p,
.service-card.card-emergency .learn-more {
    color: white !important;
}

.service-card.card-emergency .icon-wrapper {
    background: rgba(255, 255, 255, 0.1);
    color: #38bdf8;
}

.service-card.card-emergency:hover .icon-wrapper {
    background: #38bdf8 !important;
    color: #0f172a !important;
}

/* Testimonials Carousel */
.testimonial-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 1rem 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .testimonial-slide {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (min-width: 992px) {
    .testimonial-slide {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

/* Fixed Elements */
.whatsapp-fixed {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: bounce-slow 2s infinite;
}

@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Region Card Premium - Metropolitana Variation */
.region-card-premium[data-region="Metropolitana"] {
    background: linear-gradient(145deg, var(--card) 0%, #f1f5f9 100%);
    border: 1px solid rgba(13, 110, 253, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    grid-column: 1 / -1;
    /* Make it full width if possible in the grid */
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .region-card-premium[data-region="Metropolitana"] {
        flex-direction: row;
        align-items: stretch;
    }

    .region-card-premium[data-region="Metropolitana"] .region-header {
        width: 300px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        border-bottom: none;
        border-right: 1px solid var(--border);
        background: linear-gradient(to bottom, rgba(13, 110, 253, 0.05), transparent);
    }

    .region-card-premium[data-region="Metropolitana"] .region-icon-wrapper {
        margin-bottom: 1rem;
    }
}

.region-card-premium[data-region="Metropolitana"] .region-icon-wrapper {
    background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.region-card-premium[data-region="Metropolitana"] .neighborhood-link {
    background: white;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.region-card-premium[data-region="Metropolitana"] .neighborhood-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.region-card-premium[data-region="Metropolitana"] .neighborhood-link i {
    color: var(--primary);
}

.region-card-premium[data-region="Metropolitana"] .neighborhood-link:hover i {
    color: white;
}

#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Badges */
.badge-soft-primary {
    background-color: rgba(41, 70, 116, 0.1);
    color: #294674;
    font-weight: 600;
}

.badge-soft-accent {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 600;
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(41, 70, 116, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: white;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Section Divider */
.section-divider {
    height: 1px;
    width: 100%;
    margin: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(41, 70, 116, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    position: relative;
    overflow: hidden;
}

.section-asymmetric {
    position: relative;
    padding-bottom: 80px !important;
}

.section-asymmetric::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--background);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}