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

html {
    scroll-behavior: smooth;
}

/* =========================
   BASE
========================= */
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fa;
    color: #172033;
    line-height: 1.6;
}

a {
    outline-offset: 3px;
}

/* focus visibility for keyboard users */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #19c37d;
    outline-offset: 3px;
}

/* =========================
   HEADER
========================= */
header {
    background: rgba(16, 24, 39, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 16px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: white;
    text-decoration: none;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 9px;
    background: linear-gradient(145deg, #19c37d, #0d8f5b);
    box-shadow: 0 4px 12px rgba(25, 195, 125, 0.35);
}

.logo-mark svg {
    width: 19px;
    height: 19px;
    stroke: #07121f;
}

.logo span {
    color: #19c37d;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    position: relative;
    color: #dfe4ea;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 8px 14px;
    border-radius: 7px;
    transition: color 0.25s ease, background 0.25s ease;
}

nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    background: #19c37d;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

nav a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
}

/* =========================
   HERO
========================= */
.hero {
    background: linear-gradient(135deg, rgba(16, 24, 39, 0.98), rgba(27, 54, 93, 0.95));
    color: white;
    padding: 50px 6%;
    text-align: center;
    max-width: 1600px;
    margin: auto;
    border-radius: 0 0 18px 18px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 72px);
    margin-bottom: 18px;
}

.hero h1 span {
    color: #19c37d;
}

.hero p {
    max-width: 425px;
    margin: 0 auto;
}

.hero-button {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 28px;
    background: #19c37d;
    color: #07121f;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(25, 195, 125, 0.25);
}

/* =========================
   SEÇÕES
========================= */
.section {
    max-width: 1200px;
    margin: auto;
    padding: 70px 3%;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 34px;
    margin-bottom: 8px;
}

.section-title p {
    color: #687386;
}

