/* =====================================================
   CUSTOM CSS - Cofragem Algarve
   ===================================================== */

/* Smooth scroll fallback (caso JS falhe) */
html {
    scroll-behavior: smooth;
}

/* =====================================================
   MOBILE UX - Touch Targets
   ===================================================== */

/* Garantir mínimo de 44px para touch targets */
.btn, button, a.btn, [role="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* =====================================================
   SERVICE CARDS
   ===================================================== */

.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* =====================================================
   SCROLL BEHAVIOR
   ===================================================== */

html {
    scroll-behavior: smooth;
}

/* =====================================================
   FORM IFRAME STYLING
   ===================================================== */

.iframe-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    background: #f8fafc;
    border-radius: 1rem;
    overflow: hidden;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}

/* =====================================================
   FAQ ACCORDION
   ===================================================== */

.faq-item {
    border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    cursor: pointer;
    user-select: none;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

/* =====================================================
   TYPOGRAPHY ADJUSTMENTS
   ===================================================== */

/* Ensure proper heading hierarchy */
h1 { font-family: 'Playfair Display', serif; }
h2 { font-family: 'Playfair Display', serif; }
h3 { font-family: 'Montserrat', sans-serif; }

/* =====================================================
   FOCUS STATES (Accessibility)
   ===================================================== */

:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* =====================================================
   GALLERY HOVER EFFECTS
   ===================================================== */

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: white;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 10;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    header, footer, .sticky-bar, .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* =====================================================
   LOADING STATES
   ===================================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */

@media (max-width: 640px) {
    /* Stack CTA buttons vertically on small screens */
    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .cta-group > * {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* =====================================================
   STICKY MOBILE CTA BAR
   ===================================================== */

/* Safe area for iPhone notch/home indicator */
.safe-area-bottom {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

/* Add bottom padding to body when sticky CTA is visible (mobile only) */
@media (max-width: 1023px) {
    body {
        padding-bottom: 80px;
    }
}

/* Hide sticky CTA when footer is visible */
@media (min-width: 1024px) {
    #sticky-cta {
        display: none !important;
    }
}
