/*
Theme Name: Instituto Bisa
Author:
Description: Custom theme for Instituto Bisa
Version: 1.0.0
Text Domain: instituto-bisa
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* CSS Reset */
*, *:before, *:after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    font-family: var(--font-secondary);
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

#page {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

/* Typography Rules */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    margin: 0 0 1rem 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-primary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600; /* semibold */
}

a, button {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* Support Banner */
.support-banner {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 40px;
    text-align: center;
}

.support-banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0; /* Remove border-radius for full-width banner */
}

/* Video Hero Section */
.video-hero-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    height: 60vh; /* Fallback height */
    max-height: 550px; /* Maximum height to prevent taking too much space */
    min-height: 400px; /* Minimum height to maintain proportions */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure it appears in correct stacking order */
}

/* Ensure the next element after video hero starts properly */
.video-hero-section + * {
    position: relative;
    z-index: 2; /* Ensure content after video appears above video */
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
    object-position: center center; /* Center the video content */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Softer overlay to let video content show through */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2; /* Above the video but below other content */
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-family: var(--font-primary);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--color-accent, #CF912A);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--color-accent, #CF912A) 85%, black 15%);
    transform: translateY(-2px);
}

.cta-btn {
    background-color: var(--color-secondary);
    color: white;
    padding: 20px 40px;
    text-decoration: none;
    border-radius: 25px;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 4;
}

.cta-btn:hover {
    background-color: color-mix(in srgb, var(--color-secondary) 85%, white 15%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}


.video-link {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    z-index: 2;
    transition: background-color 0.3s ease;
}

.video-link:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Global Hero Section - Consolidated styles for all internal pages */
.hero-section {
    width: 100%;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 450px; /* Fixed height for Desktop */
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-attachment: fixed; /* Parallax effect */
    background-position: center 20% !important; /* To avoid cutting heads */
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevent background from leaking */
}

/* Overlay for background image hero section - Clean, simple shadow */
.hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Clean semi-transparent layer */
    z-index: 1;
}

/* Responsive adjustments for mobile devices */
@media (max-width: 1024px) {
    .hero-section {
        height: 400px;
    }

    .hero-placeholder {
        background-attachment: scroll; /* Disable parallax on tablets for performance */
        background-position: center 20% !important; /* Maintain proper framing */
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 350px;
    }

    .hero-placeholder {
        background-attachment: scroll; /* Disable parallax on mobile for performance */
        background-position: center 20% !important; /* Maintain proper framing */
    }
}

/* Highlights Section */
.highlights-section {
    padding: 80px 0;
    background-color: #FFFFFF;
    position: relative;
    z-index: 1; /* Ensure it appears above the video hero if needed */
}

.section-title {
    font-family: var(--font-primary);
    position: relative;
    text-align: center;
    margin: 0 0 40px 0;
    color: var(--color-primary);
}

.section-title::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    height: 4px;
    width: 80px; /* Increase width as specified */
    background-color: var(--color-accent); /* Yellow accent color as specified */
    border-radius: 2px;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.highlight-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.highlight-image {
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.highlight-card:hover .highlight-overlay {
    opacity: 1;
}

.highlight-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.highlight-link:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.highlight-content {
    padding: 20px;
}

.highlight-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin: 0 0 10px 0;
}

.highlight-description {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--color-text);
    line-height: var(--line-height-base);
    margin: 0 0 15px 0;
}

/* Contact & Map Section */
.contact-map-section {
    padding: 80px 0;
    background-color: #F5F5F5;
    position: relative;
    z-index: 1; /* Ensure it appears above the video hero if needed */
}

.contact-map-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.contact-item i {
    color: var(--color-accent);
    font-size: 1.2rem;
    margin-top: 5px;
}

.contact-item h3 {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--color-primary);
    margin: 0 0 5px 0;
}

.contact-item p {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--color-text);
    margin: 0;
    line-height: var(--line-height-base);
}

.map-container {
    flex: 1;
    min-height: 300px;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    padding-bottom: 75%; /* 4:3 aspect ratio */
}

.map-placeholder iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}


@media (max-width: 1024px) {
    .video-hero-section {
        height: 50vh;
        max-height: 500px;
        min-height: 350px;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem; /* Scale down H1 on mobile to avoid text overlapping images */
    }

    .support-banner-image {
        max-height: 150px;
        object-fit: cover;
    }

    .video-hero-section {
        height: 40vh;
        max-height: 350px; /* Reduced height on mobile to prevent pushing content down */
        min-height: 250px;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .contact-map-container {
        flex-direction: column;
    }

    .video-link {
        bottom: 20px;
        right: 20px;
        font-size: 0.9rem;
    }
}

/* Responsive Map Styling */
.map-responsive {
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    height: 0;
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border: 0;
}