/* Custom Styles for Caeté Embalagens */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0F5D92;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0A4064;
}

/* Header transition */
header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Hero: integra a foto ao fundo branco (laterais + topo + embaixo) */
#inicio .hero-fade-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    box-shadow:
        inset 0 72px 110px -36px #ffffff,
        inset 0 -72px 110px -36px #ffffff;
    background:
        linear-gradient(
            to bottom,
            #ffffff 0%,
            rgba(255, 255, 255, 0.92) 10%,
            rgba(255, 255, 255, 0.35) 22%,
            transparent 34%
        ),
        linear-gradient(
            to top,
            #ffffff 0%,
            rgba(255, 255, 255, 0.92) 10%,
            rgba(255, 255, 255, 0.35) 22%,
            transparent 34%
        ),
        linear-gradient(
            to right,
            #ffffff 0%,
            #ffffff 12%,
            rgba(255, 255, 255, 0.98) 24%,
            rgba(255, 255, 255, 0.88) 36%,
            rgba(255, 255, 255, 0.55) 48%,
            rgba(255, 255, 255, 0.18) 58%,
            transparent 72%
        );
}

#inicio .hero-photo-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1.25rem 0 1.5rem;
}

#inicio .hero-banner-img {
    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            rgba(0, 0, 0, 0.35) 14%,
            rgba(0, 0, 0, 0.85) 32%,
            #000 46%
        ),
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 5%,
            #000 14%,
            #000 86%,
            rgba(0, 0, 0, 0.2) 95%,
            transparent 100%
        );
    mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            rgba(0, 0, 0, 0.35) 14%,
            rgba(0, 0, 0, 0.85) 32%,
            #000 46%
        ),
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 5%,
            #000 14%,
            #000 86%,
            rgba(0, 0, 0, 0.2) 95%,
            transparent 100%
        );
    -webkit-mask-size: 100% 100%, 100% 100%;
    mask-size: 100% 100%, 100% 100%;
    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat: no-repeat, no-repeat;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    /* ~20% mais zoom vs 0.72 + leve empurrão à direita (origem à direita preserva alinhamento) */
    transform: translateX(clamp(0.25rem, 2.5vw, 1.75rem)) scale(0.864);
    transform-origin: right center;
}

/*
 * Tablet/desktop: foto em tela cheia (cover) + fade branco — igual ao mockup.
 * Antes: background com largura fixa deixava só branco à esquerda (corte 50/50).
 */
@media (min-width: 768px) {
    #inicio .hero-photo-layer {
        display: block;
        padding: 0;
        background-color: #ffffff;
        background-image: url("./caixas_banner.png");
        background-repeat: no-repeat;
        background-size: 70% auto;
        background-position: right center;
    }

    #inicio .hero-fade-overlay {
        box-shadow:
            inset 0 48px 72px -28px #ffffff,
            inset 0 -48px 72px -28px #ffffff;
        background:
            linear-gradient(
                to bottom,
                #ffffff 0%,
                rgba(255, 255, 255, 0.82) 5%,
                rgba(255, 255, 255, 0.12) 14%,
                transparent 26%
            ),
            linear-gradient(
                to top,
                #ffffff 0%,
                rgba(255, 255, 255, 0.82) 5%,
                rgba(255, 255, 255, 0.12) 14%,
                transparent 26%
            ),
            linear-gradient(
                to right,
                #ffffff 0%,
                #ffffff 12%,
                rgba(255, 255, 255, 0.95) 22%,
                rgba(255, 255, 255, 0.78) 32%,
                rgba(255, 255, 255, 0.45) 42%,
                rgba(255, 255, 255, 0.14) 52%,
                transparent 64%
            );
    }

    #inicio .hero-banner-img {
        display: none;
    }

    #inicio .hero-copy h1 {
        text-shadow:
            0 0 2px #ffffff,
            0 0 16px rgba(255, 255, 255, 0.98),
            0 0 32px rgba(255, 255, 255, 0.85),
            0 0 48px rgba(255, 255, 255, 0.55);
    }

    #inicio .hero-copy > p {
        text-shadow:
            0 0 2px #ffffff,
            0 0 12px rgba(255, 255, 255, 0.96),
            0 0 28px rgba(255, 255, 255, 0.75);
    }

    #inicio .hero-copy .inline-flex {
        box-shadow: 0 0 14px 8px rgba(255, 255, 255, 0.9);
    }

    #inicio .hero-copy .mt-12 span.font-medium {
        text-shadow:
            0 0 2px #ffffff,
            0 0 10px rgba(255, 255, 255, 0.94),
            0 0 24px rgba(255, 255, 255, 0.65);
    }
}

/* Produtos: botões "Solicitar Orçamento" alinhados na base de cada card (textos com alturas diferentes) */
#produtos .container > .grid.gap-8 {
    align-items: stretch;
}

#produtos .container > .grid.gap-8 > div {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#produtos .container > .grid.gap-8 > div > .p-6 {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

#produtos .container > .grid.gap-8 > div > .p-6 > button {
    margin-top: auto;
}

/* Hero background animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    transform: translateY(-1px);
}

/* Button ripple effect */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Card hover lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #0F5D92 0%, #E56A2C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0F5D92;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#mobile-menu.active {
    max-height: 500px;
    opacity: 1;
}

/* Image zoom on hover */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* Underline animation for links */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #0F5D92;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.875rem;
    }
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #0F5D92;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #0F5D92;
    color: white;
}