/* =====================================================
   ARTISTAS PERU - Custom Styles
   Only extras that Tailwind doesn't cover
   ===================================================== */

/* --- Typography --- */
body {
    font-family: 'Work Sans', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: 'Montserrat', sans-serif;
}

.font-bold,
.font-semibold,
.font-medium {
    font-family: 'Montserrat', sans-serif;
}

/* --- Section Centering --- */
.detail-section>div:first-child {
    text-align: center;
}

.detail-section>div:first-child>h2,
.detail-section>div:first-child>p {
    text-align: center;
}

.detail-section>div:first-child>h2+p {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Center ALL buttons in detail sections */
.detail-section>div>button,
.detail-section>div>a.cta-primary {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: fit-content;
}

/* Center info boxes text */
.detail-section .bg-primary-50,
.detail-section .bg-blue-50 {
    text-align: center;
}

/* Keep grid content left-aligned for readability */
.detail-section .grid p,
.detail-section .grid h3 {
    text-align: left;
}


/* --- Hero Video Mute Toggle Button --- */
.hero-video-wrapper {
    position: relative;
}

.hero-mute-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.08);
}

.hero-mute-btn.active {
    background: rgba(180, 39, 28, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
}


/* --- Scroll Reveal Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reveal animation classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Staggered animation delays for cards */
.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

/* Hero entrance animations */
.hero-animate {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-animate-delay-1 {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-animate-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.hero-animate-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.hero-animate-delay-4 {
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

/* Hero Video Background */
.hero-video-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    /* Above fallback image */
}

#hero-video-player,
.hero-video-element {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%) scale(1.05);
    /* Slight scale to prevent edge gaps */
    pointer-events: none;
    object-fit: cover;
    z-index: 1;
}

/* Loading Screen */
#loading-screen {
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Water Fill Logo Animation */
.logo-water-fill-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.logo-empty {
    width: 100%;
    height: 100%;
    opacity: 0.2;
    filter: grayscale(100%);
}

.logo-fill-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: inset(100% 0 0 0);
    animation: water-fill 2.5s ease-in-out forwards;
}

.logo-filled {
    width: 100%;
    height: 100%;
}

/* Water Wave Effect */
.water-wave {
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 25%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.4) 75%,
            transparent 100%);
    animation: wave-move 1s ease-in-out infinite, wave-rise 2.5s ease-in-out forwards;
    opacity: 0.8;
    border-radius: 50%;
}

@keyframes water-fill {
    0% {
        clip-path: inset(100% 0 0 0);
    }

    100% {
        clip-path: inset(0% 0 0 0);
    }
}

@keyframes wave-rise {
    0% {
        bottom: 0;
    }

    100% {
        bottom: 100%;
    }
}

@keyframes wave-move {

    0%,
    100% {
        transform: translateX(-5px) scaleY(1);
    }

    50% {
        transform: translateX(5px) scaleY(1.5);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* --- Floating WhatsApp Button --- */
.floating-whatsapp {
    animation: pulse-glow 2s infinite;
}

.floating-whatsapp:hover {
    animation: float 0.5s ease-in-out;
    transform: scale(1.1);
}

/* --- Service Cards Hover Effect --- */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* --- Header Sticky --- */
.header-sticky {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* --- Filter Chips --- */
.filter-chip {
    transition: all 0.2s ease;
}

.filter-chip:hover {
    transform: scale(1.05);
}

/* --- Lightbox --- */
.lightbox {
    backdrop-filter: blur(5px);
}

.lightbox img {
    max-height: 90vh;
    max-width: 95vw;
}

/* --- FAQ Accordion --- */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item button {
    transition: background-color 0.2s ease;
}

.faq-item button:hover {
    background-color: #f3f4f6;
}

.faq-content {
    animation: fadeIn 0.3s ease;
}

/* --- Gallery Grid --- */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- Combo Cards --- */
.combo-card {
    transition: all 0.3s ease;
}

.combo-card:hover {
    transform: translateY(-8px);
}

/* --- Gradient Backgrounds --- */
.gradient-hero {
    background: linear-gradient(135deg, #0f2068 0%, #1a3090 100%);
}

/* --- Premium Hero Styles --- */
.hero-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: brightness(0.35);
    transform: scale(1.05);
    /* Match video scale */
    transition: opacity 0.5s ease;
}

.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            transparent 100%);
    z-index: 2;
    /* Above video */
}

.hero-pattern-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 3;
    /* Top layer of background */
}

