/* Master Layout Styles */

/* CSS Variables for shared layout values */
:root {
    --navbar-height: 100px;
    --section-padding: 2rem 0;
}

/* Section 1 - Hero Section */
.master-layout-hero {
    position: relative;
    overflow: hidden;
    height: 25vh;
    min-height: 250px;
    top: var(--navbar-height);
}

.section-heading-container {
    height: 25vh;
    min-height: 250px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

.hero-content .container-fluid {
    max-width: 100%;
}

.hero-content h1 {
    text-align: center !important;
    margin: 0 auto;
}

.font-libre--bold {
    font-weight: 700;
}

/* Animation classes (if animate.css is not already included) */
.animate__fadeInUp {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Section 2 - Content Section */
.master-layout-content {
    /*padding: var(--section-padding);*/
    background-color: #ffffff;
    position: relative;
    top: var(--navbar-height);
    padding: 2rem 0;
}



/* Block layout for sections */
.master-layout-hero,
.master-layout-content,
.master-layout-form {
    display: block;
    width: 100%;
    margin-bottom: 0;
}

/* Minimum viewport height utilities */
.min-vh-50 {
    min-height: 50vh;
}

.content-section-image {
    height: auto;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    position: relative;
}

.left-col {
    padding: var(--section-padding);
}

/* Style the actual image within the container */
.content-section-image-inner {
    max-width: 85%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.content-section-text {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

ul {
    color: var(--colour-primary-dark);
}

.content-section-text ul {
    margin-left: 1em;
    list-style-type: disc !important;
    color: #ffcc00;
}

/* Section 3 - Form Section */
.master-layout-form {
    padding: var(--section-padding);
    background-color: #f8f9fa;
    position: relative;
    top: var(--navbar-height);
}

.form-section-content,
.form-section-form {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .master-layout-hero {
        height: 30vh;
        min-height: 200px;
    }
    
    .section-heading-container {
        height: 30vh;
        min-height: 200px;
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem !important;
    }
    
    .min-vh-50 {
        min-height: auto;
    }
    
    /* Responsive typography for mobile */
    .master-layout-content h1,
    .master-layout-form h1 {
        font-size: 2rem;
    }
    
    .master-layout-content h2,
    .master-layout-form h2 {
        font-size: 1.75rem;
    }
    
    .master-layout-content h3,
    .master-layout-form h3 {
        font-size: 1.5rem;
    }
    
    .master-layout-content {
        min-height: auto;
    }
    
    .content-section-image {
        min-height: 300px;
        margin-bottom: 2rem;
    }
    
    .content-section-image-inner {
        max-width: 100%;
        max-height: 300px;
    }
    
    .content-section-text {
        min-height: auto;
        padding: 2rem 1rem;
    }
    
    .form-section-content,
    .form-section-form {
        min-height: auto;
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .master-layout-hero {
        height: 25vh;
        min-height: 180px;
    }
    
    .section-heading-container {
        height: 25vh;
        min-height: 180px;
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem !important;
    }
}

/* Utility Classes */
.vh-100 {
    height: 100vh;
}

.bg-light-grey {
    background-color: #f8f9fa;
}

.border-light-grey {
    border: 1px solid #dee2e6;
}

.background-dfwhite {
    background-color: #ffffff;
}

/* Form Styling Enhancement */
.form-section-form .umbraco-forms-form {
    background: transparent;
    padding: 2rem;
}

/* Content Typography - Consistent with other pages */
.content-section-text h1,
.content-section-text h2,
.content-section-text h3,
.content-section-text h4,
.content-section-text h5,
.content-section-text h6 {
    margin-bottom: 1rem;
    color: #333366;
}

.form-section-content h1,
.form-section-content h2,
.form-section-content h3,
.form-section-content h4,
.form-section-content h5,
.form-section-content h6 {
    margin-bottom: 1rem;
    color: #333366;
}

/* Typography consistent with landing pages */
.master-layout-content p,
.master-layout-form p {
    color: #333366; /* dfblue color */
    font-family: inherit;
    margin-bottom: 1rem;
}

/* Style for individual emojis (JavaScript wraps them in spans) */
.master-layout-content .emoji-border,
.master-layout-form .emoji-border {
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-block;
    margin: 0 2px 0.5em 0;
}

.master-layout-content h1,
.master-layout-content h2,
.master-layout-content h3,
.master-layout-content h4,
.master-layout-content h5,
.master-layout-content h6,
.master-layout-form h1,
.master-layout-form h2,
.master-layout-form h3,
.master-layout-form h4,
.master-layout-form h5,
.master-layout-form h6 {
    color: #333366;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Specific heading sizes to match landing page styling */
.master-layout-content h1,
.master-layout-form h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

.master-layout-content h2,
.master-layout-form h2 {
    font-size: 2rem;
    line-height: 1.3;
}

.master-layout-content h3,
.master-layout-form h3 {
    font-size: 1.75rem;
    line-height: 1.4;
}

.master-layout-content h4,
.master-layout-form h4 {
    font-size: 1.5rem;
    line-height: 1.4;
}

.master-layout-content h5,
.master-layout-form h5 {
    font-size: 1.25rem;
    line-height: 1.5;
}

.master-layout-content h6,
.master-layout-form h6 {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Fixed Footer for Master Layout Only */
/* Use CSS selector to detect when master layout sections are present */
body:has(.master-layout-hero) .footer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}


/* Fallback for browsers that don't support :has() */
@supports not (selector(:has(*))) {
    /* Add a specific class to master layout container */
    .master-layout-container ~ .footer {
        position: relative;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: #ffffff;
        border-top: 1px solid #dee2e6;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
}