/* 
    AG12X Premium Stylesheet
    Aesthetic: MGI / Gov.br Lightness + Colmeia Golden/Slate Impact
*/

:root {
    /* Color Palette - Gov.br / Institutional Base */
    --bg-dark: #0f172a;
    /* Deep slate blue for Hero */
    --bg-dark-subtle: #1e293b;
    --bg-light: #ffffff;
    /* Pure white for clean lightness */
    --bg-gray: #f8fafc;
    /* Very light gray for section alternate */
    --bg-accent: #0b2b52;
    /* Gov.br deep blue */

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-gov-dark: #1e293b;
    /* Readable dark text */
    --text-gov-muted: #475569;

    /* Golden accents from the Image Reference */
    --accent-gold: #f59e0b;
    /* Amber/Gold */
    --accent-gold-glow: rgba(245, 158, 11, 0.4);
    --accent-blue-br: #1351b4;
    /* Standard Gov.br Blue */

    --border-color: rgba(255, 255, 255, 0.1);
    --border-dark: #e2e8f0;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-xxl: 8rem;

    --container-width: 1200px;
    --nav-height: 80px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 0.2s;
    --duration-med: 0.5s;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-gov-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.25;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: inherit;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--duration-fast) var(--ease-out);
}

img,
svg {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.max-w-xl {
    max-width: 800px;
}

.max-w-lg {
    max-width: 600px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   Layout & Container
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

/* Section Variations */
.section-dark {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.section-light {
    background-color: var(--bg-light);
    color: var(--text-gov-dark);
}

.section-gray {
    background-color: var(--bg-gray);
    color: var(--text-gov-dark);
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
}

.section-accent {
    background-color: var(--accent-blue-br);
    color: var(--text-primary);
}

/* Typography Utilities */
.section-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-md);
    color: inherit;
}

.section-title.text-brand {
    color: var(--accent-blue-br);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-gov-muted);
    line-height: 1.5;
}

/* =========================================
   Components
   ========================================= */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--duration-med) var(--ease-out);
    color: #fff;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Floating Back Button */
.floating-back-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-blue);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-back-btn:hover {
    background: var(--accent-blue-br);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}



.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-links a:not(.btn) {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
}

.nav-links a:not(.btn):hover {
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    /* Institutional subtle rounding */
    cursor: pointer;
    transition: all var(--duration-fast);
    text-align: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-blue-br);
    color: #fff;
    border: 1px solid var(--accent-blue-br);
}

.btn-primary:hover {
    background-color: #0f4090;
    border-color: #0f4090;
    box-shadow: 0 4px 12px rgba(19, 81, 180, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-gold {
    background-color: var(--accent-gold);
    color: #000;
    border: 1px solid var(--accent-gold);
}

.btn-gold:hover {
    background-color: #d97706;
    border-color: #d97706;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* =========================================
   Hero Section (The Golden Colmeia Look)
   ========================================= */
.hero {
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--nav-height);
    background: var(--bg-dark);
    /* Fallback */
    overflow: hidden;
}

/* Video Background Elements */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    /* Composed gradient: Linear fade at the bottom to blend with the client banner, plus the original radial glow */
    background:
        linear-gradient(to bottom, rgba(15, 23, 42, 0) 60%, rgba(15, 23, 42, 1) 100%),
        radial-gradient(circle at bottom, rgba(33, 40, 54, 0.3) 0%, rgba(15, 23, 42, 0.85) 100%);
    z-index: 1;
}

/* Golden Hexagonal Circuit Glow Effect */
.hero-glow-gold {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(ellipse, var(--accent-gold-glow) 0%, transparent 60%);
    filter: blur(100px);
    z-index: 2;
    pointer-events: none;
}

/* Hex Pattern Overlay */
.hero-hex-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(245, 158, 11, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(245, 158, 11, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero .pre-headline {
    color: var(--accent-gold);
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.headline {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.02em;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero .subheadline {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    color: #cbd5e1;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

/* =========================================
   Institucional (Gov.br Clean Layout)
   ========================================= */
.layout-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.gov-text-block p {
    font-size: 1.15rem;
    color: var(--text-gov-muted);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.gov-highlight {
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent-blue-br);
    background: #f1f5f9;
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 1rem;
    border-radius: 0 4px 4px 0;
    font-weight: 500;
    color: var(--text-gov-dark) !important;
}

/* =========================================
   Grid & Cards (Governança e Cases)
   ========================================= */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.gov-card {
    background: #fff;
    border: none;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gov-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    color: var(--accent-blue-br);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.gov-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-gov-dark);
}

.gov-card p {
    color: var(--text-gov-muted);
    font-size: 1rem;
}

/* =========================================
   News Grid & Cards
   ========================================= */
.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-gov-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.news-thumb {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-gray);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-thumb {
    transform: scale(1.05);
}

.news-content {
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    background: #fff;
    position: relative;
    z-index: 1;
}

.news-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.news-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue-br);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding-top: 0.5rem;
}

.news-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.news-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--border-dark);
    flex-shrink: 0;
}

.news-author-info {
    display: flex;
    flex-direction: column;
}

.news-author-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-gov-dark);
}

