/* ========================================
   WEBNECT STUDIO BLOG - UNIFIED CSS
   Theme: Azzurro (Cyan)
   Layout: Blog per Articoli
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

/* ========================================
   1. RESET & BASE STYLES
   ======================================== */

*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
}

:root {
    --cyan: #00d4ff;
    --cyan-light: #66e0ff;
    --cyan-dark: #0099cc;
}

a {
    text-decoration: none;
}

ol, ul, li {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

html {
    font-size: 62.5%;
}

html:focus-within {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    background: #f8f9fa;
}

img, picture {
    max-width: 100%;
}

/* ========================================
   2. CONTAINER & LAYOUT
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   3. HEADER & NAVIGATION
   ======================================== */

header {
    background: #fff;
    box-shadow: 0 0.3rem 1rem rgba(0, 212, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

header nav img {
    height: 4rem;
}

header nav ul {
    display: flex;
    gap: 3rem;
    align-items: center;
}

header nav ul li a {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

header nav ul li a:hover {
    color: var(--cyan, #00d4ff);
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan, #00d4ff);
    transition: width 0.3s;
}

header nav ul li a:hover::after {
    width: 100%;
}

.mobileMenuIcon_open,
.mobileMenuIcon_close {
    display: none;
    font-size: 3rem;
    cursor: pointer;
    color: var(--cyan-dark, #0099cc);
}

@media (max-width: 700px) {
    header nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s;
        box-shadow: -0.5rem 0 2rem rgba(0, 0, 0, 0.1);
    }

    header nav ul.openedMenu {
        right: 0;
    }

    .mobileMenuIcon_open {
        display: block;
    }

    .mobileMenuIcon_close {
        display: none;
        position: fixed;
        top: 2rem;
        right: 2rem;
        z-index: 1001;
    }
}

/* ========================================
   4. FOOTER
   ======================================== */

footer {
    background: #fff;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 5rem;
    border-top: 1px solid #e0e0e0;
}

footer p {
    font-size: 1.3rem;
    color: #666;
}

/* ========================================
   5. BLOG HOME STYLES - ARTICLE CARDS
   ======================================== */

.blog-home {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--cyan-dark, #0099cc);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--cyan-dark, #0099cc), var(--cyan, #00d4ff));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 1.6rem;
    color: #555;
    font-weight: 400;
}

.loading-spinner {
    text-align: center;
    padding: 4rem;
    font-size: 1.6rem;
    color: var(--cyan-dark, #0099cc);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.1);
    border-top-color: var(--cyan, #00d4ff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    padding: 2rem 0;
}

.article-card {
    background: #fff;
    border-radius: 1.3rem;
    box-shadow: 0 0.7rem 2rem rgba(0, 212, 255, 0.13);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

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

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1.5rem 3rem rgba(0, 212, 255, 0.25);
}

.article-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.1);
}

.article-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(90deg, var(--cyan, #00d4ff), var(--cyan-light, #66e0ff));
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 0.3rem 0.8rem rgba(0, 212, 255, 0.3);
}

.article-card-content {
    padding: 2rem;
}

.article-card-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cyan-dark, #0099cc);
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: color 0.3s;
}

.article-card:hover h2 {
    color: var(--cyan, #00d4ff);
}

.article-description {
    font-size: 1.3rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.article-author {
    font-weight: 600;
    color: var(--cyan-dark, #0099cc);
}

.article-date {
    font-style: italic;
}

.read-more {
    display: inline-block;
    color: #fff;
    background: linear-gradient(90deg, var(--cyan, #00d4ff), var(--cyan-light, #66e0ff));
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 0.3rem 0.8rem rgba(0, 212, 255, 0.2);
}

.read-more:hover {
    background: linear-gradient(90deg, var(--cyan-light, #66e0ff), var(--cyan, #00d4ff));
    box-shadow: 0 0.5rem 1.2rem rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

/* ========================================
   6. RESPONSIVE STYLES
   ======================================== */

@media (max-width: 950px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-section p {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem 0;
    }

    .blog-home {
        padding: 1rem;
    }

    .hero-section {
        padding: 3rem 1rem;
    }

    .hero-section h1 {
        font-size: 2.4rem;
    }

    .container {
        padding: 0 1rem;
    }
}
