/*
Theme Name: Magnolia Media Global
Theme URI: https://magnoliamediaglobal.com
Author: Magnolia Media Global
Version: 11.2 - FINAL CORRECTED + FORM VISIBILITY
Text Domain: magnolia-media

================================================================================
FINAL CORRECTED VERSION
- Visible dropdown links with dark text color
- Hero background locked to menu bottom via margin-top adjustment
- background-attachment: scroll for image movement with content
- Nav height: auto !important, overflow: visible !important
================================================================================
*/

/* ========================================
   CSS VARIABLES & ROOT CONFIGURATION
   ======================================== */

:root {
    /* Brand Colors */
    --mgl-primary-dark: #181818;
    --mgl-accent-green: #548067;
    --mgl-body-text: #666666;
    --mgl-heading-text: #181818;
    --mgl-light-gray: #f9f9f9;
    --mgl-border-gray: #e5e5e5;
    
    /* Layout */
    --mgl-nav-height: 96px;
    --mgl-max-width: 1280px;
    
    /* Transitions */
    --mgl-transition: 0.3s ease;
    --mgl-transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

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

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', sans-serif;
    color: var(--mgl-body-text);
    background-color: #ffffff;
    line-height: 1.6;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
    color: var(--mgl-heading-text);
    font-weight: 700;
    line-height: 1.1;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    line-height: 1.75;
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--mgl-transition);
}

a:hover {
    color: var(--mgl-accent-green);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   CONTAINER & MAIN OVERFLOW GUARDS
   ======================================== */

main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    margin-top: 0;
    transition: margin-top var(--mgl-transition-smooth);
}

section {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ========================================
   FIXED NAVIGATION
   3-Column Layout with Visible Dropdown
   ======================================== */

.mgl-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 999999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    overflow-x: hidden;
    overflow-y: visible;
    height: auto !important;
    min-height: 96px;
}

.mgl-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    min-height: 96px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

/* LEFT: Logo */
.mgl-nav-logo {
    flex-shrink: 0;
    height: 96px;
    display: flex;
    align-items: center;
}

.mgl-nav-logo img {
    height: 80px;
    width: auto;
}

/* CENTER: Menu (5 Links Tight Group) */
.mgl-nav-menu-desktop {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    height: 96px;
}

.mgl-nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    list-style: none;
    position: relative;
}

@media (max-width: 767px) {
    .mgl-nav-menu-desktop {
        display: none;
    }
}

.mgl-nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mgl-heading-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color var(--mgl-transition);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: 'Lato', sans-serif;
    position: relative;
    white-space: nowrap;
}

.mgl-nav-link:hover {
    color: var(--mgl-accent-green);
}

/* Dropdown (Absolute positioning - VISIBLE) */
#services-dropdown {
    position: absolute;
    top: 96px;
    left: -50px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 350px;
    z-index: 999998;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--mgl-transition-smooth), opacity var(--mgl-transition-smooth);
    opacity: 0;
    display: none;
}

#services-dropdown a {
    display: block;
    padding: 1rem 1.5rem;
    color: #181818;
    text-decoration: none;
    text-transform: none;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0;
    transition: background-color var(--mgl-transition);
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-family: 'Heebo', sans-serif;
}

#services-dropdown a:last-child {
    border-bottom: none;
}

#services-dropdown a:hover {
    background-color: #f9f9f9;
    color: var(--mgl-accent-green);
}

/* RIGHT: Social + CTA + Hamburger */
.mgl-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    height: 96px;
}

.mgl-nav-social {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .mgl-nav-social {
        display: flex;
    }
}

.mgl-nav-cta {
    display: none;
}

@media (min-width: 768px) {
    .mgl-nav-cta {
        display: block;
    }
}

.mgl-hamburger {
    display: flex;
    margin-left: 0;
}

@media (min-width: 768px) {
    .mgl-hamburger {
        display: none;
    }
}

/* ========================================
   HERO SECTION - LOCKED TO MENU BOTTOM
   Background: scroll for image movement
   ======================================== */

