/*
Theme Name: Isiland
Theme URI: https://khorn.com/
Author: Antigravity
Author URI: https://antigravity.ai/
Description: A high-performance, secure, and professional WordPress theme designed for Khorn. Featuring clean code, advanced security hardening, and lightning-fast load times.
Version: 1.0.0
Text Domain: khorn
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Isiland is built with a focus on:
- Fast Load: Optimized asset loading and minimal bloat.
- Security: Included hardening against common vulnerabilities.
- Professional Structure: Clean, modular PHP and modern CSS.
*/

/* --- Design Tokens --- */
:root {
    --primary-color: #02ae9b;
    --primary-dark: #023531;
    --secondary-color: #f9d792;
    --text-color: #333333;
    --bg-color: #ffffff;
    --light-gray: #f4f4f4;
    --border-color: #e0e0e0;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-width: 1200px;
    --transition: all 0.3s ease-in-out;
}

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

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

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

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

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Layout --- */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1 0 auto;
    padding: 60px 0;
}

/* --- Full Width & Elementor Support --- */
.full-width-content .site-main {
    padding: 0;
}

/* If Elementor is used, ensure the container spans full width */
.elementor-page.elementor-template-full-width .site-content>.container {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Remove default article styling when in Elementor full width */
.elementor-page.elementor-template-full-width article {
    margin-bottom: 0;
    background: transparent;
    border-radius: 0;
}

.elementor-page.elementor-template-full-width .site-content {
    padding: 0;
}

/* --- Transparent Header --- */
.transparent-header .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, top 0.3s ease, padding 0.3s ease;
    padding: 20px 0;
}

/* Admin Bar Adjustments */
.admin-bar.transparent-header .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar.transparent-header .site-header {
        top: 46px;
    }
}

@media screen and (max-width: 600px) {
    .admin-bar.transparent-header .site-header {
        top: 0;
        /* WP Admin Bar is usually relative or mobile-hidden on very small screens */
    }
}

.transparent-header .site-header .site-title a,
.transparent-header .site-header .main-navigation a,
.transparent-header .site-header .menu-toggle {
    color: #ffffff;
    transition: color 0.3s ease;
}

.transparent-header .site-header .site-description {
    color: rgba(255, 255, 255, 0.8);
}

/* Header on scroll - becomes solid and sleek */
.transparent-header .site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    /* Shrink slightly on scroll for a premium feel */
}

.transparent-header .site-header.scrolled .site-title a,
.transparent-header .site-header.scrolled .main-navigation a,
.transparent-header .site-header.scrolled .menu-toggle {
    color: var(--text-color);
}

.transparent-header .site-header.scrolled .site-description {
    color: var(--text-color);
    opacity: 0.7;
}

/* Adjust main content to account for transparent header */
.transparent-header .site-main {
    padding-top: 0;
}

/* Logo adjustments for transparent header */
.transparent-header .site-header .custom-logo {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.transparent-header .site-header.scrolled .custom-logo {
    filter: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .transparent-header .site-header {
        background-color: rgba(0, 0, 0, 0.85);
        padding: 15px 0;
    }

    .transparent-header .site-header.scrolled {
        background-color: rgba(255, 255, 255, 0.98);
    }
}

/* --- Widgets & Sidebar --- */
.widget-area {
    margin-top: 40px;
}

.widget {
    margin-bottom: 40px;
    padding: 30px;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-color);
    transition: var(--transition);
    display: block;
}

.widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Widget - Search */
.widget_search .search-form {
    display: flex;
    gap: 10px;
}

.widget_search .search-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.widget_search .search-submit {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.widget_search .search-submit:hover {
    background-color: var(--primary-dark);
}

/* Widget - Recent Posts */
.widget_recent_entries ul li {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.widget_recent_entries .post-date {
    font-size: 12px;
    color: #999;
}

/* Widget - Categories */
.widget_categories select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

/* Widget - Tag Cloud */
.tagcloud a,
.wp-block-tag-cloud a {
    display: inline-block;
    padding: 5px 12px;
    margin: 4px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px !important;
    color: var(--text-color);
    transition: var(--transition);
}

.tagcloud a:hover,
.wp-block-tag-cloud a:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Sidebar Layout */
.sidebar {
    padding-left: 30px;
}

@media (max-width: 992px) {
    .sidebar {
        padding-left: 0;
        margin-top: 60px;
    }
}