/* ====================================
   Café Matinal - Estilos Modernos
   ==================================== */

/* Variáveis CSS */
:root {
    --primary-color: #212121;
    --secondary-color: #505050;
    --accent-color: #d4a574;
    --text-color: #ffffff;
    --text-dark: #333333;
    --bg-light: #f5f5f5;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-color);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Heebo', sans-serif;
    font-weight: 500;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ====================================
   Banner de Cotações (Ticker)
   ==================================== */
.ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--accent-color), #c99a6b);
    color: var(--primary-color);
    z-index: 1001;
    overflow: hidden;
    height: 32px;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.ticker-bar:hover {
    background: linear-gradient(90deg, #c99a6b, var(--accent-color));
}

.ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
    will-change: transform;
}

.ticker-bar:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-items {
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.ticker-timestamp {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.15);
    height: 100%;
    flex-shrink: 0;
    z-index: 2;
}

.ticker-timestamp i {
    font-size: 0.7rem;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 1rem;
}

.ticker-separator {
    margin: 0 1.5rem;
    opacity: 0.6;
    font-size: 1.2rem;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ====================================
   Navegação
   ==================================== */
.navbar {
    position: fixed;
    top: 32px; /* Altura do ticker */
    left: 0;
    right: 0;
    background: rgba(33, 33, 33, 0);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(33, 33, 33, 0.95);
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-color);
    font-family: 'Heebo', sans-serif;
    transition: var(--transition);
}

.logo:hover {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: 400;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* ====================================
   Blog Section
   ==================================== */
.blog {
    padding: 6rem 0;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-top: -1rem;
    margin-bottom: 3rem;
    font-weight: 400;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.blog-card[data-tech="vba"] .blog-card-icon {
    background: linear-gradient(135deg, #217346 0%, #4CAF50 100%);
}

.blog-card[data-tech="powerbi"] .blog-card-icon {
    background: linear-gradient(135deg, #F2C811 0%, #FFA000 100%);
}

.blog-card[data-tech="python"] .blog-card-icon {
    background: linear-gradient(135deg, #306998 0%, #FFD43B 100%);
}

.blog-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.blog-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-card-description {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.blog-card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-color), #e8b87f);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ====================================
   Hero Section
   ==================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 32px; /* Compensar altura do ticker */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 33, 33, 0.7), rgba(80, 80, 80, 0.5));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.divider {
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    border: none;
    margin: 1.5rem auto;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--accent-color);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    max-width: 700px;
    margin: 2rem auto 0;
    line-height: 1.8;
    opacity: 0.95;
}

/* ====================================
   About Section
   ==================================== */
.about {
    position: relative;
    padding: 8rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.about-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.builderservices.io/s/cdn/v1.0/i/m?url=https%3A%2F%2Fstorage.googleapis.com%2Fproduction-hostgator-brasil-v1-0-4%2F714%2F1581714%2FoWG0CoCj%2F4f484c3888844b46a2f226c056de958f&methods=resize%2C2000%2C5000');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 1;
}

.about-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 33, 33, 0.85), rgba(33, 33, 33, 0.75));
}

.about .container {
    position: relative;
    z-index: 2;
}

.about-content {
    max-width: 600px;
    animation: fadeInLeft 1s ease;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.about-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-style: italic;
}

.divider-small {
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    border: none;
    margin: 1.5rem 0;
}

.about-description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    opacity: 0.95;
}

/* ====================================
   Footer
   ==================================== */
.footer {
    background: #fff;
    color: var(--text-dark);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.footer-nav a {
    color: var(--text-dark);
    opacity: 0.7;
    transition: var(--transition);
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-logo h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.footer-divider {
    border: none;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.footer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column p {
    opacity: 0.7;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.footer-email {
    color: var(--accent-color);
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-block;
    margin-top: 0.5rem;
}

.footer-email:hover {
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.footer-legal a {
    color: var(--text-dark);
    opacity: 0.6;
    transition: var(--transition);
}

.footer-legal a:hover {
    opacity: 1;
}

.footer-social p {
    opacity: 0.6;
}

/* ====================================
   Animations
   ==================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ====================================
   Blog Tooltip
   ==================================== */
.blog-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 9999;
    background: white;
    border-radius: 20px;
    padding: 2.5rem 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    max-width: 90%;
    width: 400px;
}

.blog-tooltip.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.blog-tooltip-content {
    text-align: center;
    color: var(--primary-color);
}

.blog-tooltip-content i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
}

.blog-tooltip-content p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.blog-tooltip-content strong {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.blog-tooltip-small {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 1rem;
}

/* Overlay escuro quando tooltip está aberto */
.blog-tooltip::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-tooltip.show::before {
    opacity: 1;
}

/* ====================================
   Responsividade
   ====================================== */
@media (max-width: 768px) {
    .navbar .container {
        position: relative;
    }

    .ticker-bar {
        font-size: 0.75rem;
        height: 28px;
    }
    
    .ticker-timestamp {
        font-size: 0.65rem;
        padding: 0 0.5rem;
        gap: 0.25rem;
    }
    
    .ticker-timestamp i {
        display: none;
    }
    
    .ticker-item {
        margin-right: 0.75rem;
        font-size: 0.7rem;
    }
    
    .ticker-separator {
        margin: 0 0.75rem;
        font-size: 1rem;
    }
    
    .ticker-items {
        padding: 0 1rem;
    }

    .navbar {
        top: 28px; /* Ajustar para altura do ticker no mobile */
    }

    .ticker-separator {
        margin: 0 1rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link::after {
        display: none;
    }

    .hero {
        min-height: 90vh;
        padding-top: 28px; /* Ajustar para altura do ticker no mobile */
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .about {
        padding: 5rem 0;
    }

    .about-background {
        background-attachment: scroll;
    }

    .footer-top {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .footer-info {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .divider {
        width: 60px;
    }
}

/* ====================================
   Scroll Reveal
   ==================================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
