/* common.css */

.container-site {
    width: 100%;
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .container-site {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1024px) {
    .container-site {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

.app-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* Screen-reader only utility: visually hidden but accessible */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.page-main {
    flex: 1 1 auto;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(7, 18, 31, 0.94), rgba(7, 18, 31, 0.72));
    color: #f8fafc;
}

.page-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.page-hero__background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(8,78,50,0.85), rgba(8,78,50,0.85));
    pointer-events: none;
}

.page-hero__inner {
    position: relative;
    z-index: 1;
    padding-top: 1.28rem;
    padding-bottom: 1.28rem;
    text-align: center;
}

.page-hero.page-hero--compact .page-hero__inner {
    padding-top: 1.28rem;
    padding-bottom: 1.28rem;
}

@media (min-width: 768px) {
    .page-hero.page-hero--compact .page-hero__inner {
        padding-top: 1.6rem;
        padding-bottom: 1.6rem;
    }
}

.page-hero__content {
    max-width: 46rem;
    margin: 0 auto;
}

.page-hero__content--light {
    color: #f8fafc;
}

.page-hero__title {
    margin: 0;
    font-family: var(--font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: clamp(1.54rem, 3.64vw, 2.52rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    word-break: break-word;
    overflow-wrap: break-word;
}

.page-hero__description {
    margin: 0.54rem auto 0;
    max-width: 60rem;
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(248, 250, 252, 0.9);
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    margin-top: 0.64rem;
    justify-content: center;
}

.page-hero__actions .btn {
    min-width: 12rem;
    padding: 0.95rem 1.5rem;
    border-radius: 999px;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    justify-content: center;
}

.page-hero__actions .btn-secondary {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.page-hero__actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.26);
}

.page-hero__actions .btn-outline,
.page-hero__actions .btn-outline-dark {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.page-hero__actions .btn-outline:hover,
.page-hero__actions .btn-outline-dark:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Buttons: consistent CTA styles used across site */
.btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.65rem 1rem; border-radius: 12px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease; will-change: transform; }
.btn--primary { background: linear-gradient(135deg, #19c46d 0%, #226e0b 100%); color: #ffffff; box-shadow: 0 12px 30px -18px rgba(30, 166, 98, 0.24); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 20px 55px -26px rgba(30, 166, 98, 0.22); }
.btn--outline { background: #ffffff; border: 1px solid rgba(15,23,42,0.06); color: #0f172a; box-shadow: 0 6px 18px -8px rgba(15,23,42,0.04); }
.btn--outline:hover { transform: translateY(-1px); box-shadow: 0 14px 40px -20px rgba(15,23,42,0.06); }

/* Card base: standardize look for feature cards and sidebar cards */
.card { background: #ffffff; border-radius: 14px; padding: 1rem; border: 1px solid rgba(15,23,42,0.06); box-shadow: 0 8px 24px -20px rgba(15,23,42,0.06); }
.card-hover { transition: transform 180ms ease, box-shadow 180ms ease; will-change: transform; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 20px 60px -30px rgba(15,23,42,0.08); }


.section-heading {
    max-width: 48rem;
    margin: 0 auto;
}

.section-heading--center {
    text-align: center;
}

.section-heading--left {
    text-align: left;
}

.section-heading.section-heading--left {
    max-width: none;
    width: 100%;
    margin: 0 0 1rem 0;
}

.section-heading__title,
.home-section-title,
.about-section-heading__title,
.contact-section__title,
.faq-list-section__title {
    margin: 0 0 0.75rem;
    /* Uses global h2 typography system for consistency */
    text-transform: none;
}

.home-section-title {
    text-align: center;
}

.cta-banner-section--dark .home-section-title {
    color: #ffffff;
}

.section-heading__subtitle {
    margin: 1rem 0 0;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    color: #64748b;
    max-width: 46rem;
}

.section-heading--center .section-heading__subtitle {
    margin-left: auto;
    margin-right: auto;
}

.section-heading--left .section-heading__subtitle {
    max-width: 42rem;
}

.page-alert-section {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}

.alert {
    border-radius: var(--radius-xl);
    border: 1px solid transparent;
    padding: var(--space-4);
    font-weight: 600;
    line-height: 1.5;
}

.alert--success {
    background-color: var(--brand-50);
    border-color: rgba(34, 197, 94, 0.25);
    color: var(--brand-800);
    box-shadow: var(--shadow-sm);
}

.lead-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    contain: layout paint style;
}

.lead-popup-backdrop.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.lead-popup-backdrop:not(.is-hidden) {
    opacity: 1;
    visibility: visible;
}

.lead-popup-heading {
    margin-top: var(--space-5);
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--stone-900);
    line-height: 1.1;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--stone-700);
    margin-bottom: 0.5rem;
}

.form-grid {
    display: grid;
    gap: var(--space-4);
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-grid__item--full-span {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

@media (min-width: 640px) {
    .form-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.btn--full-width {
    width: 100%;
}

@media (min-width: 640px) {
    .btn--responsive {
        width: auto;
    }
}

.btn--centered {
    text-align: center;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.product-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-card__media {
    position: relative;
    overflow: hidden;
    background-color: var(--brand-50);
    aspect-ratio: 4 / 3;
}

/* Factory features (shared) */
.factory-features__intro { max-width: 48rem; margin: 0 auto 1.5rem; text-align: center; }
.factory-features__lead { margin-top: 1rem; color: var(--stone-600); font-size: 0.95rem; line-height: 1.6; }

.factory-features-grid { margin-top: 1.5rem; display: grid; gap: 1.5rem; grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width: 640px) { .factory-features-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .factory-features-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

.factory-feature-card { overflow: hidden; border-radius: 0.75rem; border: 1px solid rgba(15,23,42,0.06); background: #ffffff; padding: 1rem; box-shadow: 0 6px 18px -8px rgba(15,23,42,0.06); transition: transform 200ms ease, box-shadow 200ms ease; }
.factory-feature-card:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -20px rgba(15,23,42,0.08); }

.factory-feature-card__inner { display: flex; align-items: flex-start; gap: 1rem; }
.factory-feature-card__icon { width: 2.5rem; height: 2.5rem; display:flex; align-items:center; justify-content:center; border-radius:0.5rem; background: rgba(16,185,129,0.06); color: #047857; }
.factory-feature-card__icon-svg { width: 1.25rem; height: 1.25rem; }
.factory-feature-card__content { flex:1; }
.factory-feature-card__title { margin: 0; font-size: 0.665rem; font-weight: 700; color: var(--stone-900); }
.factory-feature-card__desc { margin: 0.25rem 0 0; font-size: 0.75rem; color: var(--stone-600); line-height: 1.4; }

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(7, 44, 30, 0.16) 0%, rgba(7, 44, 30, 0.04) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.product-card:hover .product-card__overlay {
    opacity: 1;
}

.product-card__body {
    flex: 1;
    padding: 1.25rem;
}

.product-card__category {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-700);
}

.product-card__title {
    margin: 0.25rem 0 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--stone-900);
    transition: color var(--transition-fast);
}

.product-card:hover .product-card__title {
    color: var(--brand-800);
}

.product-card__excerpt {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--stone-600);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-700);
    transition: color var(--transition-fast);
}

.product-card:hover .product-card__cta {
    color: var(--brand-900);
}

.product-card__cta-icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    transition: transform var(--transition-fast);
}

.product-card:hover .product-card__cta-icon {
    transform: translateX(0.125rem);
}

/* Sticky CTA Component - Floating Action Buttons */
.sticky-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    pointer-events: none;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    overflow: visible;
}

.sticky-cta > * {
    pointer-events: auto;
    flex-shrink: 0;
}

.sticky-cta__whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 50%;
    background-color: #10b981;
    color: white;
    text-decoration: none;
    border: none;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.sticky-cta__whatsapp:hover {
    transform: scale(1.05);
    background-color: #059669;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.sticky-cta__whatsapp svg {
    width: 28px;
    height: 28px;
}

.sticky-cta__quote {
    height: 48px;
    min-height: 48px;
    padding: 0 24px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 15px;
    font-weight: 600;
}

.sticky-cta__quote:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .sticky-cta {
        bottom: 18px;
        right: 18px;
        gap: 12px;
        max-width: calc(100vw - 36px);
        max-height: calc(100vh - 36px);
    }
    
    .sticky-cta__whatsapp {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
    
    .sticky-cta__whatsapp svg {
        width: 24px;
        height: 24px;
    }
    
    .sticky-cta__quote {
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 20px !important;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .sticky-cta {
        bottom: 16px;
        right: 16px;
        gap: 10px;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
    }
    
    .sticky-cta__whatsapp {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .sticky-cta__whatsapp svg {
        width: 20px;
        height: 20px;
    }
    
    .sticky-cta__quote {
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 16px !important;
        font-size: 13px;
    }
}