#home {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(24, 24, 24, 0.85) 0%, rgba(24, 24, 24, 0.85) 100%),
                url('https://magnoliamediaglobal.com/wp-content/uploads/2022/08/Training-courses-3-1.png');
    background-size: cover;
    background-position: top center !important;
    background-attachment: scroll !important;
    background-color: var(--mgl-primary-dark);
    overflow: visible;
    padding-top: 96px;
    margin-top: 0;
    transition: margin-top var(--mgl-transition-smooth);
}

.mgl-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.mgl-hero-title {
    color: white;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.mgl-hero-highlight {
    color: var(--mgl-accent-green);
    display: inline-block;
}

.mgl-hero-subtitle {
    color: #e5e7eb;
    line-height: 1.8;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
}

.mgl-hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.mgl-btn {
    padding: 1rem 2.5rem;
    font-weight: bold;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--mgl-transition);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.mgl-btn:hover {
    transform: translateY(-2px);
}

.mgl-btn-primary {
    background-color: var(--mgl-accent-green);
    color: white;
    border-color: var(--mgl-accent-green);
    box-shadow: 0 10px 25px rgba(84, 128, 103, 0.3);
}

.mgl-btn-primary:hover {
    box-shadow: 0 15px 35px rgba(84, 128, 103, 0.4);
}

.mgl-btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.mgl-btn-secondary:hover {
    background-color: white;
    color: var(--mgl-primary-dark);
}

/* ========================================
   IMPACT STATS
   ======================================== */

.mgl-stats-section {
    padding: 4rem 1rem;
    background-color: white;
}

.mgl-stats-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .mgl-stats-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.mgl-stat-item {
    padding: 2rem;
}

.mgl-stat-number {
    color: var(--mgl-accent-green);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.mgl-stat-label {
    color: var(--mgl-body-text);
    line-height: 1.75;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

#About-Us {
    padding: 6rem 1rem;
    background-color: #f9f9f9;
}

.mgl-about-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .mgl-about-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mgl-about-image {
    order: 2;
}

.mgl-about-image img {
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mgl-about-content {
    order: 1;
}

.mgl-about-content h2 {
    color: var(--mgl-heading-text);
    margin-bottom: 1.5rem;
}

.mgl-about-content p {
    color: var(--mgl-body-text);
    line-height: 1.75;
    margin-bottom: 1rem;
}

/* ========================================
   SERVICES SECTION (ACCORDION)
   ======================================== */

.mgl-services-section {
    padding: 6rem 1rem;
    background-color: white;
}

.mgl-services-container {
    max-width: 1280px;
    margin: 0 auto;
}

.mgl-services-title {
    text-align: center;
    color: var(--mgl-heading-text);
    margin-bottom: 3rem;
}

.mgl-accordion-item {
    padding: 2rem;
    background-color: white;
    border-radius: 1rem;
    border: 1px solid var(--mgl-border-gray);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
}

.mgl-accordion-item:hover {
    border-color: var(--mgl-accent-green);
    box-shadow: 0 4px 12px rgba(84, 128, 103, 0.1);
}

.mgl-accordion-item.active {
    background-color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--mgl-accent-green);
    transform: translateY(-2px);
}

.mgl-accordion-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    user-select: none;
    cursor: pointer;
}

.mgl-accordion-icon {
    width: 64px;
    height: 64px;
    background-color: #f0f0f0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    transition: all var(--mgl-transition-smooth);
}

.mgl-accordion-item.active .mgl-accordion-icon {
    background: linear-gradient(135deg, #548067 0%, #6b9d82 100%);
    color: white;
    transform: scale(1.1);
}

.mgl-accordion-title {
    flex: 1;
    font-size: 1.125rem;
    font-weight: bold;
    color: var(--mgl-heading-text);
    text-align: left;
    margin: 0;
}

.mgl-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--mgl-transition-smooth), opacity var(--mgl-transition-smooth);
    opacity: 0;
}

.mgl-accordion-item.active .mgl-accordion-content {
    max-height: 1500px;
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--mgl-border-gray);
}