.news-author-role {
    font-size: 0.7rem;
    color: var(--text-gov-muted);
    line-height: 1.2;
}

/* =========================================
   Checklist Grid
   ========================================= */
.check-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-sm);
}

.check-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: #fff;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.check-item span:nth-child(2) {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-gov-dark);
}

.check-icon {
    color: #10b981;
    /* Green check for positive confirmation */
    background: #ecfdf5;
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   Programa INSPIRE
   ========================================= */
.inspire-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.inspire-box {
    background: transparent;
    border: none;
    padding: 1rem 0;
}

.inspire-focus {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.inspire-focus li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1.05rem;
}

.inspire-focus li::before {
    content: '→';
    color: #93c5fd;
    font-weight: bold;
}

/* =========================================
   Footer CTA
   ========================================= */
.footer-cta {
    padding: var(--spacing-xxl) 0;
    background: #0b2b52;
    color: #fff;
    text-align: center;
}

.footer-cta .cta-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    border-top: 1px solid var(--border-dark);
    padding: var(--spacing-md) 0;
    background: #f8fafc;
    color: var(--text-gov-muted);
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a:hover {
    color: var(--accent-blue-br);
    text-decoration: underline;
}

/* =========================================
   Animations
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes scrollInfinite {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll-infinite {
    display: flex;
    width: max-content;
    animation: scrollInfinite 25s linear infinite;
}

@keyframes scrollInfinite {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll-infinite:hover {
    animation-play-state: paused;
}

/* =========================================
   Responsive
   ========================================= */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
}

@media (max-width: 900px) {

    .layout-split,
    .inspire-content {
        grid-template-columns: 1fr;
    }

    /* News grid: 2-col featured → 1 col */
    .section-gray .container>div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* News grid: 3-col row → 1 col */
    .section-gray .container>div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    /* Product cards 2x2 grid → 1 col */
    #arquitetura .container>div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* Governance section cards → 1 col */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(240px"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        min-height: 80vh;
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Section titles */
    .section-title {
        font-size: 1.6rem !important;
    }

    .cta-title {
        font-size: 1.8rem !important;
    }

    /* Gov layout split */
    .layout-split {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .gov-text-block {
        padding-right: 0;
    }

    /* Inspire content */
    .inspire-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .inspire-box {
        margin-top: 1rem;
    }

    /* Arcade demo iframe */
    .section .container>div[style*="max-width: 960px"] {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 8px !important;
    }

    /* Cards grid */
    .cards-grid {
        grid-template-columns: 1fr !important;
    }

    /* LLMs banner section - inline grid fixes */
    div[style*="grid-template-columns: repeat(3, 1fr)"][style*="max-width: 700px"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* General container padding */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Section spacing */
    .section {
        padding: 3rem 0;
    }

    /* Logo strip marquee */
    .animate-scroll-infinite>div {
        gap: 2rem !important;
        padding-right: 2rem !important;
    }

    .animate-scroll-infinite span {
        font-size: 1rem !important;
    }

    /* News cards responsive thumbnails */
    .news-card div[style*="height: 220px"] {
        height: 180px !important;
    }

    .news-card div[style*="height: 180px"] {
        height: 150px !important;
    }
}

@media (max-width: 480px) {

    /* Extra small - iPhone SE, small androids */
    .hero {
        min-height: 85vh;
        padding-top: 90px;
    }

    .hero h1 {
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
    }

    .hero p {
        font-size: 0.9rem !important;
    }

    .section-title {
        font-size: 1.35rem !important;
    }

    .cta-title {
        font-size: 1.5rem !important;
    }

    .section-subtitle {
        font-size: 0.9rem !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    /* Product card text */
    .gov-card h4 {
        font-size: 1rem;
    }

    /* Inspire section */
    .inspire-content h2 {
        font-size: 1.5rem !important;
    }

    .inspire-focus li {
        font-size: 0.9rem;
    }

    /* News card text */
    .news-card h4 {
        font-size: 0.95rem !important;
    }

    .news-card div[style*="height: 220px"],
    .news-card div[style*="height: 180px"] {
        height: 140px !important;
    }

    /* Footer copyright */
    .footer div[style*="text-align: center"] {
        font-size: 0.75rem !important;
        padding-top: 1rem !important;
        margin-top: 1rem !important;
    }

    /* Governance cards padding */
    div[style*="background: rgba(255,255,255,0.03)"][style*="padding: 2rem"] {
        padding: 1.25rem !important;
    }

    /* LLMs banner */
    div[style*="grid-template-columns: repeat(3, 1fr)"][style*="max-width: 700px"] {
        grid-template-columns: 1fr !important;
    }

    /* Logo strip */
    .animate-scroll-infinite>div {
        gap: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .animate-scroll-infinite span {
        font-size: 0.85rem !important;
    }

    /* Make sure inline product grid stacks */
    #produtos div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
}