/*
Theme Name: Cora
Theme URI: https://example.com/cora
Author: Tunde Falodun
Author URI: https://example.com
Description: A lightweight, high-performance custom WordPress theme built from scratch with full Elementor compatibility.
Version: 1.0.0
Text Domain: cora
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* =================================================================at
   1. CSS Variables & Reset
   ============================================================= */
:root {
    --cora-primary-color: #0073aa;
    --cora-text-color: #333333;
    --cora-bg-color: #ffffff;
    --cora-border-color: #dddddd;
    --cora-container-width: 1200px;
    --cora-font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--cora-font-main);
    color: var(--cora-text-color);
    background-color: var(--cora-bg-color);
    line-height: 1.6;
}

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

a {
    color: var(--cora-primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =============================================================
   2. Layout Containers & Structure
   ============================================================= */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

.site-container,
.site-header,
.site-footer,
.content-area {
    width: 100%;
    max-width: var(--cora-container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* =============================================================
   3. Header & Navigation
   ============================================================= */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cora-border-color);
}

.site-title {
    margin: 0;
    font-size: 24px;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666666;
}

.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: var(--cora-text-color);
    font-weight: 500;
}

.menu-toggle {
    display: none;
}

/* =============================================================
   4. Blog Posts & Archives
   ============================================================= */
.site-main {
    padding-top: 40px;
    padding-bottom: 40px;
}

.cora-post-card,
.page-content,
.error-404 {
    margin-bottom: 40px;
}

.entry-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.entry-meta {
    font-size: 14px;
    color: #666666;
    margin-bottom: 20px;
}

.post-thumbnail {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

/* =============================================================
   5. Footer Styling
   ============================================================= */
.site-footer {
    border-top: 1px solid var(--cora-border-color);
    padding-top: 40px;
    padding-bottom: 40px;
    margin-top: auto;
    background-color: #f9f9f9;
}

.footer-widgets-area {
    margin-bottom: 30px;
}

.site-info {
    text-align: center;
    font-size: 14px;
    color: #666666;
}

/* =============================================================
   6. Elementor Compatibility Safeguards
   ============================================================= */
/* Prevents Elementor canvas layouts from breaking or forcing extra margins */
body.elementor-page .site-content {
    padding: 0;
}

/* Accessibility & Screen Reader Helpers */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* =============================================================
   Mobile Menu & Responsive Navigation Styles
   ============================================================= */

@media screen and (max-width: 768px) {
    /* Show the toggle button on mobile */
    .menu-toggle {
        display: block;
        background: var(--cora-primary-color, #0073aa);
        color: #ffffff;
        border: none;
        padding: 10px 15px;
        font-size: 16px;
        cursor: pointer;
        border-radius: 4px;
    }

    /* Hide the navigation menu by default on mobile */
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        gap: 10px;
        background: #f9f9f9;
        padding: 15px;
        border-radius: 4px;
        border: 1px solid var(--cora-border-color, #dddddd);
    }

    /* When the toggle script adds 'toggled-on', display the menu vertically */
    .main-navigation ul.toggled-on {
        display: flex;
    }

    /* Stack header items nicely on smaller screens */
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .main-navigation {
        width: 100%;
    }
}

/* =============================================================
   Mobile Menu Top-Right Icon Styling
   ============================================================= */

/* Ensure the header container can hold absolute positioning on mobile */
@media screen and (max-width: 768px) {
    .site-header {
        position: relative;
        padding-right: 60px; /* Leaves space so the menu button doesn't overlap the site title/logo */
    }

    /* Position the toggle button in the top right corner */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 20px;
        right: 20px;
        background: transparent;
        color: var(--cora-text-color, #333333);
        border: none;
        padding: 8px;
        cursor: pointer;
        border-radius: 4px;
    }

    .menu-toggle:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    /* Style the SVG icon dimensions */
    .menu-toggle-icon {
        width: 24px;
        height: 24px;
        stroke: currentColor;
    }

    /* Hide the navigation menu by default on mobile */
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        gap: 10px;
        background: #161b22;
        padding: 15px;
        border-radius: 4px;
        border: 1px solid var(--cora-border-color, #dddddd);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    /* When toggled, display the menu vertically below the header */
    .main-navigation ul.toggled-on {
        display: flex;
    }

    .main-navigation {
        width: 100%;
    }
}

/* =============================================================
   1. CSS Variables & Reset
   ============================================================= */
:root {
    --cora-primary-color: #d97706; /* Brighter accent blue for dark mode visibility */
    --cora-text-color: #f3f4f6;    /* Soft off-white for readable text */
    --cora-bg-color: #000000;      /* Deep modern black/dark slate (or use #000000 for pure black) */
    --cora-border-color: #334155;  /* Darker border color so dividers look natural */
    --cora-container-width: 1200px;
    --cora-font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--cora-font-main);
    color: var(--cora-text-color);
    background-color: var(--cora-bg-color);
    line-height: 1.6;
}

/* =============================================================
   Custom Dark Footer Design & Layout
   ============================================================= */

/* =============================================================
   Modern Footer Design (Desktop & Mobile)
   ============================================================= */

.site-footer {
    background-color: #191f26;
    color: #94a3b8;
    padding: 40px 20px 30px;
    border-top: 1px solid #2d3748;
    text-align: center;
}

/* Ensure container centers content nicely */
.site-footer .site-container {
    max-width: var(--cora-container-width, 1200px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Completely strip default list styling and bullets */
.site-footer .footer-navigation ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
    margin: 0;
    gap: 24px;
}

/* Remove default list item markers explicitly */
.site-footer .footer-navigation li {
    list-style: none !important;
    background: none !important;
    margin: 0;
    padding: 0;
}

/* Modern link typography & hover effects */
.site-footer .footer-navigation a {
    color: #f3f4f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.site-footer .footer-navigation a:hover {
    color: var(--cora-primary-color, #d97706);
}

/* Copyright text styling */
.site-footer .site-info p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    padding-top: 20px;
}

/* Hide mobile tab bar by default on desktop */
.mobile-bottom-tabs {
    display: none;
}

/* Show and style only on mobile screens (768px and below) */
@media screen and (max-width: 768px) {
    /* Add bottom padding to body so page content isn't hidden behind the fixed bar */
    body {
        padding-bottom: 70px; 
    }

    .mobile-bottom-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background-color: #191f26;
        border-top: 1px solid #2d3748;
        z-index: 99999;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
    }

    .mobile-bottom-tabs .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: #94a3b8;
        text-decoration: none;
        font-size: 11px;
        font-weight: 500;
        gap: 3px;
        transition: color 0.2s ease;
    }

    .mobile-bottom-tabs .tab-item svg {
        stroke: currentColor;
    }

    /* Active or hover state highlight */
    .mobile-bottom-tabs .tab-item:hover,
    .mobile-bottom-tabs .tab-item:active {
        color: var(--cora-primary-color, #d97706);
    }
}

/* Target the dropdown / submenu container box */
header .sub-menu, 
header ul.sub-menu, 
.main-navigation ul ul, 
.ast-flex-popup-menu, 
.mobile-menu-container, 
.menu-item-has-children > ul {
    background-color: #121212 !important; /* Deep dark background */
    border: 1px solid #333333 !important;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Force the text inside the dropdown to be visible and readable */
header .sub-menu a, 
header ul.sub-menu a, 
.main-navigation ul ul a, 
.menu-item-has-children > ul a {
    color: #ffffff !important; /* Bright white text */
}

/* Hover state for dropdown links */
header .sub-menu a:hover, 
header ul.sub-menu a:hover, 
.main-navigation ul ul a:hover, 
.menu-item-has-children > ul a:hover {
    background-color: #1f1f1f !important;
    color: #3b82f6 !important; /* Accent color on hover */
}