/*
Theme Name: Promise Money Blocks
Theme URI: https://promisemoney.co.uk
Author: Promise Money Team
Description: A modern, block-based FSE theme for Promise Money 2026.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
*/

/* 
  Global styles are handled via theme.json.
  Add custom CSS here only if strictly necessary and cannot be handled by blocks.
*/
.glass {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, #00D2D3, #9B59B6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Author / Team Card Styles */
.author-card {
    background: #FFFFFF;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.02);
    height: 100%;
}

.author-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    border-color: rgba(155, 89, 182, 0.2);
}

.author-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.author-card:hover .author-img {
    transform: scale(1.05);
}

.author-info {
    padding: 2rem;
    background: #FFFFFF;
    position: relative;
    z-index: 2;
}

.author-role {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, rgba(0, 210, 211, 0.1), rgba(155, 89, 182, 0.1));
    border-radius: 8px;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: #9B59B6;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.author-bio {
    font-size: 1rem;
    color: #555555;
    margin-top: 1rem;
}

/* =========================================
   NAVIGATION & MEGA MENU STYLES
   ========================================= */

/* Targeted defensive rules to prevent plugin CSS conflicts */
/* These rules ensure visibility without disrupting existing layouts */

/* CRITICAL FIX: Override position:fixed from other plugins */
/* This ensures the menu stays within the header layout */
/* DISABLED: This was breaking the mega menu dropdown positioning */
/*
.menu-main-container,
nav.menu-main-container,
#menuFull .menu-main-container,
#menuFull nav {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
}
*/

/* Fix header layout: ensure menu is on same row as logo and registration */
#menuFull {
    width: auto !important;
    flex: 1 !important;
    order: 2 !important;
}

#contact {
    order: 3 !important;
}

#logo {
    order: 1 !important;
}

