/*
Theme Name: Tofai Themes
Theme URI: https://tofai.com/
Author: Tofai
Author URI: https://tofai.com/
Description: A premium, modern WordPress theme for Central Board of Education Canada.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tofai-themes
*/

/* --- Brand DNA --- */
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-ThinItalic.ttf') format('truetype');
    font-weight: 100;
    font-style: italic;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}
@font-face {
    font-family: 'Lato';
    src: url('../../Lato/Lato-BlackItalic.ttf') format('truetype');
    font-weight: 900;
    font-style: italic;
}

:root {
    --primary: #b72929;
    --secondary: #1A1A1A;
    --hover: #9b2222;
    --light: #fffdee;
    --text-main: #1A1A1A;
    --text-sec: #1A1A1A;
    --border-subtle: #e5dfb8;
    --site-bg: #fffdee;
    --dark-cream: #f7f0cb;
    --font-heading: 'Lato', sans-serif;
    --font-sans: 'Lato', sans-serif;
    --shadow-card: 0 0 0 1px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- Base Styles --- */
body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: #fffdee;
    line-height: 1.75;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    margin-top: 0;
}

h1 { font-size: 2.75rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }

p { font-size: 1.125rem; margin-bottom: 1.25rem; color: var(--text-sec); }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hover);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Components --- */

/* Header */
.site-header {
    background: #fffdee;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    padding: 1.25rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-text {
    display: flex;
    flex-col: column;
    
    letter-spacing: 0.05em;
    font-weight: 700;
    line-height: 1;
}

.logo-text .top { font-size: 1.4rem; color: var(--secondary); }
.logo-text .bottom { font-size: 1.4rem; color: var(--primary); margin-top: 0.25rem; }

.search-box {
    position: relative;
    width: 100%;
    max-width: 256px;
}

.search-input {
    border: 1px solid #d1d5db;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    width: 100%;
    background: #f9fafb;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(216, 6, 33, 0.1);
}

.lang-toggle {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-toggle .active {
    background: rgba(216, 6, 33, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
}

/* Navigation */
.main-navigation {
    border-top: 1px solid var(--border-subtle);
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.main-navigation li {
    position: relative;
}

.main-navigation li a {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--secondary);
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 2px solid transparent;
}

.main-navigation li a:hover,
.main-navigation li.current-menu-item > a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Dropdown */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--site-bg);
    border-top: 3px solid var(--primary);
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.1);
    min-width: 16rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul li a {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    border-left: 3px solid transparent;
    color: var(--text-sec);
    transition: all 0.2s ease;
}

.main-navigation ul ul li:last-child a {
    border-bottom: none;
}

.main-navigation ul ul li a:hover {
    background: var(--light);
    border-left-color: var(--primary);
    color: var(--primary);
    padding-left: 1.75rem;
}

/* Section Styling */
.section { padding: 4rem 0; border-bottom: 1px solid var(--border-subtle); }
.section-light { background-color: var(--light); }
.section-white { background-color: transparent; }

.section-title-wrapper {
    text-align: center;
    max-width: 56rem;
    margin: 0 auto 4rem;
}

.section-label {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.1em;
    
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.card-flat {
    background: transparent;
    padding: 2.5rem;
    border: 1px solid var(--border-subtle);
    box-shadow: none;
    transition: all 0.3s ease;
}

.card-flat:hover {
    box-shadow: var(--shadow-hover);
}

.icon-box {
    width: 3.5rem;
    height: 3.5rem;
    background: #fffdee;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: #fff;
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 3px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-widget h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-widget p {
    color: #9ca3af;
    font-size: 1.05rem;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: inherit;
}

.footer-links a:hover {
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--hover);
    color: #fff;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: #000;
    color: #fff;
}
/* --- Responsive Base --- */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem !important; }
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.35rem !important; }
    p { font-size: 1rem !important; }
    
    .container { padding: 0 1rem; }
    
    .header-top { flex-direction: column; text-align: center; padding: 1rem 0; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    
    .section { padding: 3rem 0; }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem !important; }
    .btn { width: 100%; text-align: center; }
}

/* --- FAQ Accordion --- */
.faq-item {
    background: transparent;
    border: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.faq-item[open] {
    border-color: var(--primary);
    background: var(--light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.faq-question {
    list-style: none;
    cursor: pointer;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    padding-right: 2rem;
}

.faq-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-sec);
    line-height: 1.8;
    font-size: 1.05rem;
}

.faq-answer ul {
    margin-top: 1rem;
    margin-bottom: 0;
}