/* =========================
   CATEGORIAS
========================= */
.categories {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    padding: 28px 20px;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #172033;
    min-height: 230px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #19c37d, #0d8f5b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.category-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 36px rgba(13, 143, 91, 0.16);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card .icon {
    width: 68px;
    height: 68px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: linear-gradient(160deg, #e8f8f1, #d3f0e2);
    border-radius: 18px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.category-card:hover .icon {
    transform: scale(1.08) rotate(-4deg);
    background: linear-gradient(160deg, #19c37d, #0d8f5b);
}

.category-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.category-card p {
    max-width: 230px;
    color: #687386;
    font-size: 14.5px;
    margin-bottom: 16px;
}

.category-card .card-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: bold;
    color: #0d8f5b;
    transition: gap 0.25s ease;
}

.category-card:hover .card-cta {
    gap: 10px;
}

/* =========================
   CONTEÚDO EM DESTAQUE
========================= */
.featured {
    background: white;
    max-width: none;
    padding-left: 6%;
    padding-right: 6%;
}

.featured .section-title h2 {
    color: #172033;
}

.featured .section-title p {
    color: #687386;
}

.article-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.article-card {
    position: relative;
    background: linear-gradient(145deg, #f4f7f8, #e8eef1);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid #dce4e8;
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #19c37d;
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: #19c37d;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.article-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #e8f8f1, #d3f0e2);
    border-radius: 16px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.article-icon svg {
    width: 27px;
    height: 27px;
    stroke: #0d8f5b;
    transition: stroke 0.3s ease;
}

.article-card:hover .article-icon {
    transform: scale(1.06) rotate(-4deg);
    background: linear-gradient(160deg, #19c37d, #0d8f5b);
}

.article-card:hover .article-icon svg {
    stroke: white;
}

.article-card h3 {
    color: #172033;
    font-size: 21px;
    margin-bottom: 12px;
}

.article-card p {
    color: #687386;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.read-more {
    color: #0d8f5b;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.read-more:hover {
    letter-spacing: 0.5px;
}

/* =========================
   NOTÍCIAS
========================= */
.news-section {
    background: #f5f7fa;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.news-image {
    height: 190px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 24, 39, 0.65), transparent);
}

.news-image.smartphone {
    background-image: url("https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?auto=format&fit=crop&w=900&q=80");
}

.news-image.ia {
    background-image: url("https://images.unsplash.com/photo-1677442136019-21780ecad995?auto=format&fit=crop&w=900&q=80");
}

.news-image.security {
    background-image: url("https://images.unsplash.com/photo-1563013544-824ae1b704d3?auto=format&fit=crop&w=900&q=80");
}

.news-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-category {
    display: inline-block;
    width: fit-content;
    background: #e8f8f1;
    color: #0d8f5b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.news-date {
    color: #8993a3;
    font-size: 13px;
    margin-bottom: 12px;
}

.news-card h3 {
    font-size: 21px;
    line-height: 1.35;
    margin-bottom: 12px;
}

.news-card p {
    color: #687386;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.news-card a {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    color: #0d8f5b;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.news-card a:hover {
    gap: 12px;
    color: #087247;
}

/* =========================
   NEWSLETTER
========================= */
.newsletter {
    background: linear-gradient(135deg, #101827, #1b365d);
    color: white;
    text-align: center;
    padding: 70px 6%;
}

.newsletter h2 {
    font-size: 34px;
    margin-bottom: 12px;
}

.newsletter p {
    max-width: 650px;
    margin: auto;
    color: #c8d1dd;
    font-size: 17px;
}

.newsletter-button {
    display: inline-block;
    margin-top: 28px;
    padding: 13px 26px;
    border: 1px solid #19c37d;
    border-radius: 8px;
    color: #19c37d;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.newsletter-button:hover {
    background: #19c37d;
    color: #07121f;
}

/* =========================
   FOOTER
========================= */
footer {
    background: #080d16;
    color: #9ba7b5;
    padding: 50px 6% 24px;
    font-size: 14px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    text-align: left;
}

.footer-col h4 {
    color: white;
    font-size: 15px;
    margin-bottom: 14px;
}

.footer-col p {
    line-height: 1.7;
    max-width: 320px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #9ba7b5;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-col a:hover {
    color: #19c37d;
}

.footer-bottom {
    max-width: 1200px;
    margin: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.footer-bottom p {
    margin: 4px 0;
}

/* =========================
   TABLET
========================= */
@media (max-width: 1000px) {
    .categories {
        grid-template-columns: repeat(3, 1fr);
    }

    .article-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 700px) {
    header {
        padding: 16px 6%;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: #19c37d;
        color: #07121f;
        border: none;
        border-radius: 8px;
        font-size: 25px;
        cursor: pointer;
        transition: 0.3s;
    }

    .menu-toggle:hover {
        transform: scale(1.05);
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 6%;
        right: 6%;
        width: auto;
        flex-direction: column;
        gap: 0;
        background: #0b1220;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
        z-index: 1000;
    }

    nav.active {
        display: flex;
    }

    nav a {
        width: 100%;
        padding: 14px 20px;
        border-radius: 0;
        border-bottom: 1px solid #1e2a3c;
        transition: 0.3s;
    }

    nav a::after {
        display: none;
    }

    nav a:last-child {
        border-bottom: none;
    }

    nav a:hover {
        background: #16243a;
        color: #19c37d;
        padding-left: 26px;
    }

    .categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 65px 6%;
    }

    .hero p {
        font-size: 17px;
    }

    .section-title h2 {
        font-size: 28px;
    }
}

@media (max-width: 420px) {
    .categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
        text-align: center;
    }

    .footer-col p {
        max-width: none;
        margin: 0 auto;
    }
}

/* respeita utilizadores que preferem menos animação */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* =========================
   BREADCRUMB
========================= */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 6% 0;
    font-size: 13.5px;
    color: #687386;
}

.breadcrumb a {
    color: #0d8f5b;
    text-decoration: none;
    font-weight: bold;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* =========================
   PAGE HERO (categorias)
========================= */
.page-hero {
    background: linear-gradient(135deg, rgba(16, 24, 39, 0.98), rgba(27, 54, 93, 0.95));
    color: white;
    padding: 46px 6%;
    text-align: center;
    max-width: 1600px;
    margin: 18px auto 0;
    border-radius: 18px;
}

.page-hero .page-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
}

.page-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 10px;
}

.page-hero p {
    max-width: 560px;
    margin: 0 auto;
    color: #c8d1dd;
    font-size: 16.5px;
}

/* =========================
   CONTENT GRID (páginas de categoria)
========================= */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.content-card {
    background: white;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid #e7ecf0;
    text-decoration: none;
    color: #172033;
}

.content-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #19c37d;
}

