/* ============================================
   Security Portal - Estilos Principais
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 60px 20px;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   Header
   ============================================ */

header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeIn 0.6s ease;
}

header h1 {
    font-size: 44px;
    margin-bottom: 15px;
    color: #222;
    font-weight: 600;
    letter-spacing: -0.5px;
}

header p {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* ============================================
   Grid Layout
   ============================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(12, 45, 89, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    color: #173a5e;
    display: flex;
    flex-direction: column;
    border: 1px solid #eceff3;
    position: relative;
    cursor: pointer;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #f6a100;
    transition: height 0.25s ease, background 0.25s ease;
}

.card:hover {
    box-shadow: 0 14px 28px rgba(12, 45, 89, 0.12);
    transform: translateY(-4px);
    border-color: #f6a100;
}

.card:hover::before,
.card:focus-visible::before {
    height: 6px;
    background: #ffbe3b;
}

.card:hover .card-icon,
.card:focus-visible .card-icon {
    box-shadow: 0 0 0 4px #fff4d7;
}

.card:focus-visible {
    outline: 2px solid #f6a100;
    outline-offset: 2px;
    border-color: #f6a100;
}

.card-header {
    padding: 34px 28px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #ffffff;
}

/* Variações de cores por tipo */
.card-security,
.card-crowdsec,
.card-portainer,
.card-portal,
.card-monitor {
    border-bottom-color: transparent;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: #0b4b8f;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
}

.card-title {
    font-size: 26px;
    font-weight: 700;
    color: #0c437f;
    letter-spacing: 0.2px;
    text-align: center;
}

.card-body {
    padding: 12px 30px 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   Status Badge
   ============================================ */

.status-badge {
    display: inline-block;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    width: fit-content;
    letter-spacing: 0.3px;
}

.status-active {
    background: #fff4d7;
    color: #8b6200;
}

.status-running {
    background: #fff4d7;
    color: #8b6200;
}

.status-coming {
    background: #fff4d7;
    color: #8b6200;
}

/* ============================================
   Card Description
   ============================================ */

.card-description {
    color: #516273;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 16px;
    flex-grow: 1;
    text-align: center;
    max-width: 280px;
}

/* ============================================
   Card Footer
   ============================================ */

.card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid #eef1f4;
}

.card-link {
    background: #f6a100;
    color: white;
    padding: 11px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    transition: background 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.card-link:hover {
    background: #dc8f00;
    transform: translateY(-1px);
}

/* ============================================
   Footer
   ============================================ */

footer {
    text-align: center;
    color: #666;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
}

footer p:last-child {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* ============================================
   Animações
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 40px 15px;
    }

    header h1 {
        font-size: 32px;
    }

    header p {
        font-size: 14px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-header {
        padding: 25px 20px;
    }

    .card-body {
        padding: 20px;
    }

    .card-title {
        font-size: 24px;
    }

    .card-description {
        font-size: 15px;
    }

    .card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .card-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 22px;
    }

    .card-icon {
        font-size: 36px;
    }

    .card-description {
        font-size: 14px;
    }

    .card-link {
        font-size: 16px;
        width: 100%;
    }
}
