/* ==========================================================================
   GRUPO FOGLIATTO - DESIGN SYSTEM DASHBOARD TELA CHEIA (100VH)
   ========================================================================== */

/* 1. Global Reset & Variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette */
    --color-bg-base: #03050c;
    --color-bg-surface: rgba(10, 17, 35, 0.45);
    --color-border-subtle: rgba(255, 255, 255, 0.05);
    --color-border-glow: rgba(0, 229, 255, 0.25);
    
    --color-brand-cyan: #00e5ff;
    --color-brand-blue: #0072ff;
    --color-brand-green: #25d366;
    
    /* Typography */
    --font-header: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Transitions */
    --transition-premium: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Core Layout (Forced 100vh viewport) */
body {
    background-color: var(--color-bg-base);
    color: #E5E7EB;
    font-family: var(--font-body);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    line-height: 1.5;
}

/* Hexagonal background image at low opacity */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/bg-premium.png') no-repeat center center / cover;
    opacity: 0.12;
    z-index: -3;
    pointer-events: none;
}


/* Interactive Background Canvas */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(3, 5, 12, 0.5) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Sphere Watermark — left side, low opacity */
.sphere-watermark {
    position: fixed;
    left: -6vw;
    bottom: -4vh;
    width: 38vw;
    height: 38vw;
    background: url('img/lobaa.svg') no-repeat center center / contain;
    opacity: 0.15;
    mix-blend-mode: screen;
    z-index: 0;
    pointer-events: none;
    animation: sphereFloat 14s ease-in-out infinite;
}

@keyframes sphereFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

/* Dashboard Core Layout */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2.5rem 3rem 1.5rem 3rem;
    gap: 2rem;
}

/* 3. Header Section (Centered & Compact) */
.dashboard-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Logo Box — PNG já tem fundo transparente e arte em branco */
.logo-box {
    position: relative;
    display: inline-block;
    padding: 0.5rem;
    background: transparent;
    border-radius: 12px;
}

.brand-logo {
    max-width: 260px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 18px rgba(0, 198, 255, 0.15));
}

.header-main-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.25rem;
}

.header-title {
    font-family: var(--font-header);
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #FFFFFF;
}

.gradient-text {
    background: linear-gradient(135deg, #FFFFFF 10%, var(--color-brand-cyan) 80%, var(--color-brand-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glowing Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.1), inset 0 0 12px rgba(0, 229, 255, 0.05);
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--color-brand-cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--color-brand-cyan);
    animation: glowPulse 2s infinite ease-in-out;
}

.badge-label {
    font-family: var(--font-header);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--color-brand-cyan);
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* Animated Gear in Badge */
.gear-icon {
    width: 30px;
    height: 30px;
    color: var(--color-brand-cyan);
    animation: spinGear 6s linear infinite;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
}

@keyframes spinGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header-subtitle {
    font-size: 1.1rem;
    color: #9CA3AF;
    max-width: 720px;
    line-height: 1.6;
}

/* 4. Main Section (Flexible viewport grid) */
.dashboard-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    width: 100%;
}

.company-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    width: 100%;
    height: 100%;
    max-height: 52vh; /* Fixed vertical ceiling to prevent scroll */
}

/* 5. Company Cards */
.company-card {
    position: relative;
    border-radius: 20px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-subtle);
    backdrop-filter: blur(15px);
    overflow: hidden;
    height: 100%;
    transition: var(--transition-premium);
    opacity: 0;
    animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--card-index) * 0.12s);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 114, 253, 0.04) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
    transition: var(--transition-premium);
}

.company-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-border-glow);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 198, 255, 0.08);
}

.company-card:hover .card-glow {
    transform: scale(1.1);
}

