/**
 * Con Soluciones - Custom Styles
 * Extends the base StorEdge template styles
 */

/* ─── Scroll to Top Button ──────────────────────────────── */
.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--text-color);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    font-size: 18px;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--primary);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
}

/* ─── WhatsApp Floating Button ───────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    transition: all 0.4s ease;
    background: radial-gradient(
        circle at center,
        rgba(37, 99, 235, 1) 0%,
        rgba(21, 56, 133, 1) 100%
    );
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6), 0 0 40px rgba(21, 56, 133, 0.4);
    animation: glowPulse 3s infinite ease-in-out;
    color: var(--text-color);
    font-size: 24px;
    text-decoration: none;
}

.whatsapp-float:hover {
    background: transparent;
    border: 1px solid var(--text-color-2);
    color: #25D366;
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.8);
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.6), 0 0 40px rgba(21, 56, 133, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.8), 0 0 60px rgba(21, 56, 133, 0.6);
        transform: scale(1.05);
    }
}

/* ─── Toast Customization ───────────────────────────────── */
.toast-container {
    z-index: 9999;
}

.toast.text-bg-success {
    background-color: #198754 !important;
    border-radius: 8px;
}

.toast.text-bg-danger {
    background-color: #dc3545 !important;
    border-radius: 8px;
}

.toast .btn-close {
    filter: brightness(0) invert(1);
}

/* ─── Portfolio Filter ──────────────────────────────────── */
.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.portfolio-filter button,
.portfolio-filter a {
    padding: 10px 24px;
    border: 1px solid var(--outline-color);
    background: transparent;
    color: var(--text-color-2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-2);
    font-size: 14px;
    text-decoration: none;
}

.portfolio-filter button:hover,
.portfolio-filter button.active,
.portfolio-filter a:hover,
.portfolio-filter a.active {
    background: var(--accent-color);
    color: var(--text-color);
    border-color: var(--accent-color);
}

.portfolio-item {
    margin-bottom: 1.5rem;
}

.portfolio-item .portfolio-info h3 {
    color: #fff;
}

@media (max-width: 767px) {
    .portfolio-item {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    .portfolio-grid .portfolio-item {
        padding: 0 8px;
    }
}

/* ─── Portfolio Filter ──────────────────────────── */
.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 2rem;
}

.portfolio-filter button,
.portfolio-filter a {
    background: transparent;
    border: 1px solid var(--outline-color);
    color: var(--text-color-2);
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.portfolio-filter button:hover,
.portfolio-filter button.active,
.portfolio-filter a:hover,
.portfolio-filter a.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* ─── Service Cards (Detail Page) ───────────────────────── */
.service-detail-header {
    position: relative;
    padding: 2rem;
    border-radius: 16px;
    background: var(--accent-color-2);
    border: 1px solid var(--outline-color);
    overflow: hidden;
}

.service-benefits-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .service-benefits-list {
        grid-template-columns: 1fr;
    }
}

.service-benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.service-benefit-item i {
    color: var(--accent-color);
    font-size: 18px;
}

/* ─── Tech Tags ─────────────────────────────────────────── */
.tech-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50rem;
    background: var(--accent-color-2);
    border: 1px solid var(--outline-color);
    color: var(--text-color-2);
    font-size: 12px;
    font-family: var(--font-2);
    margin: 0.25rem;
}

/* ─── Pricing Note ──────────────────────────────────────── */
.pricing-note {
    text-align: center;
    color: var(--text-color-2);
    font-size: 14px;
    margin-top: 1rem;
    font-style: italic;
}

/* ─── Responsive adjustments ───────────────────────────── */
@media (max-width: 576px) {
    .scroll-top-btn {
        bottom: 90px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .text-footer {
        font-size: 120px !important;
    }
}

/* ─── Language Switcher Flag ───────────────────────────── */
.lang-flag {
    margin-right: 6px;
}

/* ─── Icon Box Small Uniform Size ──────────────────────── */
.icon-box.small {
    width: 38px;
    height: 38px;
    padding: 6px;
}

/* ─── Card Benefit Services ─────────────────────────── */
.card-benefit.services .icon-box img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.card-benefit.services .link {
    margin-top: auto;
    color: var(--accent-color);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    width: max-content;
}

.card-benefit.services .link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.card-benefit.services:hover .link {
    gap: 12px;
}

.card-benefit.services:hover .link::after {
    width: 100%;
}

.card-benefit.services .link i {
    transition: transform 0.3s ease;
}

.card-benefit.services:hover .link i {
    transform: translateX(4px);
}

/* ─── Hero Banner Responsive ───────────────────────────── */
@media (max-width: 768px) {
    h1 {
        font-size: 36px !important;
    }
    h2 {
        font-size: 32px !important;
    }
    h3 {
        font-size: 28px !important;
    }
    .section {
        padding: 3em 1em !important;
    }
}

/* ─── Preview Express Form ─────────────────────────── */
.preview-form .form-control,
.preview-form .form-control-sm {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--outline-color);
    color: var(--text-color);
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
}

.preview-form .form-control::placeholder {
    color: var(--text-color-2);
    opacity: 0.6;
}

.preview-form .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
    outline: none;
}

.preview-form select.form-control option {
    background: #1a1a2e;
    color: var(--text-color);
}

.preview-form .btn-sm {
    font-size: 13px;
    padding: 8px 16px;
}

