:root {
    /* Color Palette */
    --color-primary: #FFDA01;
    --color-deep-blue: #12315E;
    --color-sky-blue: #50B7E8;
    --color-white: #FFFFFF;
    --navbar-height: 80px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-white);
    color: var(--color-deep-blue);
    letter-spacing: -1.4px;
    overflow-x: hidden;
}

/* Typography Rules */
h1,
h2,
h3,
h4,
a,
p {
    letter-spacing: -1.4px;
}

/* Ticker */
.ticker-wrapper {
    background-color: var(--color-deep-blue);
    padding: 2rem 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    z-index: 10;
    /* Lowered from 1001 so it stays behind the navbar (9999) */
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
    /* Slower animation for huge text */
}

.ticker-item {
    font-weight: 800;
    /* Bold */
    font-style: italic;
    font-size: 200px;
    /* Size 200px */
    color: rgba(74, 161, 241, 0.3);
    /* #4AA1F1 com 30% opacidade */
    padding: 0 4rem;
    line-height: 1;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Requires duplicated content for seamless loop */
}

/* Navbar (Floating/Glassmorphism) */
.navbar-wrapper {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 9999;
    /* Maximized z-index to stay above EVERYTHING */
    display: flex;
    justify-content: center;
    padding: 0 2rem;
    pointer-events: none;
    /* Let clicks pass through wrapper */
}

.navbar {
    pointer-events: auto;
    background: var(--color-sky-blue);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
    /* Increased slightly to fit logo */
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.navbar-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--color-deep-blue);
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition-speed);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 30px;
}

.nav-link:hover,
.nav-link.active {
    font-weight: 600;
}

.btn-nav {
    background-color: var(--color-deep-blue);
    color: var(--color-white);
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 7px;
    font-weight: 600;
    transition: var(--transition-speed);
}

.btn-nav:hover {
    background-color: var(--color-white);
    color: var(--color-deep-blue);
}

.mobile-only-btn {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform var(--transition-speed);
}

.mobile-menu-btn:active {
    transform: scale(0.9);
}

/* Containers & Sections */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-deep-blue);
    margin-bottom: 3rem;
    text-align: center;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 10vh;
    padding-top: 100px;
    display: flex;
    align-items: flex-end;
    /* Align items to the bottom instead of center */
    justify-content: center;
    background-color: var(--color-primary);
    z-index: 20;
    /* Eleva toda a seção do Hero para ficar acima do ticker */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/ifmachado.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    /* Low opacity overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    /* Removing top/left/right padding to let child handle it if needed */
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    /* Bottom align inner content */
    justify-content: space-between;
    gap: 2rem;
}

.hero-text {
    flex: 1;
    color: var(--color-deep-blue);
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(18, 49, 94, 0.8);
}

.hero-text .slogan {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--color-deep-blue);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Bottom align perfectly inside hero if needed, but center horizontal is key */
}

.hero-image img {
    max-width: 600px;
    height: auto;
    display: block;
    margin-bottom: -58px;
    position: relative;
    z-index: 50;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--color-deep-blue);
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    /* Changed from 50px */
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(18, 49, 94, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1rem;
    border-radius: 6px;
    /* Changed from 50px */
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform var(--transition-speed), filter var(--transition-speed);
    width: 100%;
    max-width: 400px;
}

.btn:active {
    transform: scale(0.98);
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-3px);
}

.btn-whatsapp {
    background-color: #077707;
    color: var(--color-white);
}

.btn-email {
    background-color: var(--color-white);
    color: var(--color-deep-blue);
    border: 2px solid var(--color-deep-blue);
}

/* Timeline (Minha História) */
.history-section {
    background-color: var(--color-white);
}

.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.history-image {
    display: flex;
    justify-content: center;
}

.history-image img {
    max-width: 100%;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Removing old timeline before pseudo-element */

.history-text {
    padding: 2rem;
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--color-deep-blue);
    font-weight: 500;
}

/* Eixos de Gestão (Cards) */
.eixos-section {
    background-color: #50B7E8;
    width: 100%;
    /* Stretch background */
    max-width: none;
}

.eixos-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Eixos de Gestão (Cards Verticais) */
.eixos-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.eixo-card {
    background: var(--color-primary);
    padding: 2.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.eixo-card:hover {
    transform: translateY(-8px);
}

.eixo-card h3 {
    font-size: 1.5rem;
    color: var(--color-deep-blue);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.eixo-card p {
    color: var(--color-deep-blue);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.eixo-card ul {
    list-style: none;
    padding-left: 0;
}

.eixo-card ul li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-deep-blue);
    line-height: 1.6;
    font-size: 1.05rem;
}

.eixo-card ul li::before {
    content: '❯';
    color: var(--color-deep-blue);
    font-weight: bold;
    font-size: 0.9rem;
    position: absolute;
    left: 0;
    top: 2px;
}

/* CTA Section */
.cta-section {
    background-color: var(--color-deep-blue);
    color: var(--color-white);
    text-align: center;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.cta-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background-color: #0b1e3a;
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
}

/* --- Animations (Intersection Observer Targets) --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-from-bottom {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: var(--delay, 0s);
}

.reveal-from-bottom.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition-delay: var(--delay, 0s);
}

.zoom-in.is-visible {
    opacity: 1;
    transform: scale(1);
}


@media (max-width: 992px) {

    /* Ticker Mobile Adjustments */
    .ticker-wrapper {
        padding: 1.5rem 0;
    }

    .ticker-item {
        font-size: 80px;
        padding: 0 1.5rem;
    }

    .navbar-wrapper {
        padding: 0 1rem;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        padding-top: 6rem;
        /* Space below the mobile navbar */
    }

    .hero-image {
        width: 100%;
        align-items: flex-end;
        /* Keep image stuck to bottom */
    }

    .hero-image img {
        max-width: 90%;
        /* Prevent horizontal scrolling on tiny screens */
        margin-bottom: -34px;
        /* Bump up specifically for mobile so it is not cropped *under* the ticker too much */
    }

    .navbar {
        border-radius: 12px;
        padding: 0.8rem 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        /* allow links to drop */
        justify-content: space-between;
        align-items: center;
        gap: 0;
        width: 100%;
        flex: 1;
        max-width: 100%;
    }

    .navbar-logo {
        order: 1;
    }

    .navbar-actions {
        order: 2;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: auto;
        /* Forces it to the far right */
    }

    .mobile-menu-btn {
        display: block;
    }

    .desktop-only-btn {
        display: none;
    }

    .mobile-only-btn {
        display: inline-block;
        margin-top: 1rem;
    }

    .btn-nav {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .nav-links {
        order: 3;
        /* below */
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        padding: 0;
        transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
        pointer-events: none;
        /* Disable clicks when hidden */
        gap: 1.5rem;
    }

    .nav-links.active {
        max-height: 400px;
        opacity: 1;
        padding: 1.5rem 0 1rem 0;
        pointer-events: auto;
        /* Enable clicks */
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .history-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .history-image img {
        max-width: 80%;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-dot {
        left: 5px;
    }

    .timeline-item {
        padding-left: 45px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }
}