/*
Theme Name: Tofai Theme CPD
Theme URI: https://cpdframework.org/
Author: Antigravity
Description: A modern, corporate WordPress theme for the Continuing Professional Development Framework.
Version: 1.0.0
Text Domain: tofai-theme-cpd
*/

/* Custom Fonts Registration */
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-ThinItalic.otf') format('opentype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-ExtraLight.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-ExtraLightItalic.otf') format('opentype');
    font-weight: 200;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-SemiBoldItalic.otf') format('opentype');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-ExtraBoldItalic.otf') format('opentype');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Grift';
    src: url('CPD Font/Grift-BlackItalic.otf') format('opentype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* Custom Globals */
body { font-family: 'Grift', sans-serif; color: #4B5563; -webkit-font-smoothing: antialiased; background-color: #F9FAFB; }

/* Base heading styles (Fonts only, default color applies unless overridden by utility classes) */
h1, h2, h3, h4, h5, h6 { font-family: 'Grift', sans-serif; }

/* Default color for headings that do NOT have a custom text- color class */
h1:not([class*="text-"]), h2:not([class*="text-"]), h3:not([class*="text-"]), h4:not([class*="text-"]), h5:not([class*="text-"]), h6:not([class*="text-"]) {
    color: #0A254D;
}

/* Allow headings nested in dark/white containers with explicit text color classes to inherit white/light colors automatically */
.text-white h1:not([class*="text-"]), .text-white h2:not([class*="text-"]), .text-white h3:not([class*="text-"]), .text-white h4:not([class*="text-"]), .text-white h5:not([class*="text-"]), .text-white h6:not([class*="text-"]),
.text-gray-100 h1:not([class*="text-"]), .text-gray-100 h2:not([class*="text-"]), .text-gray-100 h3:not([class*="text-"]), .text-gray-100 h4:not([class*="text-"]), .text-gray-100 h5:not([class*="text-"]), .text-gray-100 h6:not([class*="text-"]),
.text-gray-200 h1:not([class*="text-"]), .text-gray-200 h2:not([class*="text-"]), .text-gray-200 h3:not([class*="text-"]), .text-gray-200 h4:not([class*="text-"]), .text-gray-200 h5:not([class*="text-"]), .text-gray-200 h6:not([class*="text-"]),
.bg-navy h1:not([class*="text-"]), .bg-navy h2:not([class*="text-"]), .bg-navy h3:not([class*="text-"]), .bg-navy h4:not([class*="text-"]), .bg-navy h5:not([class*="text-"]), .bg-navy h6:not([class*="text-"]),
.bg-crimson h1:not([class*="text-"]), .bg-crimson h2:not([class*="text-"]), .bg-crimson h3:not([class*="text-"]), .bg-crimson h4:not([class*="text-"]), .bg-crimson h5:not([class*="text-"]), .bg-crimson h6:not([class*="text-"]) {
    color: inherit;
}

/* Page Transitions */
.page-view { animation: fadeIn 0.4s ease-in-out forwards; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero Split Screen Fixes */
.hero-clip { clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%); }
@media (max-width: 1024px) { .hero-clip { clip-path: none; } }

/* Corporate Form Inputs */
.official-input {
    background-color: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 4px; /* Sharp professional corners */
    transition: all 0.2s ease-in-out;
}
.official-input:focus {
    border-color: #0A254D;
    box-shadow: 0 0 0 1px #0A254D;
    outline: none;
}

/* Banner Overlays */
.banner-overlay {
    background: linear-gradient(90deg, rgba(10,37,77,0.95) 0%, rgba(10,37,77,0.7) 100%);
}

/* FAQ Accordion Details */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] summary ~ * { animation: slideDown .3s ease-in-out; }
@keyframes slideDown { 0% {opacity: 0; transform: translateY(-10px)} 100% {opacity: 1; transform: translateY(0)} }

/* Ensure high contrast and readability for banner label badges across all sections */
.banner-overlay span.inline-block {
    color: #ffffff !important;
}

/* Ninja Forms Theme Integration Styles (Robust) */
.ninja-forms-container .nf-form-content {
    padding: 0 !important;
}
.ninja-forms-container .nf-field-container {
    margin-bottom: 24px !important;
}
.ninja-forms-container .nf-field-label label {
    font-weight: 600 !important;
    color: #0A254D !important; /* Navy */
    margin-bottom: 8px !important;
    font-size: 14px !important;
    display: inline-block !important;
}

/* Target all inputs, textareas, and selects inside Ninja Forms */
.ninja-forms-container .nf-field-element input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.ninja-forms-container .nf-field-element textarea,
.ninja-forms-container .nf-field-element select,
.ninja-forms-container .ninja-forms-field {
    width: 100% !important;
    padding: 14px 16px !important;
    background-color: #F9FAFB !important;
    border: 1px solid #D1D5DB !important; /* Darker border for visibility */
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #4B5563 !important;
    transition: all 0.2s ease-in-out !important;
    font-family: inherit !important;
    box-shadow: none !important;
    -webkit-appearance: none !important; /* Fix for iOS */
}

/* Focus state */
.ninja-forms-container .nf-field-element input:focus,
.ninja-forms-container .nf-field-element textarea:focus,
.ninja-forms-container .ninja-forms-field:focus {
    border-color: #0A254D !important;
    box-shadow: 0 0 0 1px #0A254D !important;
    outline: none !important;
    background-color: #FFFFFF !important;
}

/* Target the Submit Button aggressively */
.ninja-forms-container .nf-field-element input[type="button"],
.ninja-forms-container .nf-field-element input[type="submit"],
.ninja-forms-container .nf-field-element button,
.ninja-forms-container button[type="button"],
.ninja-forms-container input[type="button"].ninja-forms-field,
.ninja-forms-container input[type="submit"].ninja-forms-field {
    background-color: #D32F2F !important; /* Crimson */
    color: #ffffff !important;
    font-weight: bold !important;
    border: none !important;
    border-radius: 9999px !important; /* Full rounded pill */
    padding: 16px 32px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    width: auto !important;
    display: inline-block !important;
    font-size: 16px !important;
    text-align: center !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
}

.ninja-forms-container .nf-field-element input[type="button"]:hover,
.ninja-forms-container .nf-field-element input[type="submit"]:hover,
.ninja-forms-container .nf-field-element button:hover,
.ninja-forms-container input[type="button"].ninja-forms-field:hover,
.ninja-forms-container input[type="submit"].ninja-forms-field:hover {
    background-color: #b71c1c !important; /* Darker Crimson */
    box-shadow: 0 10px 15px -3px rgba(211, 47, 47, 0.2), 0 4px 6px -2px rgba(211, 47, 47, 0.1) !important;
}

.ninja-forms-container .nf-error-msg {
    font-size: 13px !important;
    color: #D32F2F !important;
    margin-top: 6px !important;
}