.mgl-accordion-text {
    color: var(--mgl-body-text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.mgl-accordion-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.mgl-accordion-list-item {
    color: var(--mgl-body-text);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.mgl-accordion-cta-btn {
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--mgl-transition);
    border: 2px solid var(--mgl-accent-green);
    cursor: pointer;
    white-space: nowrap;
    background-color: var(--mgl-accent-green);
    color: white;
    margin-top: 1rem;
}

.mgl-accordion-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(84, 128, 103, 0.3);
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */

#testimonials {
    padding: 6rem 1rem;
    background-color: #f9f9f9;
}

.mgl-testimonials-container {
    max-width: 1280px;
    margin: 0 auto;
}

.mgl-testimonials-title {
    text-align: center;
    color: var(--mgl-heading-text);
    margin-bottom: 3rem;
}

.mgl-testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .mgl-testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.mgl-testimonial {
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 1rem;
    border-left: 4px solid var(--mgl-accent-green);
    transition: all var(--mgl-transition);
}

.mgl-testimonial:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.mgl-testimonial-stars {
    color: var(--mgl-accent-green);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.mgl-testimonial-text {
    color: var(--mgl-body-text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.mgl-testimonial-author {
    color: var(--mgl-heading-text);
    font-weight: bold;
    margin: 0;
}

.mgl-testimonial-role {
    color: var(--mgl-body-text);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

/* ========================================
   CONTACT SECTION
   ======================================== */

#Contact {
    padding: 6rem 1rem;
    background-color: #181818;
}

.mgl-contact-container {
    max-width: 1280px;
    margin: 0 auto;
}

.mgl-contact-cta {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
}

.mgl-contact-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.mgl-contact-text {
    color: #cccccc;
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.mgl-contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    .mgl-contact-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.mgl-contact-btn {
    padding: 1rem 2.5rem;
    color: white;
    font-weight: bold;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--mgl-transition);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.mgl-contact-btn-primary {
    background-color: var(--mgl-accent-green);
    border-color: var(--mgl-accent-green);
}

.mgl-contact-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(84, 128, 103, 0.3);
}

.mgl-contact-btn-secondary {
    background-color: transparent;
    border-color: white;
    color: white;
}

.mgl-contact-btn-secondary:hover {
    background-color: white;
    color: var(--mgl-primary-dark);
    transform: translateY(-2px);
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.mgl-footer {
    background-color: var(--mgl-primary-dark);
    color: #999999;
    padding: 4rem 1.25rem 2rem;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    z-index: 10;
}

.mgl-footer-inner {
    max-width: var(--mgl-max-width);
    margin: 0 auto;
    width: 100%;
}

.mgl-footer-logo {
    flex-shrink: 0;
    margin-bottom: 3rem;
}

.mgl-footer-logo img {
    height: 200px;
    width: auto;
}

.mgl-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .mgl-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .mgl-footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mgl-footer-column h4 {
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.mgl-footer-column a {
    color: #999999;
    text-decoration: none;
    transition: color var(--mgl-transition);
    display: block;
    margin-bottom: 0.75rem;
}

.mgl-footer-column a:hover {
    color: var(--mgl-accent-green);
}

.mgl-footer-bottom {
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    gap: 1rem;
}

@media (min-width: 768px) {
    .mgl-footer-bottom {
        flex-direction: row;
    }
}

/* ========================================
   WORDPRESS COMPATIBILITY
   ======================================== */

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
}

.wp-caption {
    background: #f1f1f1;
    border: 1px solid #ddd;
    max-width: 100%;
    padding: 0.5em;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   WPFORMS SYSTEM ACTIVATION OVERRIDE
   Ensures visibility against global resets
   ======================================== */

.wpforms-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 400px;
}

.wpforms-container input[type="text"], 
.wpforms-container input[type="email"], 
.wpforms-container select, 
.wpforms-container textarea {
    padding: 15px !important;
    min-height: 54px !important;
    display: block !important;
    width: 100% !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #181818 !important;
    margin-bottom: 1.5rem !important;
    visibility: visible !important;
}

.wpforms-container label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #181818 !important;
}

.wpforms-submit {
    background-color: var(--mgl-accent-green) !important;
    color: #fff !important;
    padding: 1rem 3rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
}