/*
Theme Name: AcademiaTech Premium
Theme URI: 
Author: Antigravity
Description: A premium, innovative, and high-performance tech blog for Prof. Zaida Tavares.
Version: 2.0.0
Text Domain: academiatech
*/

:root {
    --primary-color: #0F2C59;
    --accent-color: #00D4FF;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --background-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --header-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: 
        radial-gradient(circle at 2px 2px, #e2e8f0 1px, transparent 0);
    background-size: 40px 40px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

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

/* --- Header & Navigation --- */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.main-navigation a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.main-navigation a:hover::after {
    width: 100%;
}

/* --- Mobile Toggle --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100; /* Ensure button is above everything */
    position: relative;
    outline: none;
}

.menu-toggle span {
    width: 32px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: var(--transition);
}

.menu-toggle.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- Hero Section --- */
.hero-premium {
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 60%;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-premium h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-premium p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Cards & Grid --- */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 1rem auto;
    border-radius: 2px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

/* Post Cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.premium-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.premium-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 16px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* --- Podcast Immersive Section --- */
.podcast-immersive {
    background: var(--primary-color);
    color: #fff;
    padding: 100px 0;
    border-radius: 40px;
    margin-top: 4rem;
}

.podcast-immersive h2 {
    color: #fff;
}

.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.podcast-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition);
}

.podcast-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.play-button {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.play-button svg {
    fill: #fff;
    width: 24px;
    height: 24px;
}

/* --- About Me Upgrade --- */
.about-premium {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img-box {
    position: relative;
}

.about-img-box img {
    border-radius: 30px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.about-img-box::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    z-index: -1;
}

/* --- Footer --- */
.site-footer {
    background: var(--primary-color);
    color: #fff;
    padding: 80px 0 40px;
    margin-top: 6rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* --- Buttons --- */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.3);
}

.btn-premium:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 44, 89, 0.4);
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-premium {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-premium h1 {
        font-size: 2.2rem;
        width: 100%;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-premium {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%; /* Full screen overlay */
        height: 100vh;
        background: #fff;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.4s cubic-bezier(0.77,0.2,0.05,1.0), visibility 0.4s;
        z-index: 1050;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
    }

    .main-navigation.is-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    .main-navigation a {
        font-size: 2rem;
        font-family: var(--heading-font);
        color: var(--primary-color);
    }
    body.menu-open {
        overflow: hidden;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* --- About Section Mobile Stack --- */
    .about-premium {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-text {
        order: 2;
    }

    .about-img-box {
        order: 1;
        max-width: 300px;
        margin: 0 auto;
    }

    .about-text h2 {
        text-align: center !important;
    }
}

/* --- Premium Gallery Grid (Used in Sobre Mim) --- */
.premium-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.premium-gallery img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.premium-gallery img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

/* --- Universal Filter Bar Styles --- */
.filter-bar select {
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--accent-color) !important;
}

.filter-bar.glass-card {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* --- Monetization & SEO Stabilization --- */
.header-ad-placement,
.premium-ad-wrapper,
.ad-placement-podcasts {
    min-height: 90px;
    background: rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    overflow: hidden;
}

.hero-premium h1 {
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* --- Luxury Single Article Layout --- */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--accent-color);
}

.luxury-hero {
    padding: 180px 0 120px;
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
    overflow: hidden;
}

.luxury-hero .hero-inner {
    position: relative;
    z-index: 2;
}

.luxury-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
    font-weight: 800;
    margin-bottom: 2rem;
    max-width: 900px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 10px 40px rgba(0,0,0,0.4);
    background: transparent;
    -webkit-text-fill-color: initial;
    color: #ffffff;
    z-index: 5;
    position: relative;
}

.luxury-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    opacity: 0.9;
}

.author-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.1);
    padding: 6px 16px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
}

.author-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.meta-divider {
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

.hero-wave .shape-fill {
    fill: #f8fafc;
}

/* Luxury Content Grid */
.luxury-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    padding: 80px 0;
    align-items: start;
    width: 100%;
}

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

#artigos {
    scroll-margin-top: 100px;
}

.luxury-sidebar {
    position: sticky;
    top: 120px;
}

.sticky-toc-box {
    padding: 2rem;
}

.toc-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toc-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1.4;
    border-left: 2px solid transparent;
    padding-left: 15px;
}

.toc-link:hover {
    color: var(--primary-color);
    padding-left: 20px;
}

.toc-link.active {
    color: var(--primary-color);
    font-weight: 700;
    border-left-color: var(--accent-color);
    padding-left: 20px;
}

.toc-link.is-h3 {
    margin-left: 15px;
    font-size: 0.85rem;
}

/* Typography Elite */
.luxury-typography {
    font-size: 1.25rem;
    line-height: 1.9;
    color: #1e293b;
}

.luxury-typography p {
    margin-bottom: 2rem;
}

.luxury-typography h2 {
    font-size: 2.25rem;
    margin: 4rem 0 1.5rem;
    color: var(--primary-color);
    font-weight: 800;
}

.luxury-typography h3 {
    font-size: 1.75rem;
    margin: 3rem 0 1rem;
    color: var(--primary-color);
}

.luxury-typography blockquote {
    border-left: 5px solid var(--accent-color);
    padding: 2rem;
    background: #f1f5f9;
    border-radius: 0 20px 20px 0;
    font-style: italic;
    font-size: 1.4rem;
    margin: 3rem 0;
}

.luxury-footer {
    margin-top: 6rem;
    padding-top: 3rem;
    border-top: 2px solid #e2e8f0;
}

.share-modern {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-modern a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--primary-color);
    transition: var(--transition);
}

.share-modern a:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-5px);
}

/* Post Nav Cards */
.luxury-post-nav .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 4rem;
}

.nav-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

/* --- Modern Blog Grid & Cards --- */
.blog-page {
    padding-bottom: 6rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.post-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
    transform: translateY(0);
}

.post-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--accent-color);
}

.post-thumbnail-link {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
}

.post-thumbnail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.post-card:hover .post-thumbnail-link img {
    transform: scale(1.1);
}

.category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 212, 255, 0.3);
    z-index: 2;
}

.post-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    font-weight: 600;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--primary-color);
}

.post-title a:hover {
    color: var(--accent-color);
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.post-footer {
    display: flex;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: gap 0.3s ease;
}

.read-more-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.read-more-btn:hover {
    color: var(--accent-color);
    gap: 12px;
}

/* Pagination Styles */
#blog-pagination {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
}

#blog-pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}

#blog-pagination .page-numbers {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 700;
    transition: var(--transition);
}

#blog-pagination .page-numbers.current,
#blog-pagination .page-numbers:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

#blog-pagination .page-numbers.prev,
#blog-pagination .page-numbers.next {
    width: auto;
    padding: 0 20px;
}

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

.nav-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.nav-dir {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
}

@media (max-width: 1024px) {
    .luxury-grid {
        grid-template-columns: 1fr;
    }
    .luxury-sidebar {
        display: none;
    }
}