/* Ensure WordPress block navigation is visible (for block-based menus) */
.wp-block-navigation,
nav.wp-block-navigation {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Navigation items - prevent hiding but don't force display properties */
.wp-block-navigation-item,
.wp-block-navigation .wp-block-navigation-item {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Navigation links - ensure visibility */
.wp-block-navigation-item a,
.wp-block-navigation-item__content {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Submenu containers - high z-index to stay on top */
.wp-block-navigation__submenu-container {
    z-index: 99999 !important;
    visibility: visible !important;
}

/* Preserve existing header layout - don't override custom menu structures */
/* Target only the specific elements that might be hidden by plugins */
#mainHeader,
#menuFull,
.menuList,
.menu-main-container {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure menu items in custom menus are visible */
.menuList li,
.menuList li a {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mega Menu Specific Styles */
.mega-menu-item {
    position: static !important;
}

.mega-menu-item .wp-block-navigation__submenu-container {
    width: 90vw;
    max-width: 1000px;
    left: 50% !important;
    transform: translateX(-50%);
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem;
    padding: 2rem !important;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff !important;
    z-index: 99999 !important;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
}

.mega-menu-header {
    font-weight: 800;
    color: #00D2D3;
    /* Primary Teal */
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
}

.mega-menu-link {
    color: #555555;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.mega-menu-link:hover {
    color: #9B59B6;
    /* Primary Purple */
    background: transparent;
}

/* Value Card Styles (from original styles.css) */
.value-card {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: left;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 210, 211, 0.2);
}

.value-icon {
    font-size: 2.5rem;
    color: #00D2D3;
    /* Primary Teal */
    margin-bottom: 1rem;
}

/* --- Bridging 100 Blocks CSS --- */

/* Helpers */
.text-teal {
    color: #00D2D3;
}

.text-purple {
    color: #9B59B6;
}

/* Hero Block */
.hero {
    height: 95vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(155, 89, 182, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(0, 210, 211, 0.05), transparent),
        linear-gradient(to right, rgba(253, 251, 255, 0.98), rgba(253, 251, 255, 0.85)),
        url('assets/hero_bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
    /* Fallback padding */
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 60%;
    background: linear-gradient(135deg, #00D2D3, #9B59B6);
    filter: blur(150px);
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 5rem !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    margin-bottom: 2rem !important;
    letter-spacing: -2px !important;
    margin-top: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

/* Make span elements (like "100") inherit the h1 size */
.hero h1 span {
    font-size: inherit !important;
    vertical-align: baseline !important;
}

.hero p {
    font-size: 1.4rem;
    color: #555555;
    font-weight: 400;
    max-width: 600px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem !important;
    }

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

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    padding-left: 3.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 210, 211, 0.3), 0 16px 48px rgba(0, 0, 0, 0.12);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9B59B6;
    font-size: 1.2rem;
}

/* Grid Layout */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

/* Pillar Card (Extends Value Card logic) */
.pillar-card {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.pillar-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 210, 211, 0.2);
}

.pillar-card h3 {
    color: #9B59B6;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
    text-align: center;
}

.pillar-card p {
    font-size: 0.95rem;
    color: #555555;
    margin-bottom: 1rem;
    flex-grow: 1;
    text-align: center;
}

.pillar-link {
    font-weight: 700;
    color: #00D2D3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.overlap-hero {
    margin-top: -5rem;
    position: relative;
    z-index: 2;
}

/* --- Bridging 100 Content Page Styles --- */

/* Accordion */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    counter-reset: question-counter;
}

details.accordion-item {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
}

details.accordion-item[open] {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(155, 89, 182, 0.2);
}

summary.accordion-header {
    padding: 1.2rem;
    cursor: pointer;
    font-weight: 600;
    color: #1A1A1A;
    list-style: none;
    position: relative;
    padding-right: 3rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

summary.accordion-header::before {
    counter-increment: question-counter;
    content: "Q" counter(question-counter) ". ";
    color: #00D2D3;
    font-weight: 800;
    margin-right: 0.5rem;
    min-width: 2.5rem;
}

summary.accordion-header::-webkit-details-marker {
    display: none;
}

summary.accordion-header::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #00D2D3;
    transition: transform 0.3s ease;
    font-weight: 400;
}

details[open] summary.accordion-header::after {
    transform: translateY(-50%) rotate(45deg);
    color: #9B59B6;
}

.accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #555555;
    line-height: 1.7;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    margin-top: -0.5rem;
    padding-top: 1rem;
}

/* TL;DR Box */
.tldr-box {
    background: rgba(0, 210, 211, 0.1);
    border-left: 4px solid #00D2D3;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #1A1A1A;
}

.tldr-label {
    font-weight: 800;
    color: #00D2D3;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.3rem;
}

/* Sidebar Nav */
.sidebar-heading {
    color: #9B59B6;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 0.5rem;
}

.sidebar-links a {
    text-decoration: none;
    color: #555555;
    font-weight: 500;
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-links a:hover,
.sidebar-links a.active {
    background: rgba(0, 210, 211, 0.1);
    color: #00D2D3;
    transform: translateX(5px);
}

/* =========================================
   Product Identity Colors
   ========================================= */

/* Commercial / Business (Blues) */
.text-comm-blue {
    color: #2980b9 !important;
}

.bg-comm-blue {
    background-color: #2980b9 !important;
}

.border-comm-blue {
    border-color: #2980b9 !important;
}

.text-asset-slate {
    color: #34495e !important;
}

.bg-asset-slate {
    background-color: #34495e !important;
}

.text-invoice-sky {
    color: #3498db !important;
}

.bg-invoice-sky {
    background-color: #3498db !important;
}

.text-lease-teal {
    color: #00cec9 !important;
}

.bg-lease-teal {
    background-color: #00cec9 !important;
}

/* Retirement (Golds/Oranges) */
.text-equity-gold {
    color: #f39c12 !important;
}

.bg-equity-gold {
    background-color: #f39c12 !important;
}

.border-equity-gold {
    border-color: #f39c12 !important;
}

.text-rio-orange {
    color: #d35400 !important;
}

.bg-rio-orange {
    background-color: #d35400 !important;
}

/* Consumer (Pinks/Purples) */
.text-homeowner-pink {
    color: #e84393 !important;
}

.bg-homeowner-pink {
    background-color: #e84393 !important;
}

.border-homeowner-pink {
    border-color: #e84393 !important;
}

.text-contractor-indigo {
    color: #4834d4 !important;
}

.bg-contractor-indigo {
    background-color: #4834d4 !important;
}

/* Property Investment (Greens/Reds) */
.text-btl-green {
    color: #27ae60 !important;
}

.bg-btl-green {
    background-color: #27ae60 !important;
}

.border-btl-green {
    border-color: #27ae60 !important;
}

.text-hmo-forest {
    color: #16a085 !important;
}

.bg-hmo-forest {
    background-color: #16a085 !important;
}

.text-dev-red {
    color: #c0392b !important;
}

.bg-dev-red {
    background-color: #c0392b !important;
}

.border-dev-red {
    border-color: #c0392b !important;
}

/* Utility Backgrounds */
.has-light-gray-bg-background-color {
    background-color: #f8f9fa !important;
}

.has-white-background-color {
    background-color: #ffffff !important;
}

.has-teal-background-color {
    background-color: #00d2d3 !important;
}

.has-purple-background-color {
    background-color: #5B2C6F !important;
}

/* Deep Purple */

/* Border Utilities */
.has-teal-border-color {
    border-color: #00d2d3 !important;
}

.has-purple-border-color {
    border-color: #5B2C6F !important;
}

.has-gray-300-border-color {
    border-color: #e2e8f0 !important;
}

/* Contact Form 7 Styling */
.wpcf7-form {
    font-family: 'Outfit', sans-serif;
}

.wpcf7-form label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    color: #4a5568;
}

.wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 1rem;
}

.wpcf7-text,
.wpcf7-email,
.wpcf7-textarea,
.wpcf7-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fff;
}

.wpcf7-text:focus,
.wpcf7-email:focus,
.wpcf7-textarea:focus,
.wpcf7-select:focus {
    border-color: #5B2C6F;
    /* Brand Purple */
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 44, 111, 0.1);
}

.wpcf7-submit {
    background-color: #5B2C6F;
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.wpcf7-submit:hover {
    background-color: #4a245a;
}

/* Two Column Layout for CF7 */
.cf7-row {
    display: flex;
    gap: 1rem;
}

.cf7-col {
    flex: 1;
}

@media (max-width: 600px) {
    .cf7-row {
        flex-direction: column;
        gap: 0;
    }
}

/* =========================================
   BRIDGING 100 PAGE LAYOUT
   ========================================= */

/* Center the main content columns (The Basics + Quick Links) */
.wp-block-columns.alignwide {
    margin-left: auto !important;
    margin-right: auto !important;
}