.card-content {
    padding: 1.75rem 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Logo Area */
.logo-area {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.company-img {
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
    /* CSS Magic to remove white background and turn logos into clean white vectors */
    filter: grayscale(1) invert(1) brightness(100);
    mix-blend-mode: screen;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Aero Tangará — keep white filter like the others */
.aero-logo {
    max-height: 70px;
}

/* Fallback Styling */
.company-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.5rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    width: 100%;
}

.fallback-svg {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.5s ease;
}

.fallback-tag {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
    color: #FFFFFF;
}

/* Fallback Colors */
.fb-pedreira { background: linear-gradient(135deg, #1b263b, #415a77); border-color: rgba(112, 128, 144, 0.3); }
.fb-aero { background: linear-gradient(135deg, #0d1b2a, #0077b6); border-color: rgba(0, 198, 255, 0.3); }
.fb-nelore { background: linear-gradient(135deg, #091a1a, #0f4c4c); border-color: rgba(20, 184, 166, 0.3); }
.fb-cimento { background: linear-gradient(135deg, #22252a, #3c4149); border-color: rgba(100, 116, 139, 0.3); }
.fb-vale { background: linear-gradient(135deg, #0d1f2d, #1d3557); border-color: rgba(3, 105, 161, 0.3); }

.company-card:hover .fallback-svg {
    transform: scale(1.1);
}

.propeller-anim:hover {
    animation: rotatePropeller 2s linear infinite;
}

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

/* Card Info */
.card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    margin-bottom: 1.25rem;
}

.company-history-tag {
    font-family: var(--font-header);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-brand-cyan);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    padding: 0.2rem 0.65rem;
    background: rgba(0, 229, 255, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(0, 229, 255, 0.15);
    display: inline-block;
}

.company-title {
    font-family: var(--font-header);
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    text-align: center;
}

.company-summary {
    color: #9CA3AF;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
    text-align: center;
}

/* WhatsApp Button — icon on left, text on right */
.card-action {
    margin-top: auto;
}

.wpp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    text-decoration: none;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-premium);
    overflow: hidden;
    position: relative;
}

/* Big WhatsApp icon on the left */
.wpp-btn-icon-left {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.25);
    flex-shrink: 0;
    transition: var(--transition-premium);
}

.svg-wpp-big {
    width: 26px;
    height: 26px;
}

.wpp-btn-text {
    text-align: center;
    line-height: 1.2;
}

.wpp-link:hover {
    background: linear-gradient(135deg, var(--color-brand-green) 0%, #1ebd5a 100%);
    border-color: var(--color-brand-green);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    transform: scale(1.02);
}

.wpp-link:hover .wpp-btn-icon-left {
    background: #FFFFFF;
    transform: rotate(15deg) scale(1.1);
    border-color: transparent;
}

.wpp-link:hover .svg-wpp-big {
    color: var(--color-brand-green);
}

/* 6. Footer (Centered & Compact) */
.dashboard-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dashboard-footer p {
    font-size: 0.75rem;
    color: #4B5563;
}

.footer-sub {
    color: #9CA3AF !important;
}

/* 7. Keyframes Animations */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px var(--color-brand-cyan); opacity: 1; }
    50% { box-shadow: 0 0 16px var(--color-brand-cyan); opacity: 0.7; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 8. Responsive Breakpoints */
@media (max-width: 1200px) {
    .dashboard-layout {
        padding: 2rem 2rem 1rem 2rem;
    }
    .company-grid {
        gap: 1rem;
    }
    .card-content {
        padding: 1.5rem 1rem;
    }
    .company-title {
        font-size: 1.05rem;
    }
    .company-summary {
        font-size: 0.8rem;
    }
}

/* Breakpoint to switch from Dashboard viewport to vertical scrolling list */
@media (max-width: 1024px) {
    body {
        overflow: auto;
        height: auto;
    }
    
    .dashboard-layout {
        height: auto;
        padding: 3rem 1.5rem;
        gap: 3rem;
    }

    .company-grid {
        grid-template-columns: 1fr;
        max-height: none;
        gap: 1.5rem;
    }

    .company-card {
        height: auto;
    }

    .card-content {
        padding: 2.25rem 1.75rem;
        min-height: auto;
    }

    .company-title {
        font-size: 1.45rem;
    }

    .company-summary {
        font-size: 0.95rem;
    }

    .dashboard-footer {
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 2rem;
    }
}