/* ─── Footer Column Widths ──────────────────────── */
.footer-cols {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.footer-col {
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
}

/* md: 2 per row */
@media (min-width: 768px) {
    .footer-col {
        width: 50%;
    }
}

/* xl: 30 / 20 / 20 / 30 */
@media (min-width: 1200px) {
    .footer-col-1,
    .footer-col-4 {
        width: 30%;
    }
    .footer-col-2,
    .footer-col-3 {
        width: 20%;
    }
}

/* ─── Footer text mobile ──────────────────────────── */
@media (max-width: 767px) {
    .text-footer {
        font-size: 48px !important;
        margin-top: -20px !important;
        margin-bottom: 20px !important;
    }

    .footer-col-2,
    .footer-col-3 {
        display: none !important;
    }
}

/* ─── Service Detail Image Animations ─────────────── */
.bg-who-we-are img {
    transition: box-shadow 0.4s ease, filter 0.4s ease, scale 0.3s ease;
    cursor: pointer;
    backface-visibility: hidden;
}

.bg-who-we-are img:hover {
    scale: 1.06;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
    filter: brightness(1.04);
    z-index: 10;
    animation-play-state: paused;
}

.float-img-who {
    animation: floatImg1 6s ease-in-out infinite;
}

.float-img-who-2 {
    animation: floatImg2 7s ease-in-out infinite;
}

.float-img-who-3 {
    animation: floatImg3 8s ease-in-out infinite;
}

@keyframes floatImg1 {
    0%, 100% { transform: translate(-20%, -10%); }
    50% { transform: translate(-20%, -15%); }
}

@keyframes floatImg2 {
    0%, 100% { transform: translate(-70%, -35%); }
    50% { transform: translate(-70%, -40%); }
}

@keyframes floatImg3 {
    0%, 100% { transform: translate(-60%, -75%); }
    50% { transform: translate(-60%, -80%); }
}

/* ─── Service Detail Content Section ──────────── */
h3.services {
    font-size: 2rem;
    font-weight: 700;
}

h5.services {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent-color, #2563EB);
}

.choose-services {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.choose-services-item h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.choose-services-item p {
    font-size: 0.95rem;
    color: var(--text-color-2, #94A3B8);
    margin: 0;
}

.perfect-services {
    margin-top: 0.5rem;
}

.perfect-services ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.perfect-services ul li {
    padding-left: 1.5rem;
    position: relative;
}

.perfect-services ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color, #2563EB);
    font-weight: 700;
}

.perfect-services ul li p {
    margin: 0;
    font-size: 0.95rem;
}

/* ─── Button hover (pricing + general) ────────────── */
.btn-accent.primary:hover::before {
    background: var(--accent-color);
}

.icon-box,
.social-item {
    animation: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.social-item:hover,
.social-item.primary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.whatsapp-float {
    animation: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.whatsapp-float:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

/* ─── Reduce footer top spacing ─────────────────── */
footer .section {
    padding-top: 2em !important;
}

/* ─── Portfolio Detail Enhancements ─────────────── */
.portfolio-detail-badge {
    font-size: 0.85rem;
    padding: 0.35em 0.8em;
}

.portfolio-detail-sidebar .info-card {
    transition: transform 0.2s ease;
}
.portfolio-detail-sidebar .info-card:hover {
    transform: translateY(-2px);
}

/* Accordion numbered styling */
.accordion-item .accordion-header .accordion-button {
    font-weight: 500;
}
.accordion-item .accordion-header .accordion-button:not(.collapsed) {
    background: var(--accent-color-2);
    color: var(--text-color);
}

/* 404 block buttons spacing */
.card-banner .d-flex.gap-3 {
    margin-top: 1.5rem;
}

/* Responsive portfolio detail image */
@media (max-width: 991.98px) {
    .portfolio-detail-image {
        margin-bottom: 2rem;
    }
}

/* Portfolio filter - wrap buttons on small screens */
.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.portfolio-filter button,
.portfolio-filter a {
    white-space: nowrap;
}

/* ─── Portfolio Pagination ──────────────────────── */
.portfolio-pagination .page-link {
    background: var(--accent-color-2);
    border: 1px solid var(--outline-color);
    color: var(--text-color);
    padding: 0.6rem 1rem;
    margin: 0 0.15rem;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}
.portfolio-pagination .page-link:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
.portfolio-pagination .page-item.active .page-link {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* ─── Portfolio Slideshow ──────────────────────────────── */
.portfolio-slideshow {
    position: relative;
    overflow: hidden;
}
.portfolio-slideshow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(37,99,235,0) 0%, rgba(37,99,235,0.15) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}
.portfolio-item:hover .portfolio-slideshow::after {
    opacity: 1;
}
.portfolio-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1s ease,
                transform 4s ease;
    z-index: 0;
}
.portfolio-slide.active {
    opacity: 1;
    transform: scale(1.06);
    z-index: 1;
}
.portfolio-item:hover .portfolio-slide.active {
    opacity: 1;
}
.portfolio-slide:not(.active) {
    opacity: 0;
    z-index: 0;
}
.ps-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.portfolio-item:hover .ps-dots {
    opacity: 1;
}
.ps-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}
.ps-dot.active {
    background: #fff;
    box-shadow: 0 0 6px rgba(255,255,255,0.6);
    transform: scale(1.3);
}
.portfolio-item .portfolio-image {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
}
.portfolio-item .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.detail-slideshow {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}
.detail-slide {
    display: none;
    width: 100%;
    border-radius: 12px;
}
.detail-slide.active {
    display: block;
    animation: detailFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes detailFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.detail-slide-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 2;
    pointer-events: none;
}
.detail-slide-arrow {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.detail-slideshow:hover .detail-slide-arrow {
    opacity: 1;
}
.detail-slide-arrow:hover {
    background: rgba(37,99,235,0.7);
    transform: scale(1.1);
}
.detail-slide-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.detail-slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--outline-color, #555);
    cursor: pointer;
    transition: all 0.3s ease;
}
.detail-slide-dot.active {
    background: var(--accent-color, #2563eb);
    box-shadow: 0 0 8px rgba(37,99,235,0.5);
    transform: scale(1.2);
}