/* Experience Badge */
.experience-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(180, 39, 28, 0.3);
    }

    50% {
        box-shadow: 0 0 35px rgba(180, 39, 28, 0.5);
    }
}

/* Hero Title */
.hero-title {
    font-size: 2.75rem;
    line-height: 1.1;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
}

@media (min-width: 1024px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* Service Tags */
.hero-service-tags {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 480px) {
    .hero-service-tags {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hero-service-tags span {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    cursor: default;
    white-space: nowrap;
    width: 100%;
}

.hero-service-tags span:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Decorative Circle */
.hero-decoration-circle {
    position: absolute;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(180, 39, 28, 0.2);
    border-radius: 50%;
    top: -100px;
    right: -150px;
    animation: spin-slow 45s linear infinite;
    pointer-events: none;
}

.hero-decoration-circle::before {
    content: '';
    position: absolute;
    inset: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Decorative Lines */
.hero-decoration-lines {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    pointer-events: none;
}

/* Hero CTA styling */
.hero-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.hero-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.hero-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.gradient-section {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* --- Trust Cards --- */
.trust-card {
    position: relative;
    overflow: hidden;
}

.trust-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #b4271c;
    /* Solid Red */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trust-card:hover::before {
    opacity: 1;
}

/* --- Form Inputs Focus --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* --- CTA Buttons --- */
.cta-primary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-primary:hover::before {
    left: 100%;
}

/* --- Detail Sections --- */
.detail-section {
    scroll-margin-top: 100px;
}

/* --- Mobile Bottom Bar --- */
.mobile-bottom-bar {
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* --- Loading Placeholder for Images --- */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hero-text {
        text-align: center;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Section Headers --- */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #b4271c;
    /* Solid Red */
    border-radius: 2px;
}

/* --- Scrollbar Custom (optional) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #b4271c;
    /* Solid Red */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #961810;
    /* Darker Red */
}

/* --- Selection Color --- */
::selection {
    background: #0f2068;
    color: white;
}

/* --- Services Video Section (Full Width with Stats Overlay) --- */
.services-video-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0f2068;
}

.services-video-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.services-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(15, 32, 104, 0.15) 0%,
            rgba(15, 32, 104, 0.05) 30%,
            rgba(15, 32, 104, 0.05) 70%,
            rgba(15, 32, 104, 0.15) 100%);
    pointer-events: none;
}


/* Subtle border effect */
.services-video-section::before,
.services-video-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0f2068, #b4271c, #0f2068);
    z-index: 10;
}

.services-video-section::before {
    top: 0;
}

.services-video-section::after {
    bottom: 0;
}

/* --- Enhanced Detail Sections Utilities --- */

/* Background Patterns */
.bg-pattern-dots {
    background-image: radial-gradient(#0f206822 1px, transparent 1px);
    background-size: 20px 20px;
}

.bg-pattern-dots-red {
    background-image: radial-gradient(#b4271c11 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Section Accents */
.accent-line-indigo {
    position: relative;
}

.accent-line-indigo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0f2068, #3e52a1);
}

.accent-line-red {
    position: relative;
}

.accent-line-red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #b4271c, #e6422d);
}

/* Glass Info Pills */
.info-pill-glass {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(15, 32, 104, 0.1);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f2068;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.info-pill-glass:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Icon Feature Card */
.feature-card-vibrant {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 32, 104, 0.05);
    transition: all 0.3s ease;
}

.feature-card-vibrant:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-card-vibrant i {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

/* Alternating Section Gradients */
.bg-subtle-indigo {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.bg-subtle-red {
    background: linear-gradient(180deg, #fffafb 0%, #fff1f2 100%);
}

/* Custom Quote/Highlight */
.pro-quote {
    position: relative;
    padding: 2rem;
    background: #0f2068;
    color: white;
    border-radius: 1rem;
    overflow: hidden;
}

.pro-quote::after {
    content: '"';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 8rem;
    font-family: serif;
    opacity: 0.1;
    color: white;
}

/* --- Print Styles --- */
@media print {

    .floating-whatsapp,
    .mobile-bottom-bar,
    nav {
        display: none !important;
    }
}

/* --- Gallery Transformation: Portfolio Styles --- */
.gallery-item {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 32, 104, 0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.gallery-project-label {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-project-label {
    opacity: 1;
    transform: translateY(0);
}

.label-category {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
    display: block;
}

.label-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    display: block;
}

/* Fix for contain-colored backgrounds - make them cover for consistency */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
}

/* Animation for mobile submenu */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}