.content-tag {
    display: inline-block;
    width: fit-content;
    background: #e8f8f1;
    color: #0d8f5b;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.content-card h3 {
    font-size: 19px;
    line-height: 1.35;
    margin-bottom: 10px;
}

.content-card p {
    color: #687386;
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.content-card .card-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: bold;
    color: #0d8f5b;
    transition: gap 0.25s ease;
}

.content-card:hover .card-cta {
    gap: 10px;
}

/* =========================
   CTA de secção (fim das páginas de categoria)
========================= */
.section-cta {
    max-width: 1200px;
    margin: 10px auto 0;
    background: white;
    border: 1px dashed #c9d3da;
    border-radius: 14px;
    padding: 30px;
    text-align: center;
}

.section-cta p {
    color: #687386;
    margin-bottom: 14px;
}

.section-cta a {
    color: #0d8f5b;
    font-weight: bold;
    text-decoration: none;
}

.section-cta a:hover {
    text-decoration: underline;
}

/* =========================
   CONTEÚDO LEGAL (privacidade / termos / sobre)
========================= */
.legal-content {
    max-width: 820px;
    margin: auto;
    padding: 60px 3% 90px;
}

.legal-content h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.legal-content .updated {
    color: #8993a3;
    font-size: 13.5px;
    margin-bottom: 36px;
}

.legal-content h2 {
    font-size: 20px;
    margin-top: 34px;
    margin-bottom: 12px;
    color: #172033;
}

.legal-content p,
.legal-content li {
    color: #435066;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-content ul {
    padding-left: 22px;
}

.legal-note {
    margin-top: 40px;
    padding: 18px 20px;
    background: #fff8ec;
    border: 1px solid #f0e0b8;
    border-radius: 10px;
    font-size: 14px;
    color: #6b5a2a;
}

/* =========================
   CONTACTO
========================= */
.contact-wrap {
    max-width: 900px;
    margin: auto;
    padding: 60px 3% 90px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.contact-info h1 {
    font-size: 30px;
    margin-bottom: 14px;
}

.contact-info p {
    color: #687386;
    margin-bottom: 22px;
    line-height: 1.7;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    margin-bottom: 12px;
    color: #435066;
    font-size: 15px;
}

.contact-form {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    border: 1px solid #e7ecf0;
}

.contact-form label {
    display: block;
    font-size: 13.5px;
    font-weight: bold;
    color: #172033;
    margin-bottom: 6px;
    margin-top: 16px;
}

.contact-form label:first-child {
    margin-top: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14.5px;
    color: #172033;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #19c37d;
}

.contact-form textarea {
    resize: vertical;
    min-height: 110px;
}

.contact-form button {
    margin-top: 20px;
    width: 100%;
    padding: 13px;
    background: #19c37d;
    color: #07121f;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: #0d8f5b;
    color: white;
}

@media (max-width: 800px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   PÁGINA DE ARTIGO
========================= */
.article-header {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 3% 0;
}

.article-header .content-tag {
    margin-bottom: 16px;
}

.article-header h1 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 12px;
    color: #172033;
}

.article-meta {
    color: #8993a3;
    font-size: 13.5px;
    margin-bottom: 8px;
}

.article-body {
    max-width: 820px;
    margin: auto;
    padding: 10px 3% 70px;
}

.article-body h2 {
    font-size: 21px;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #172033;
}

.article-body p,
.article-body li {
    color: #435066;
    font-size: 15.5px;
    line-height: 1.85;
    margin-bottom: 14px;
}

.article-body ul {
    padding-left: 22px;
}

.article-back {
    max-width: 820px;
    margin: 0 auto 10px;
    padding: 0 3%;
}

.article-back a {
    color: #0d8f5b;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
}

.article-back a:hover {
    text-decoration: underline;
}
