:root {
    --primary: #00897B;
    /* Teal - Saúde/SUS/Natureza */
    --primary-dark: #004D40;
    --secondary: #D4E157;
    /* Lime Green - Vida/Energia */
    --accent: #FF7043;
    /* Deep Orange - Popular/Urgência */
    --surface: #ffffff;
    --background: #F5F7FA;
    --text-main: #263238;
    --text-light: #546E7A;
    --gradient-hero: linear-gradient(135deg, rgba(0, 77, 64, 0.95) 0%, rgba(0, 137, 123, 0.9) 100%);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-sm);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 137, 123, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 137, 123, 0.4);
    background-color: var(--primary-dark);
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), #2E7D32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero), url('https://images.unsplash.com/photo-1596496316717-d5d8869c3a3d?q=80&w=2670&auto=format&fit=crop') no-repeat center center/cover;
    color: white;
    text-align: center;
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    overflow: hidden;
    padding-top: 60px;
    /* Space for logo */
}

.header-logo-container {
    display: flex;
    justify-content: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 16px;
    color: white;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 32px;
    opacity: 0.9;
    color: var(--secondary);
}

.hero-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Section 1: Context */
.context-section .partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-top: 40px;
}

.partner-badge {
    background: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    color: var(--primary-dark);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Section 2: Cards/Downloads */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.resource-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.resource-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--primary-dark);
    line-height: 1.3;
}

.resource-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--accent);
}

/* Section 3: Tools */
.tools-section {
    background-color: white;
}

.tools-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Section 4: Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 300px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 30px 0 15px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--secondary);
    line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .tools-content {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }
}

/* Video Fallback */
.video-thumbnail-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.video-thumbnail-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s;
    z-index: 1;
}

.video-thumbnail-link:hover::before {
    background: rgba(0, 0, 0, 0.1);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.play-button i {
    font-size: 32px;
    color: var(--primary);
    margin-left: 4px;
    /* Optical adjustment */
}

.video-thumbnail-link:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: white;
}

/* Footer Logos */
.footer-logo-frame {
    background: white;
    padding: 15px;
    border-radius: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    width: 160px;
    /* Fixed width for uniformity */
    height: 160px;
    /* Fixed height for uniformity */
}

.footer-logo-frame:hover {
    transform: translateY(-5px);
}

.footer-logo-frame img {
    max-width: 100%;
    max-height: 100%;
    height: auto !important;
    /* Ensure content fits */
    width: auto;
    object-fit: contain;
}